Repository: AndronixApp/termux-packages
Branch: master
Commit: c39b1d040990
Files: 2305
Total size: 3.6 MB
Directory structure:
gitextract_8s_13j_i/
├── .cirrus.yml
├── .github/
│ └── main.workflow
├── .gitignore
├── LICENSE.md
├── README.md
├── build-all.sh
├── build-package.sh
├── clean.sh
├── disabled-packages/
│ ├── abuild/
│ │ ├── Makefile.patch
│ │ ├── abuild-fetch.c.patch
│ │ ├── abuild-keygen.in.patch
│ │ ├── abuild-rmtemp.c.patch
│ │ ├── abuild-sign.in.patch
│ │ ├── abuild.conf.patch
│ │ ├── abuild.in.patch
│ │ ├── build.sh
│ │ ├── checkapk.in.patch
│ │ ├── functions.sh.in.patch
│ │ └── sample.APKBUILD.patch
│ ├── alsa-lib/
│ │ ├── alsa-conf-dir.patch
│ │ ├── build.sh
│ │ ├── pcm_direct.c.patch
│ │ ├── pcm_mmap.c.patch.old
│ │ └── versionsort.patch
│ ├── alsa-plugins/
│ │ ├── asound.conf
│ │ └── build.sh
│ ├── alsa-utils/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── volume_mapping.c.patch
│ ├── ant/
│ │ ├── ant
│ │ └── build.sh
│ ├── apk-tools/
│ │ ├── Make.rules.patch
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── libfetch-http.c.patch
│ │ ├── src-apk.c.patch
│ │ ├── src-archive.c.patch
│ │ ├── src-commit.c.patch
│ │ ├── src-database.c.patch
│ │ ├── src-io.c.patch
│ │ ├── src-package.c.patch
│ │ └── src-termux_prefix.h.patch
│ ├── apt-updated/
│ │ ├── CMakeLists.txt.patch
│ │ ├── apt-pkg-contrib-fileutl.patch
│ │ ├── apt-pkg-contrib-srvrec.cc.patch
│ │ ├── apt-pkg-contrib-strutl.cc.patch
│ │ ├── apt-pkg-deb-debrecords.cc.patch
│ │ ├── apt-pkg-init-dir.patch
│ │ ├── apt-private-private-download.cc.patch
│ │ ├── build.sh
│ │ ├── cmdline-apt-key.in.patch
│ │ ├── cmndline-no-strchrnul.patch
│ │ ├── debsrcrecords.patch
│ │ ├── methods-cmakelist.patch
│ │ ├── methods-connect.cc.patch
│ │ ├── private-output-no-langinfo.patch
│ │ ├── trusted.gpg
│ │ └── vendor.patch
│ ├── cadaver/
│ │ └── build.sh
│ ├── checkinstall/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── checkinstall.patch
│ │ ├── checkinstallrc-dist.patch
│ │ ├── installwatch-Makefile.patch
│ │ └── installwatch.c.patch
│ ├── clisp/
│ │ ├── build.sh
│ │ ├── src-gllib-stdint.in.h.patch
│ │ └── src-makefile.in.patch
│ ├── crawl/
│ │ └── build.sh
│ ├── cups/
│ │ ├── build.sh
│ │ ├── cups-thread.c.patch
│ │ ├── file.c.patch
│ │ └── lockf.cpp.patch
│ ├── d8/
│ │ ├── build.sh
│ │ └── d8
│ ├── deborphan/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── errno.patch
│ │ ├── src-Makefile.in.patch
│ │ ├── src-deborphan.c.patch
│ │ └── src-pkginfo.c.patch
│ ├── dovecot/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── src-lib-connection.h.patch
│ ├── easy-rsa/
│ │ └── build.sh
│ ├── ghc/
│ │ ├── bitcast.patch
│ │ ├── build.sh
│ │ ├── compiler-llvmGen-LlvmCodeGen-Ppr.hs.patch
│ │ ├── compiler-main-DriverPipeline.hs.patch
│ │ └── configure.patch
│ ├── groff/
│ │ └── build.sh
│ ├── gst-libav/
│ │ └── build.sh
│ ├── gst123/
│ │ └── build.sh
│ ├── guile/
│ │ └── build.sh
│ ├── javac/
│ │ ├── build.sh
│ │ └── javac
│ ├── libfakechroot/
│ │ └── build.sh
│ ├── libffi-updated/
│ │ └── build.sh
│ ├── libjemalloc/
│ │ └── build.sh
│ ├── libressl/
│ │ └── build.sh
│ ├── lrzsz/
│ │ ├── build.sh
│ │ └── src-Makefile.in.patch
│ ├── man-db/
│ │ └── build.sh
│ ├── mono/
│ │ ├── build.sh
│ │ ├── complex.h
│ │ ├── math_private.h
│ │ └── tkill.patch
│ ├── ocaml/
│ │ └── build.sh
│ ├── openjdk-9-jre-headless/
│ │ ├── build.sh
│ │ ├── build_ldflags.patch
│ │ ├── elfFile.hpp.patch
│ │ ├── generated-configure.sh.patch
│ │ ├── getgr_r.patch
│ │ ├── hotspot-jvm_home.patch
│ │ ├── jdk-java_home.patch
│ │ ├── libpthread.patch
│ │ ├── openjdk-9-jdk-headless.subpackage.sh
│ │ ├── openjdk-9-source.subpackage.sh
│ │ ├── osName.patch
│ │ ├── os_linux_aarch64.cpp.patch
│ │ └── sendfile64.patch
│ ├── openvpn/
│ │ ├── build.sh
│ │ ├── configure.ac.patch.old
│ │ ├── netbsd_getpass.c
│ │ ├── src-openvpn-console_builtin.c.patch
│ │ ├── src-openvpn-tun.c.patch
│ │ └── termux-openvpn
│ ├── pacman/
│ │ ├── build.sh
│ │ ├── ensure-matching-database-and-package-version.patch
│ │ ├── makepkg.conf
│ │ ├── pacman.conf
│ │ └── pacman.patch
│ ├── pkgconf/
│ │ └── build.sh
│ ├── premake/
│ │ ├── build-gmake.unix-Premake4.make.patch
│ │ └── build.sh
│ ├── sbcl/
│ │ ├── build.sh
│ │ └── make-config.sh.patch
│ ├── sslscan/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── sslscan.c.patch
│ ├── tf/
│ │ └── build.sh
│ ├── toybox/
│ │ └── build.sh
│ └── unnethack/
│ ├── build.sh
│ ├── dat_town_wildcard.patch
│ └── dont_delete_makedefs.patch
├── generate-bootstraps.sh
├── ndk-patches/
│ ├── asm-generic-termbits.h.patch
│ ├── bits-struct_file.h.patch
│ ├── grp.h.patch
│ ├── ifaddrs.h
│ ├── langinfo.h
│ ├── langinfo.h.patch
│ ├── libintl.h
│ ├── linux-fcntl.h.patch
│ ├── paths.h.patch
│ ├── pwd.h.patch
│ ├── stdio.h.patch
│ ├── stdlib.h.patch
│ ├── sys-cdefs.h.patch
│ ├── sys-wait.h.patch
│ ├── syslog.patch
│ └── unistd.h.patch
├── packages/
│ ├── aapt/
│ │ ├── aapt-Main.cpp.patch.txt
│ │ ├── build.sh
│ │ ├── libbase-patch.txt
│ │ ├── libcutils-patch.txt
│ │ ├── libziparchive.patch.txt
│ │ └── log.h.patch.txt
│ ├── abduco/
│ │ └── build.sh
│ ├── abook/
│ │ ├── build.sh
│ │ ├── database.h.patch
│ │ └── filter.c.patch
│ ├── ack-grep/
│ │ └── build.sh
│ ├── acr/
│ │ ├── build.sh
│ │ └── no_dev-stderr.patch
│ ├── algernon/
│ │ ├── build.sh
│ │ └── fix-hardcoded-paths.patch
│ ├── alpine/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── env_unix.c.patch
│ │ ├── fdstring.c.patch
│ │ ├── imap-src-osdep-unix-Makefile.patch
│ │ ├── imapmkf.patch
│ │ ├── mlockmake.patch
│ │ ├── mtest.c.patch
│ │ ├── os_lnx.c.patch
│ │ ├── os_lnx.h.patch
│ │ ├── pine.conf
│ │ └── pw_stuff.c.patch
│ ├── antiword/
│ │ ├── Makefile.Linux.patch
│ │ ├── antiword.h.patch
│ │ └── build.sh
│ ├── apache2/
│ │ ├── Termux.layout
│ │ ├── build-instdso.sh.patch
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── apg/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── install-sh.patch
│ ├── apksigner/
│ │ └── build.sh
│ ├── apr/
│ │ ├── Makefile.in.patch
│ │ └── build.sh
│ ├── apr-util/
│ │ └── build.sh
│ ├── apt/
│ │ ├── 0000-cmake-fix.patch
│ │ ├── 0001-hardcoded-paths-fix.patch
│ │ ├── 0002-glob.patch
│ │ ├── 0003-langinfo-and-codeset.patch
│ │ ├── 0004-srv-records.patch
│ │ ├── 0005-http2-fix.patch
│ │ ├── 0006-apt-key-nonroot.patch
│ │ ├── 0007-termux-apt-vendor.patch
│ │ ├── 0008-apt-init.patch
│ │ ├── 0009-fix-macro-redefinition.patch
│ │ ├── 0010-prevent-usage-as-root.patch
│ │ ├── apt-ftparchive.subpackage.sh
│ │ ├── apt-transport-tor.subpackage.sh
│ │ ├── build.sh
│ │ ├── man/
│ │ │ ├── man5/
│ │ │ │ ├── apt.conf.5
│ │ │ │ ├── apt_preferences.5
│ │ │ │ └── sources.list.5
│ │ │ └── man8/
│ │ │ ├── apt-cache.8
│ │ │ ├── apt-config.8
│ │ │ ├── apt-get.8
│ │ │ ├── apt-key.8
│ │ │ ├── apt-mark.8
│ │ │ ├── apt-secure.8
│ │ │ └── apt.8
│ │ └── trusted.gpg
│ ├── aptly/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── argp/
│ │ ├── argp-fmtstream.h.patch
│ │ └── build.sh
│ ├── aria2/
│ │ └── build.sh
│ ├── arj/
│ │ ├── 001_arches_align.patch
│ │ ├── 002_no_remove_static_const.patch
│ │ ├── 003_64_bit_clean.patch
│ │ ├── 004_parallel_build.patch
│ │ ├── 005_use_system_strnlen.patch
│ │ ├── 006_use_safe_strcpy.patch
│ │ ├── build.sh
│ │ ├── doc_refer_robert_k_jung.patch
│ │ ├── gnu_build_fix.patch
│ │ ├── gnu_build_flags.patch
│ │ ├── gnu_build_pie.patch
│ │ ├── gnu_build_strip.patch
│ │ ├── hurd_no_fcntl_getlk.patch
│ │ ├── integr.patch
│ │ ├── mode.patch
│ │ ├── out-of-bounds-read.patch
│ │ ├── security-afl.patch
│ │ ├── security-traversal-dir.patch
│ │ ├── security-traversal-symlink.patch
│ │ ├── security_format.patch
│ │ ├── self_integrity_64bit.patch
│ │ └── z_cross_compile.patch
│ ├── asciidoc/
│ │ └── build.sh
│ ├── asciinema/
│ │ ├── asciinema-__main__.py.patch
│ │ └── build.sh
│ ├── assimp/
│ │ ├── build.sh
│ │ └── test-CMakeLists.txt.patch
│ ├── atomicparsley/
│ │ └── build.sh
│ ├── attr/
│ │ ├── build.sh
│ │ ├── tools-attr.c.patch
│ │ └── walk_tree.c.patch
│ ├── autoconf/
│ │ ├── General.pm.patch
│ │ └── build.sh
│ ├── automake/
│ │ └── build.sh
│ ├── autossh/
│ │ └── build.sh
│ ├── axel/
│ │ └── build.sh
│ ├── babl/
│ │ ├── babl-meson.build.patch
│ │ ├── build.sh
│ │ ├── tests-meson.build.patch
│ │ └── tools-meson.build.patch
│ ├── barcode/
│ │ └── build.sh
│ ├── bash/
│ │ ├── build.sh
│ │ ├── config-top.h.patch
│ │ ├── error.c.patch
│ │ ├── etc-bash.bashrc
│ │ ├── etc-profile
│ │ ├── lib-malloc-stats.c.patch
│ │ ├── lib-malloc-table.c.patch
│ │ ├── lib-malloc-trace.c.patch
│ │ ├── lib-readline-complete.c.patch
│ │ ├── lib-readline-rlconf.h.patch
│ │ ├── lib-readline-util.c.patch
│ │ ├── lib-sh-tmpfile.c.patch
│ │ ├── pathnames.h.in.patch
│ │ └── shell.c.patch
│ ├── bash-completion/
│ │ ├── build.sh
│ │ └── completions-man.patch
│ ├── bat/
│ │ └── build.sh
│ ├── bc/
│ │ └── build.sh
│ ├── beanshell/
│ │ └── build.sh
│ ├── binutils/
│ │ ├── binutils-gold.subpackage.sh
│ │ ├── binutils.patch
│ │ ├── build.sh
│ │ ├── dirsearch.cc.patch
│ │ ├── ld-emultempl-elf32.em.patch
│ │ ├── ldd
│ │ ├── native_lib_dirs.patch32
│ │ ├── native_lib_dirs.patch64
│ │ ├── options.cc.patch32
│ │ └── options.cc.patch64
│ ├── bison/
│ │ └── build.sh
│ ├── bitcoin/
│ │ ├── 0001-android-patches.patch
│ │ ├── build-aux-m4-ax_boost_thread.m4.patch
│ │ └── build.sh
│ ├── blogc/
│ │ ├── build.sh
│ │ └── termux-prefix.patch
│ ├── bmon/
│ │ ├── build.sh
│ │ └── config.h.patch
│ ├── boost/
│ │ ├── bootstrap.sh.patch
│ │ ├── build.sh
│ │ ├── python.jam.patch
│ │ └── tools-build-src-tools-common.jam.patch
│ ├── brotli/
│ │ ├── CMakeLists.txt.patch
│ │ └── build.sh
│ ├── build-essential/
│ │ └── build.sh
│ ├── busybox/
│ │ ├── 0000-use-clang.patch
│ │ ├── 0001-clang-fix.patch
│ │ ├── 0002-hardcoded-paths-fix.patch
│ │ ├── 0003-strchrnul-fix.patch
│ │ ├── 0004-missing-syscalls.patch
│ │ ├── 0005-no-change-identity.patch
│ │ ├── 0006-no-crypt.h.patch
│ │ ├── 0007-miscutils-crond.patch
│ │ ├── 0008-miscutils-crontab.patch
│ │ ├── 0009-networking-ftpd-no-chroot.patch
│ │ ├── 0010-networking-httpd-default-port.patch
│ │ ├── 0011-networking-telnetd-default-port.patch
│ │ ├── 0012-networking-tftp-no-chroot.patch
│ │ ├── build.sh
│ │ └── busybox.config
│ ├── bvi/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ ├── column_number_bugfix.patch
│ │ └── comm.c.patch
│ ├── byobu/
│ │ ├── build.sh
│ │ └── usr-bin-byobu.in.patch
│ ├── c-ares/
│ │ ├── build.sh
│ │ ├── disable-ares-android.patch
│ │ └── fix-path-etc-hosts.patch
│ ├── c-toxcore/
│ │ └── build.sh
│ ├── ca-certificates/
│ │ ├── build.sh
│ │ └── ca-certificates-java.subpackage.sh
│ ├── cabextract/
│ │ └── build.sh
│ ├── caddy/
│ │ └── build.sh
│ ├── calcurse/
│ │ ├── build.sh
│ │ ├── io.c.patch
│ │ ├── src-notify.c.patch
│ │ └── src-ui-calendar.c.patch
│ ├── capstone/
│ │ └── build.sh
│ ├── cava/
│ │ ├── Makefile.am.patch
│ │ ├── build.sh
│ │ ├── config.c.patch
│ │ └── configure.ac.patch
│ ├── cboard/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── libchess-pgn.c.patch
│ ├── ccache/
│ │ └── build.sh
│ ├── ccnet/
│ │ ├── build.sh
│ │ └── configure.ac.patch
│ ├── ccrypt/
│ │ └── build.sh
│ ├── cgdb/
│ │ ├── build.sh
│ │ └── cgdb.cpp.patch
│ ├── chromaprint/
│ │ └── build.sh
│ ├── clamav/
│ │ ├── build.sh
│ │ ├── clamd.conf.in
│ │ ├── configure.patch
│ │ ├── fix-hardcoded-paths.patch
│ │ ├── freshclam.conf.in
│ │ └── no-lutimes.patch
│ ├── cmake/
│ │ ├── Modules-CMakeDetermineSystem.cmake.patch
│ │ ├── Modules-Platform-Android-Clang.cmake.patch
│ │ ├── Modules-Platform-Android-Determine-Compiler.cmake.patch
│ │ ├── Modules-Platform-Android-Determine.cmake.patch
│ │ ├── Modules-Platform-Android-Initialize.cmake.patch
│ │ ├── Modules-Platform-Android.cmake.patch
│ │ ├── Source-CMakeLists.txt.patch
│ │ ├── Source-cmExecProgramCommand.cxx.patch
│ │ ├── Source-cmLocalUnixMakefileGenerator3.cxx.patch
│ │ ├── Source-cmStateSnapshot.cxx.patch
│ │ ├── build.sh
│ │ └── cmake-curses-gui.subpackage.sh
│ ├── cmark/
│ │ └── build.sh
│ ├── cmatrix/
│ │ └── build.sh
│ ├── cmus/
│ │ ├── build.sh
│ │ ├── checks.patch
│ │ └── configure.patch
│ ├── cmusfm/
│ │ └── build.sh
│ ├── codecrypt/
│ │ ├── autogen.sh.patch
│ │ ├── build.sh
│ │ └── getpass.patch
│ ├── colordiff/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── command-not-found/
│ │ └── build.sh
│ ├── coreutils/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── fix-paths.patch
│ │ ├── nohup.c.patch
│ │ ├── pwd.c.patch
│ │ ├── src-ls.c.patch
│ │ └── tests/
│ │ └── tails-c-flag.sh
│ ├── corkscrew/
│ │ ├── build.sh
│ │ └── corkscrew.1
│ ├── cowsay/
│ │ ├── build.sh
│ │ └── install.sh.patch
│ ├── cpio/
│ │ └── build.sh
│ ├── cppi/
│ │ └── build.sh
│ ├── crunch/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── cryptopp/
│ │ ├── build.sh
│ │ ├── cpu.cpp.patch
│ │ └── fix-lib-symlinks.patch
│ ├── cscope/
│ │ ├── build.sh
│ │ ├── errno.patch
│ │ └── src-main.c.patch
│ ├── ctags/
│ │ ├── build.sh
│ │ └── configure.ac.patch
│ ├── cvs/
│ │ ├── build.sh
│ │ └── src-log.c.patch
│ ├── daemonize/
│ │ ├── build.sh
│ │ └── daemonize.c.patch
│ ├── darkhttpd/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── dart/
│ │ ├── build.sh
│ │ ├── dart-pub-bin.sh
│ │ ├── fix-shell-path.patch
│ │ └── sdk-runtime-bin-directory_android.cc.patch
│ ├── dash/
│ │ ├── build.sh
│ │ ├── etc-profile.patch
│ │ ├── mktokens.patch
│ │ └── src-var.c.patch
│ ├── dasm/
│ │ └── build.sh
│ ├── datamash/
│ │ └── build.sh
│ ├── dcraw/
│ │ ├── build.sh
│ │ └── swab.c
│ ├── ddrescue/
│ │ ├── build.sh
│ │ └── fix-configure.patch
│ ├── debianutils/
│ │ ├── add-shell.patch
│ │ ├── build.sh
│ │ └── remove-shell.patch
│ ├── debootstrap/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── debootstrap.patch
│ │ ├── fix-keyring-paths.patch
│ │ ├── functions.patch
│ │ └── scripts-debian-common.patch
│ ├── deutex/
│ │ └── build.sh
│ ├── dialog/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── dictd/
│ │ ├── build.sh
│ │ └── dictd.patch
│ ├── diffutils/
│ │ └── build.sh
│ ├── direnv/
│ │ └── build.sh
│ ├── direvent/
│ │ ├── build.sh
│ │ └── preproc.c.patch
│ ├── diskus/
│ │ └── build.sh
│ ├── dnsutils/
│ │ ├── bin-delv-delv.c.patch
│ │ ├── build.sh
│ │ ├── lib-irs-context.c.patch
│ │ └── lib-isc-pthreads-thread.c.patch
│ ├── docbook-xml/
│ │ └── build.sh
│ ├── docbook-xsl/
│ │ ├── 765567_non-recursive_string_subst.patch
│ │ └── build.sh
│ ├── dos2unix/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── double-conversion/
│ │ └── build.sh
│ ├── doxygen/
│ │ ├── build.sh
│ │ └── doxyparse.cpp.patch
│ ├── dpkg/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── dbmodify_dont_require_root.patch
│ │ ├── extract.c.patch
│ │ ├── lib-dpkg-atomic-file.c.patch
│ │ ├── lib-dpkg-dpkg.h.patch
│ │ ├── lib-dpkg-path-remove.c.patch
│ │ ├── lib-dpkg-triglib.c.patch
│ │ ├── src-archives.c.patch
│ │ ├── src-configure.c.patch
│ │ ├── src-help.c.patch
│ │ └── src-statcmd.c.patch
│ ├── dropbear/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ ├── common-session.c.patch
│ │ ├── compat.c.patch
│ │ ├── default_options.h.patch
│ │ ├── gensignkey.c.patch
│ │ ├── sshpty.c.patch
│ │ ├── svr-agentfwd.c.patch
│ │ ├── svr-auth.c.patch
│ │ ├── svr-authpasswd.c.patch
│ │ ├── svr-chansession.c.patch
│ │ └── sysoptions.h.patch
│ ├── dtc/
│ │ └── build.sh
│ ├── dte/
│ │ └── build.sh
│ ├── duc/
│ │ ├── build.sh
│ │ └── cmd-ls.c.patch
│ ├── dvtm/
│ │ ├── build.sh
│ │ ├── fix-fifo-path.patch
│ │ └── vt.c.patch
│ ├── dx/
│ │ ├── build.sh
│ │ └── dx
│ ├── e2fsprogs/
│ │ ├── build.sh
│ │ ├── clang-compat.patch
│ │ ├── doc-Makefile.in.patch
│ │ ├── fix-hardcoded-paths.patch
│ │ ├── fsmap.h.patch
│ │ └── hasmntopt.patch
│ ├── ecj/
│ │ ├── build.sh
│ │ ├── ecj
│ │ └── ecj-24
│ ├── ed/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── elinks/
│ │ ├── build.sh
│ │ └── elinks-fix-paths.patch
│ ├── elixir/
│ │ └── build.sh
│ ├── emacs/
│ │ ├── build.sh
│ │ ├── lib-src-emacsclient.c.patch
│ │ ├── lisp-cus-start.el.patch.beforehostbuild
│ │ ├── lisp-loadup.el-2.patch.beforehostbuild
│ │ ├── lisp-net-tramp.el.patch.beforehostbuild
│ │ ├── lisp-server.el.patch.beforehostbuild
│ │ ├── lisp-subr.el.patch.beforehostbuild
│ │ ├── lisp-term.el.patch.beforehostbuild
│ │ ├── lisp-textmodes-ispell.el.patch.beforehostbuild
│ │ ├── no_user_fullname.patch
│ │ ├── site-init.el
│ │ ├── src-callproc.c.patch
│ │ ├── src-filelock.c.patch
│ │ └── src-keyboard.c.patch
│ ├── erlang/
│ │ ├── build.sh
│ │ ├── erts-emulator-Makefile.in.patch
│ │ └── prefix.patch
│ ├── espeak/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── compat-stdint.h.patch
│ ├── exa/
│ │ ├── build.sh
│ │ └── src-output-table.rs.patch
│ ├── exiftool/
│ │ └── build.sh
│ ├── exiv2/
│ │ ├── build.sh
│ │ └── exiv2json.cpp.patch
│ ├── expect/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ └── configure.in.patch
│ ├── fakeroot/
│ │ ├── build.sh
│ │ ├── fakeroot-1.23_faked.c.patch
│ │ ├── fakeroot-1.23_libfakeroot.c.patch
│ │ └── fakeroot-1.23_scripts_fakeroot.in.patch
│ ├── fasd/
│ │ └── build.sh
│ ├── fastmod/
│ │ ├── build.sh
│ │ └── vi-as-default-editor.patch
│ ├── fbless/
│ │ └── build.sh
│ ├── fcgi/
│ │ └── build.sh
│ ├── fcgiwrap/
│ │ ├── build.sh
│ │ └── fix-kill-parameters.patch
│ ├── fd/
│ │ ├── Cargo.toml.patch
│ │ ├── build.sh
│ │ └── src-main.rs.patch
│ ├── fdupes/
│ │ └── build.sh
│ ├── ffmpeg/
│ │ ├── build.sh
│ │ └── libavutil-file_open.c.patch
│ ├── ffsend/
│ │ └── build.sh
│ ├── fftw/
│ │ ├── build.sh
│ │ └── fix-wisdom_dir.patch
│ ├── figlet/
│ │ ├── build.sh
│ │ ├── figlet.c.patch
│ │ └── makefile.patch
│ ├── file/
│ │ ├── build.sh
│ │ └── fix-paths.patch
│ ├── finch/
│ │ ├── arpa/
│ │ │ ├── nameser.h
│ │ │ └── nameser_compat.h
│ │ ├── bonjour-makefile.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── dont-build-nullclient-example.patch
│ │ ├── gg-makefile.patch
│ │ ├── irc-makefile.patch
│ │ ├── jabber-makefile.patch
│ │ ├── libgnt-gntmain.c.patch
│ │ ├── oscar-makefile.patch
│ │ ├── sametime-makefile.patch
│ │ ├── silc-makefile.patch
│ │ ├── silc10-makefile.patch
│ │ ├── simple-makefile.patch
│ │ └── ssl-makefile.patch
│ ├── findutils/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── find-parser.c.patch
│ │ └── gl-lib-mountlist.c.patch
│ ├── fish/
│ │ ├── build.sh
│ │ ├── create_manpage_completions.py.patch
│ │ ├── share-functions-__fish_print_help.fish.patch
│ │ ├── src-env.cpp.patch
│ │ ├── src-fish.cpp.patch
│ │ └── src-wutil.cpp.patch
│ ├── flex/
│ │ ├── Makefile.in.patch
│ │ └── build.sh
│ ├── fontconfig/
│ │ ├── build.sh
│ │ ├── fcatomic.c.patch
│ │ └── fontconfig-utils.subpackage.sh
│ ├── fortune/
│ │ ├── build.sh
│ │ └── fortune.c.patch
│ ├── fossil/
│ │ ├── build.sh
│ │ ├── src-main.c.patch
│ │ ├── src-popen.c.patch
│ │ └── src-user.c.patch
│ ├── freetype/
│ │ └── build.sh
│ ├── fribidi/
│ │ └── build.sh
│ ├── frobtads/
│ │ ├── build.sh
│ │ └── no_asprintf.patch
│ ├── fsmon/
│ │ └── build.sh
│ ├── fwknop/
│ │ └── build.sh
│ ├── fzf/
│ │ ├── bin-fzf-tmux.patch
│ │ └── build.sh
│ ├── game-repo/
│ │ └── build.sh
│ ├── gawk/
│ │ ├── build.sh
│ │ ├── io.c.patch
│ │ ├── main.c.patch
│ │ ├── no_pw_gecos.patch
│ │ └── stack_index.patch
│ ├── gbt/
│ │ └── build.sh
│ ├── gcal/
│ │ └── build.sh
│ ├── gdb/
│ │ ├── archive_c_st_mtime.patch
│ │ ├── build.sh
│ │ ├── fix-tmp_prefix.patch
│ │ ├── gdb-amd64-linux-nat.c.patch
│ │ ├── gdb-cli-cli-cmds.c.patch
│ │ ├── gdb-common-job-control.c.patch
│ │ ├── gdb-common-pathstuff.c.patch
│ │ ├── gdb-common-signals-state-save-restore.c.patch
│ │ ├── gdb-gdbserver-configure.patch
│ │ ├── gdb-gnulib-import-string.in.h.patch
│ │ ├── gdb-ser-pipe.c.patch
│ │ ├── gdb-solib.c.patch
│ │ ├── gregset.h.patch
│ │ ├── linux_thread_db_no_th_unique.patch
│ │ ├── readline-histlib.h.patch.debug
│ │ └── readline.patch
│ ├── gdbm/
│ │ ├── build.sh
│ │ └── termios_h.patch
│ ├── gdk-pixbuf/
│ │ └── build.sh
│ ├── gegl/
│ │ ├── 6bcf95fd0f32cf5e8b1ddbe17b14d9ad049bded8.patch
│ │ └── build.sh
│ ├── geoip2-database/
│ │ └── build.sh
│ ├── getconf/
│ │ └── build.sh
│ ├── geth/
│ │ ├── build.sh
│ │ ├── fix-names-conflict.patch
│ │ └── geth-utils.subpackage.sh
│ ├── getmail/
│ │ ├── build.sh
│ │ └── utilities.py.patch
│ ├── gettext/
│ │ ├── build.sh
│ │ ├── gnulib-libmakefile.am.patch
│ │ └── msginit.c.patch
│ ├── gflags/
│ │ └── build.sh
│ ├── ghostscript/
│ │ ├── arch-aarch64.h
│ │ ├── arch-arm.h
│ │ ├── arch-i686.h
│ │ ├── arch-x86_64.h
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── gserrors.h.patch
│ ├── giflib/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── giflib-utils.subpackage.sh
│ ├── gifsicle/
│ │ └── build.sh
│ ├── git/
│ │ ├── build.sh
│ │ ├── config.c.patch
│ │ ├── config.mak.uname.patch
│ │ ├── disable_daemon_syslog.patch
│ │ ├── git.patch
│ │ ├── help.c.patch
│ │ ├── run-command.c.patch
│ │ └── tempfile.c.patch
│ ├── git-crypt/
│ │ └── build.sh
│ ├── git-lfs/
│ │ └── build.sh
│ ├── gitea/
│ │ ├── app.ini
│ │ ├── build.sh
│ │ └── gitea-service.sh
│ ├── gkermit/
│ │ ├── build.sh
│ │ └── makefile.patch
│ ├── glib/
│ │ ├── build.sh
│ │ ├── fix-hardcoded-paths.patch
│ │ ├── glib-bin.subpackage.sh
│ │ ├── glib-gspawn.c.patch
│ │ ├── glib-gtimezone.c.patch
│ │ ├── glib-gutils.c.patch
│ │ └── meson.build.patch
│ ├── global/
│ │ ├── build.sh
│ │ ├── echo-path.patch
│ │ └── libutil-makepath.c.patch
│ ├── gmic/
│ │ ├── CImg.h.patch
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── gmic-gm.subpackage.sh
│ ├── gnuchess/
│ │ ├── build.sh
│ │ ├── components.cc.patch
│ │ └── main.cc.patch
│ ├── gnuit/
│ │ ├── build.sh
│ │ ├── system.c.patch
│ │ └── tilde.c-history.c.patch.debug
│ ├── gnupg/
│ │ ├── agent-agent.h.patch
│ │ ├── build.sh
│ │ ├── common-dotlock.c.patch
│ │ ├── configure.patch
│ │ ├── fix-paths.patch
│ │ └── gpgv.subpackage.sh
│ ├── gnuplot/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── plot.c.patch
│ │ └── src-command.c.patch
│ ├── go-findimagedupes/
│ │ └── build.sh
│ ├── goaccess/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── tcbtdb.h.patch
│ │ └── websocket.h.patch
│ ├── golang/
│ │ ├── build.sh
│ │ ├── golang-doc.subpackage.sh
│ │ ├── src-os-file_unix.go.patch
│ │ ├── src-runtime-cgo-cgo.go.patch
│ │ └── src-runtime-cgo-gcc_android.c.patch
│ ├── google-glog/
│ │ └── build.sh
│ ├── googletest/
│ │ └── build.sh
│ ├── gotty/
│ │ └── build.sh
│ ├── gperf/
│ │ ├── build.sh
│ │ └── output.cc.patch
│ ├── gpgme/
│ │ └── build.sh
│ ├── gpsbabel/
│ │ └── build.sh
│ ├── graphicsmagick/
│ │ └── build.sh
│ ├── graphviz/
│ │ ├── add-libcommon-to-gc.patch
│ │ ├── build.sh
│ │ ├── cmd-edgepaint-Makefile.in.patch
│ │ ├── configure.patch
│ │ ├── no-configure-dot-plugins.patch
│ │ ├── no-mkdefs.patch
│ │ └── sfdpgen-free.patch
│ ├── grep/
│ │ └── build.sh
│ ├── gsl/
│ │ └── build.sh
│ ├── gst-plugins-bad/
│ │ └── build.sh
│ ├── gst-plugins-base/
│ │ └── build.sh
│ ├── gst-plugins-good/
│ │ ├── autoplug_libcaca.patch
│ │ └── build.sh
│ ├── gst-plugins-ugly/
│ │ └── build.sh
│ ├── gstreamer/
│ │ └── build.sh
│ ├── gtypist/
│ │ ├── build.sh
│ │ ├── dont_build_manpage.patch
│ │ ├── src-cursmenu.c.patch
│ │ ├── src-gtypist.c.patch
│ │ └── src-utf8.c.patch
│ ├── gumbo-parser/
│ │ └── build.sh
│ ├── gzip/
│ │ ├── build.sh
│ │ ├── fix-gzexe.patch
│ │ ├── lib-stdio-impl.h.patch
│ │ ├── zdiff.in.patch
│ │ └── zgrep.in.patch
│ ├── harfbuzz/
│ │ ├── build.sh
│ │ ├── harfbuzz-icu.subpackage.sh
│ │ └── harfbuzz-utils.subpackage.sh
│ ├── hashdeep/
│ │ ├── PRIu_PRId.patch
│ │ ├── build.sh
│ │ ├── configure.ac.patch
│ │ └── hash.patch
│ ├── help2man/
│ │ └── build.sh
│ ├── hexcurse/
│ │ ├── build.sh
│ │ └── hexcurse.c.patch
│ ├── hexedit/
│ │ └── build.sh
│ ├── hexyl/
│ │ └── build.sh
│ ├── heyu/
│ │ └── build.sh
│ ├── hfsutils/
│ │ ├── build.sh
│ │ ├── lfs.patch
│ │ └── replace_hardlink_with_symlink.patch
│ ├── hiptext/
│ │ ├── artiste.cc.patch
│ │ ├── build.sh
│ │ ├── font.cc.patch
│ │ └── movie.cc.patch
│ ├── hoedown/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── htop/
│ │ ├── build.sh
│ │ └── fix-missing-macros.patch
│ ├── httping/
│ │ ├── build.sh
│ │ ├── fix-spam_file-path.patch
│ │ └── mssl.c.patch
│ ├── httrack/
│ │ ├── build.sh
│ │ ├── htsglobal.h.patch
│ │ └── store.c.patch
│ ├── hub/
│ │ ├── build.sh
│ │ └── utils-utils.go.patch
│ ├── hugo/
│ │ └── build.sh
│ ├── hunspell/
│ │ ├── build.sh
│ │ ├── fix-hardcoded-paths.patch
│ │ └── src-tools-hunspell.cxx.patch
│ ├── hunspell-en-us/
│ │ └── build.sh
│ ├── hunspell-ru/
│ │ └── build.sh
│ ├── hydra/
│ │ ├── build.sh
│ │ └── hydra.c.patch
│ ├── hyperfine/
│ │ └── build.sh
│ ├── icecast/
│ │ ├── build.sh
│ │ └── thread.c.patch
│ ├── imagemagick/
│ │ └── build.sh
│ ├── imgflo/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── env.sh.in.patch
│ │ └── library.c.patch
│ ├── imlib2/
│ │ ├── build.sh
│ │ ├── imlib2-1.5.1_src_bin_imlib2_show.c.patch
│ │ ├── imlib2-1.5.1_src_lib_ximage.c.patch
│ │ ├── imlib2-1.5.1_src_modules_loaders_loader_bz2.c.patch
│ │ ├── imlib2-1.5.1_src_modules_loaders_loader_id3.c.patch
│ │ ├── imlib2-1.5.1_src_modules_loaders_loader_xpm.c.patch
│ │ └── imlib2-1.5.1_src_modules_loaders_loader_zlib.c.patch
│ ├── indent/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ └── code_io.c.patch
│ ├── inetutils/
│ │ ├── build.sh
│ │ ├── configure-pthreads-no-weak.patch
│ │ ├── ftp-getpass.patch
│ │ ├── ftpd.c.patch
│ │ ├── if_index.c.patch
│ │ └── utmp_logout.c.patch
│ ├── inotify-tools/
│ │ ├── build.sh
│ │ └── src-Makefile.am.patch
│ ├── ipcalc/
│ │ └── build.sh
│ ├── iperf3/
│ │ ├── build.sh
│ │ ├── main_Makefile.in.patch
│ │ └── src-iperf_api.c.patch
│ ├── ipfs/
│ │ ├── build.sh
│ │ └── go-ipfs-0.4.15_bin_dist_get.patch
│ ├── ipmitool/
│ │ ├── build.sh
│ │ ├── index-strchr.patch
│ │ └── openssl-1.1.patch
│ ├── ired/
│ │ └── build.sh
│ ├── irssi/
│ │ ├── build.sh
│ │ └── fix-paths.patch
│ ├── isync/
│ │ ├── build.sh
│ │ └── isync.patch
│ ├── iverilog/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ ├── driver-main.c.patch
│ │ └── vvp-Makefile.in.patch
│ ├── jbig2dec/
│ │ └── build.sh
│ ├── jhead/
│ │ └── build.sh
│ ├── joe/
│ │ ├── build.sh
│ │ ├── do_not_build_utils.patch
│ │ ├── fix_errno.patch
│ │ └── no_getpwent.patch
│ ├── jp2a/
│ │ └── build.sh
│ ├── jq/
│ │ └── build.sh
│ ├── json-c/
│ │ └── build.sh
│ ├── json-glib/
│ │ └── build.sh
│ ├── jsoncpp/
│ │ └── build.sh
│ ├── jupp/
│ │ └── build.sh
│ ├── kakoune/
│ │ ├── build.sh
│ │ └── src-cs-path-compat.patch
│ ├── keybase/
│ │ ├── build.sh
│ │ └── go-libkb-env.go.patch
│ ├── keystone/
│ │ └── build.sh
│ ├── kona/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── getline_android.c.patch
│ │ ├── src-0.c.patch
│ │ ├── src-bswap.c.patch
│ │ ├── src-getline.h.patch
│ │ ├── src-kn.c.patch
│ │ ├── src-p.c.patch
│ │ └── src-v.h.patch
│ ├── krb5/
│ │ ├── build.sh
│ │ ├── config-files-kdc.conf.patch
│ │ ├── include-osconf.hin.patch
│ │ ├── krb5-config_LDFLAGS.patch
│ │ ├── netbsd_getpass.c
│ │ ├── plugins-kdb-db2.patch
│ │ └── sethostent.patch
│ ├── kubectl/
│ │ └── build.sh
│ ├── ldc/
│ │ ├── build.sh
│ │ ├── ldc-readme.patch
│ │ ├── ldc-x64-sprintf.patch
│ │ └── tests/
│ │ └── hello_world.sh
│ ├── ldns/
│ │ ├── build.sh
│ │ ├── fix-hardcoded-paths.patch
│ │ └── keys.c.patch
│ ├── ledger/
│ │ └── build.sh
│ ├── leptonica/
│ │ ├── build.sh
│ │ ├── silence-tmpfile-warnings.patch
│ │ └── src-recogbasic.c.patch
│ ├── less/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── less_multilib.patch
│ ├── leveldb/
│ │ └── build.sh
│ ├── lftp/
│ │ ├── build.sh
│ │ ├── lftp_ssl.cc.patch
│ │ ├── lib-vasnprintf.c.patch
│ │ ├── src-Filter.cc.patch
│ │ ├── src-PtyShell.cc.patch
│ │ ├── src-SysCmdJob.cc.patch
│ │ └── src-commands.cc.patch
│ ├── lhasa/
│ │ └── build.sh
│ ├── libandroid-glob/
│ │ ├── build.sh
│ │ ├── glob.c
│ │ └── glob.h
│ ├── libandroid-shmem/
│ │ └── build.sh
│ ├── libandroid-spawn/
│ │ ├── build.sh
│ │ ├── posix_spawn.cpp
│ │ └── posix_spawn.h
│ ├── libandroid-support/
│ │ └── build.sh
│ ├── libao/
│ │ ├── ao_private.h.patch
│ │ ├── ao_pulse.c.patch
│ │ ├── build.sh
│ │ └── configure.ac.patch
│ ├── libarchive/
│ │ ├── archive.h.patch
│ │ ├── archive_entry.h.patch
│ │ ├── archive_string.c.patch
│ │ ├── archive_util.c.patch
│ │ ├── archive_write_disk_posix.c.patch
│ │ ├── archive_write_set_format_zip.c.patch
│ │ ├── bsdtar.subpackage.sh
│ │ └── build.sh
│ ├── libass/
│ │ └── build.sh
│ ├── libassuan/
│ │ └── build.sh
│ ├── libbsd/
│ │ ├── build.sh
│ │ ├── endian.h.patch
│ │ ├── funopen.c.patch
│ │ ├── local-elf.h.patch
│ │ └── nlist.c.patch
│ ├── libbz2/
│ │ ├── build.sh
│ │ ├── bzdiff.patch
│ │ ├── bzip2.subpackage.sh
│ │ ├── cross_compile.patch
│ │ └── shared_library.patch
│ ├── libc++/
│ │ └── build.sh
│ ├── libcaca/
│ │ └── build.sh
│ ├── libcairo/
│ │ ├── android-shmem.patch
│ │ ├── build.sh
│ │ ├── cairo-script-operators.c.patch
│ │ └── fdr.c.patch
│ ├── libcap/
│ │ ├── build.sh
│ │ ├── libcap-makefile.patch
│ │ └── progs-capsh.patch
│ ├── libcln/
│ │ ├── build.sh
│ │ ├── revert_configure_tests.patch
│ │ ├── src-base-low-cl_low_div.cc.patch
│ │ └── src-base-low-cl_low_mul.cc.patch
│ ├── libcoap/
│ │ └── build.sh
│ ├── libconfig/
│ │ └── build.sh
│ ├── libconfuse/
│ │ └── build.sh
│ ├── libcroco/
│ │ └── build.sh
│ ├── libcrypt/
│ │ ├── build.sh
│ │ ├── crypt.h
│ │ └── crypt3.c
│ ├── libcue/
│ │ └── build.sh
│ ├── libcurl/
│ │ ├── build.sh
│ │ └── curl.subpackage.sh
│ ├── libdav1d/
│ │ └── build.sh
│ ├── libdb/
│ │ ├── build.sh
│ │ ├── db.subpackage.sh
│ │ ├── fix-tmpdir.patch
│ │ ├── lang-sql-generated-sqlite3.c.patch
│ │ └── lang-sql-sqlite-src-os_unix.c.patch
│ ├── libdispatch/
│ │ ├── build.sh
│ │ └── src-CMakeLists.txt.patch
│ ├── libduktape/
│ │ ├── build.sh
│ │ └── duktape.subpackage.sh
│ ├── libedit/
│ │ ├── build.sh
│ │ ├── src-readline.c.patch
│ │ └── src-vi.c.patch
│ ├── libelf/
│ │ ├── aligned_alloc.c
│ │ ├── build.sh
│ │ ├── dwfl_error.c.patch
│ │ ├── elf_getarsym.c.patch
│ │ ├── elf_update.c.patch
│ │ ├── error.h
│ │ ├── lib-color.c.patch
│ │ ├── libdwflP.h.patch
│ │ ├── libelfmakefile.am.patch
│ │ ├── obstack.h
│ │ ├── qsort_r.h
│ │ ├── ranlib.c.patch
│ │ ├── src-readelf.c.patch
│ │ ├── stdio_ext.h
│ │ ├── strings.c.patch
│ │ ├── strip.c.patch
│ │ └── unstrip.c.patch
│ ├── libev/
│ │ ├── Makefile.in.patch
│ │ └── build.sh
│ ├── libevent/
│ │ ├── build.sh
│ │ ├── evdns.c.patch
│ │ ├── evutil.c.patch
│ │ └── evutil_rand.c.patch
│ ├── libexif/
│ │ └── build.sh
│ ├── libexpat/
│ │ └── build.sh
│ ├── libffi/
│ │ └── build.sh
│ ├── libflac/
│ │ ├── build.sh
│ │ └── flac.subpackage.sh
│ ├── libgc/
│ │ ├── build.sh
│ │ └── include-private-gcconfig.h.patch
│ ├── libgcrypt/
│ │ ├── build.sh
│ │ └── fix-hardcoded-paths.patch
│ ├── libgd/
│ │ └── build.sh
│ ├── libgfshare/
│ │ └── build.sh
│ ├── libgit2/
│ │ ├── build.sh
│ │ └── fix-etc-dir-path.patch
│ ├── libgmime/
│ │ ├── build.sh
│ │ └── iconv-detect.h.patch
│ ├── libgmp/
│ │ └── build.sh
│ ├── libgnutls/
│ │ ├── build.sh
│ │ └── gnutls.subpackage.sh
│ ├── libgpg-error/
│ │ ├── atexit.patch
│ │ ├── build.sh
│ │ ├── gawk5.0-support.patch
│ │ └── lock-obj-pub.aarch64-unknown-linux-android.h
│ ├── libgraphite/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ └── src-CMakeLists.txt.patch
│ ├── libgrpc/
│ │ ├── CMakeLists.txt.diff
│ │ ├── CMakeLists.txt.patch
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── fix-arg-list-too-long.patch.beforehostbuild
│ │ ├── log_android.cc.patch
│ │ └── src-core-lib-grpc-wrap_memcpy.cc.patch
│ ├── libgsasl/
│ │ └── build.sh
│ ├── libical/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ └── src-libical-CMakeLists.txt.patch
│ ├── libiconv/
│ │ ├── build.sh
│ │ └── iconv.subpackage.sh
│ ├── libicu/
│ │ ├── build.sh
│ │ └── icu-devtools.subpackage.sh
│ ├── libid3tag/
│ │ └── build.sh
│ ├── libidn/
│ │ └── build.sh
│ ├── libidn2/
│ │ └── build.sh
│ ├── libisl/
│ │ └── build.sh
│ ├── libjansson/
│ │ └── build.sh
│ ├── libjasper/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ └── libjasper-utils.subpackage.sh
│ ├── libjpeg-turbo/
│ │ ├── build.sh
│ │ └── libjpeg-turbo-progs.subpackage.sh
│ ├── libksba/
│ │ └── build.sh
│ ├── libllvm/
│ │ ├── ORCv2.rst.patch
│ │ ├── build.sh
│ │ ├── clang.subpackage.sh
│ │ ├── cxx-libm.patch
│ │ ├── lld.subpackage.sh
│ │ ├── llvm-config.in
│ │ ├── llvm.subpackage.sh
│ │ ├── nl_types.h
│ │ ├── nltypes_stubs.cpp
│ │ ├── openmp-config-ix-m32.patch
│ │ ├── project-openmp-runtime-src-CMakeLists.txt.patch
│ │ ├── tools-clang-lib-Driver-ToolChain.cpp.patch
│ │ ├── tools-clang-lib-Driver-ToolChains-Gnu.cpp.patch
│ │ ├── tools-clang-lib-Driver-ToolChains-Linux.cpp.patch
│ │ └── tools-llvm-shlib-CMakeLists.txt.patch
│ ├── liblua/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── fix-lua_tmpnametemplate.patch
│ │ ├── lua.subpackage.sh
│ │ ├── src-Makefile.patch
│ │ ├── src-loslib.c.patch
│ │ └── src-luaconf.h.patch
│ ├── liblua52/
│ │ ├── build.sh
│ │ ├── lua-5.2.4_Makefile.patch
│ │ ├── lua-5.2.4_src_Makefile.patch
│ │ ├── lua-5.2.4_src_loslib.c.patch
│ │ ├── lua-5.2.4_src_luaconf.h.patch
│ │ ├── lua.pc.in
│ │ └── lua52.subpackage.sh
│ ├── libluajit/
│ │ ├── build.sh
│ │ ├── etc-luajit.pc.patch
│ │ ├── luajit.subpackage.sh
│ │ └── src-Makefile.patch
│ ├── liblz4/
│ │ ├── Makefile.inc.patch
│ │ ├── build.sh
│ │ └── lz4.subpackage.sh
│ ├── liblzma/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── xz-utils.subpackage.sh
│ ├── liblzo/
│ │ └── build.sh
│ ├── libmaa/
│ │ ├── build.sh
│ │ └── libmaa.patch
│ ├── libmad/
│ │ └── build.sh
│ ├── libmaxminddb/
│ │ ├── build.sh
│ │ └── libmaxminddb-tools.subpackage.sh
│ ├── libmcrypt/
│ │ └── build.sh
│ ├── libmesode/
│ │ └── build.sh
│ ├── libmhash/
│ │ └── build.sh
│ ├── libmicrohttpd/
│ │ └── build.sh
│ ├── libmnl/
│ │ └── build.sh
│ ├── libmosquitto/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ └── mosquitto.subpackage.sh
│ ├── libmp3lame/
│ │ ├── build.sh
│ │ └── lame.subpackage.sh
│ ├── libmp3splt/
│ │ └── build.sh
│ ├── libmpc/
│ │ └── build.sh
│ ├── libmpdclient/
│ │ └── build.sh
│ ├── libmpfr/
│ │ └── build.sh
│ ├── libmsgpack/
│ │ └── build.sh
│ ├── libnet/
│ │ └── build.sh
│ ├── libnettle/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── nettle.subpackage.sh
│ ├── libnfs/
│ │ ├── add-timeh.patch
│ │ └── build.sh
│ ├── libnftnl/
│ │ └── build.sh
│ ├── libnghttp2/
│ │ └── build.sh
│ ├── libnl/
│ │ ├── build.sh
│ │ ├── include-netlink-private-netlink.h.patch
│ │ ├── nf-log.c.patch
│ │ ├── nf-monitor.c.patch
│ │ ├── nf-queue.c.patch
│ │ └── nl-monitor.c.patch
│ ├── libnpth/
│ │ └── build.sh
│ ├── libogg/
│ │ └── build.sh
│ ├── liboggz/
│ │ └── build.sh
│ ├── libopus/
│ │ └── build.sh
│ ├── libopusenc/
│ │ └── build.sh
│ ├── libotr/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── libpcap/
│ │ ├── build.sh
│ │ └── fix-path-etc-ethers.patch
│ ├── libpipeline/
│ │ └── build.sh
│ ├── libpixman/
│ │ ├── build.sh
│ │ └── pixman-arm.c.patch
│ ├── libpng/
│ │ └── build.sh
│ ├── libpopt/
│ │ ├── build.sh
│ │ └── fix-hardcoded-paths.patch
│ ├── libprotobuf/
│ │ ├── build.sh
│ │ ├── protobuf.subpackage.sh
│ │ └── remove-android-logging.patch
│ ├── libprotobuf-c/
│ │ └── build.sh
│ ├── libpsl/
│ │ ├── build-fix.patch
│ │ └── build.sh
│ ├── libqrencode/
│ │ └── build.sh
│ ├── librsvg/
│ │ └── build.sh
│ ├── librsync/
│ │ ├── build.sh
│ │ └── rdiff.subpackage.sh
│ ├── libsasl/
│ │ ├── auth_getpwent.c.patch
│ │ └── build.sh
│ ├── libsearpc/
│ │ ├── build.sh
│ │ └── lib-Makefile.am.patch
│ ├── libsignal-protocol-c/
│ │ └── build.sh
│ ├── libsigsegv/
│ │ └── build.sh
│ ├── libsndfile/
│ │ ├── Makefile.am.patch
│ │ ├── autogen.sh.patch
│ │ ├── build.sh
│ │ └── tmpdir.patch
│ ├── libsodium/
│ │ └── build.sh
│ ├── libsoup/
│ │ └── build.sh
│ ├── libsoxr/
│ │ ├── build.sh
│ │ └── go.patch
│ ├── libsqlite/
│ │ ├── build.sh
│ │ ├── sqlite.subpackage.sh
│ │ └── sqlite3.c.patch
│ ├── libssh/
│ │ ├── build.sh
│ │ └── fix-paths.patch
│ ├── libssh2/
│ │ └── build.sh
│ ├── libtalloc/
│ │ ├── build.sh
│ │ ├── lib-replace-wscript.patch
│ │ └── wscript.patch
│ ├── libtermkey/
│ │ └── build.sh
│ ├── libtiff/
│ │ ├── build.sh
│ │ └── libtiff-utils.subpackage.sh
│ ├── libtool/
│ │ ├── build.sh
│ │ └── libltdl.subpackage.sh
│ ├── libunibilium/
│ │ └── build.sh
│ ├── libunistring/
│ │ └── build.sh
│ ├── libusb/
│ │ └── build.sh
│ ├── libuuid/
│ │ ├── build.sh
│ │ ├── gen_uuid.c.patch
│ │ └── uuidP.h.patch
│ ├── libuv/
│ │ ├── build.sh
│ │ ├── pthread-sigmask.patch
│ │ └── src-unix-fs.c.patch
│ ├── libvorbis/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── libvpx/
│ │ ├── arm_cpudetect-always-neon.patch
│ │ ├── build-make-configure.sh.patch
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── libvterm/
│ │ └── build.sh
│ ├── libwebp/
│ │ ├── CMakeLists.txt.patch
│ │ └── build.sh
│ ├── libwebsockets/
│ │ └── build.sh
│ ├── libx11/
│ │ ├── build.sh
│ │ ├── src-CrGlCur.c.patch
│ │ └── src-XlibInt.c.patch
│ ├── libx264/
│ │ ├── build.sh
│ │ └── x264.subpackage.sh
│ ├── libx265/
│ │ ├── build.sh
│ │ ├── source-CMakeLists.txt.patch
│ │ └── x265.subpackage.sh
│ ├── libxapian/
│ │ ├── build.sh
│ │ └── xapian-tools.subpackage.sh
│ ├── libxau/
│ │ ├── build.sh
│ │ └── libXau-1.0.8_AuLock.c.patch
│ ├── libxcb/
│ │ ├── build.sh
│ │ ├── libxcb-1.12_configure.patch
│ │ └── libxcb-1.12_src_xcb_util.c.patch
│ ├── libxdmcp/
│ │ └── build.sh
│ ├── libxext/
│ │ └── build.sh
│ ├── libxft/
│ │ └── build.sh
│ ├── libxml2/
│ │ ├── build.sh
│ │ ├── fix-catalog-paths.patch
│ │ └── libxml2-utils.subpackage.sh
│ ├── libxrender/
│ │ └── build.sh
│ ├── libxslt/
│ │ ├── build.sh
│ │ └── xsltproc.subpackage.sh
│ ├── libxss/
│ │ └── build.sh
│ ├── libyaml/
│ │ └── build.sh
│ ├── libzip/
│ │ └── build.sh
│ ├── libzmq/
│ │ └── build.sh
│ ├── libzopfli/
│ │ ├── build.sh
│ │ └── zopfli.subpackage.sh
│ ├── lighttpd/
│ │ └── build.sh
│ ├── links/
│ │ ├── build.sh
│ │ └── fix-hardcoded-paths.patch
│ ├── linux-man-pages/
│ │ └── build.sh
│ ├── littlecms/
│ │ ├── build.sh
│ │ └── littlecms-utils.subpackage.sh
│ ├── llbuild/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ ├── include-llbuild-BuildSystem-BuildSystemFrontend.h.patch
│ │ ├── include-llvm-Config-config.h.patch
│ │ ├── lib-Basic-PlatformUtility.cpp.patch
│ │ ├── lib-llvm-Support-CmakeLists.txt.patch
│ │ └── products-llbuild-CMakeLists.txt.patch
│ ├── lldb/
│ │ ├── ArchSpec.cpp.patch
│ │ ├── Editline.h.patch
│ │ ├── LLDBStandalone.cmake.patch
│ │ ├── ProcessLauncherPosixFork.cpp.patch
│ │ ├── build.sh
│ │ └── cmakelists.txt.patch
│ ├── lnd/
│ │ └── build.sh
│ ├── loksh/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── clock_monotonic.patch
│ │ ├── fix-hardcoded-paths.patch
│ │ └── no-cs_path.patch
│ ├── ltrace/
│ │ ├── build.sh
│ │ ├── ltrace-elf.c.patch
│ │ └── sysdeps-linux-gnu-proc.c.patch
│ ├── lua-lpeg/
│ │ ├── build.sh
│ │ └── makefile.patch
│ ├── luarocks/
│ │ ├── GNUmakefile.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── lua.lua.patch
│ │ ├── src-luarocks-core-cfg.lua.patch
│ │ └── unix-tools.lua.patch
│ ├── luv/
│ │ ├── CMakeLists.txt.patch
│ │ └── build.sh
│ ├── lynx/
│ │ ├── build.sh
│ │ ├── fix-paths.patch
│ │ ├── lynx2.8.9dev.19_WWW_Library_Implementation_www_tcp.h.patch
│ │ ├── lynx2.8.9dev.19_src_LYMain.c.patch
│ │ └── lynx2.8.9dev.19_userdefs.h.patch
│ ├── lzip/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── lzlib/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── lzop/
│ │ └── build.sh
│ ├── m4/
│ │ ├── build.sh
│ │ ├── fix-paths.patch
│ │ ├── lib-vasnprintf.c.patch
│ │ ├── lib-xalloc-oversized.h.patch
│ │ └── spawn.patch
│ ├── make/
│ │ ├── build.sh
│ │ ├── make.patch
│ │ └── no-append.patch
│ ├── man/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── main.c.patch
│ │ ├── mandocdb.c.patch
│ │ ├── tag.c.patch
│ │ └── tag.h.patch
│ ├── mariadb/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ ├── client-CMakeLists.txt.patch
│ │ ├── client-mysql.cc.patch
│ │ ├── cmake-install_layout.cmake.patch
│ │ ├── cmake-mariadb_connector_c.cmake.patch.beforehostbuild
│ │ ├── cmake-pcre.cmake.patch
│ │ ├── cmake-readline.cmake.patch
│ │ ├── etc-my.cnf.patch
│ │ ├── libmariadb-libmariadb-CMakeLists.txt.patch
│ │ ├── scripts-mysql_install_db.sh.patch
│ │ └── sql-CMakeLists.txt.patch
│ ├── mathomatic/
│ │ ├── build.sh
│ │ └── fix-paths.patch
│ ├── mbedtls/
│ │ └── build.sh
│ ├── mc/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── filegui_magics.patch
│ │ ├── filemanager_ext.c.patch
│ │ ├── lib-shell.c.patch
│ │ ├── lib-tty-key.c.patch
│ │ ├── lib-tty-tty.c.patch
│ │ ├── lib-utilunix.c.patch
│ │ ├── lib-widget-input_complete.c.patch
│ │ ├── man2hlp.in.patch
│ │ ├── src-filemanager-achown.c.patch
│ │ ├── src-filemanager-chown.c.patch
│ │ ├── src-filemanager-file.c.patch
│ │ ├── src-usermenu.c.patch
│ │ ├── src-vfs-sfs-sfs.c.patch
│ │ ├── tmpdir_default.patch
│ │ └── use-python2-for-extfs-helpers.patch
│ ├── mdp/
│ │ └── build.sh
│ ├── megatools/
│ │ ├── build.sh
│ │ └── lib-mega.c.patch
│ ├── memcached/
│ │ ├── build.sh
│ │ ├── getsubopt.c
│ │ ├── getsubopt.h
│ │ └── memcached.c.patch
│ ├── mg/
│ │ ├── GNUmakefile.patch
│ │ └── build.sh
│ ├── micro/
│ │ └── build.sh
│ ├── mime-support/
│ │ └── build.sh
│ ├── minicom/
│ │ ├── build.sh
│ │ ├── dial.c.patch
│ │ ├── file.c.patch
│ │ ├── getdir.c.patch
│ │ ├── getdir.h.patch
│ │ ├── script.h.patch
│ │ └── wkeys.c.patch
│ ├── miniupnpc/
│ │ ├── build.sh
│ │ ├── miniupnpc-2.1_minissdpc.c.patch
│ │ └── miniupnpc-2.1_miniupnpc.c.patch
│ ├── mksh/
│ │ ├── build.sh
│ │ └── sh.h.patch
│ ├── mktorrent/
│ │ ├── build.sh
│ │ └── seekdir_telldir.patch
│ ├── mlocate/
│ │ ├── build.sh
│ │ ├── conf.c.patch
│ │ ├── no_getid.patch
│ │ ├── src-locate.c.patch
│ │ └── updatedb.c.patch
│ ├── morse2ascii/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── mosh/
│ │ ├── build.sh
│ │ ├── mosh-server.cc.patch
│ │ ├── mosh.cc
│ │ ├── mosh.pl.patch
│ │ └── src-network-network.cc.patch
│ ├── mp3splt/
│ │ └── build.sh
│ ├── mpc/
│ │ ├── build.sh
│ │ └── meson.build.patch
│ ├── mpd/
│ │ ├── HybridDsdDecoderPlugin.cxx.patch
│ │ ├── build.sh
│ │ ├── doc-mpdconf.example.patch
│ │ ├── mpd-script.sh
│ │ ├── registry.cxx.patch
│ │ ├── src-fs-io-FileOutputStream.hxx.patch
│ │ ├── src-input-Error.cxx.patch
│ │ ├── src-lib-gcrypt-meson.build.patch
│ │ ├── src-output-plugins-meson.build.patch
│ │ └── thread-Util.cxx.patch
│ ├── mpdscribble/
│ │ ├── Makefile.am.patch
│ │ ├── build.sh
│ │ ├── file.c.patch
│ │ └── mpdscribble.conf.patch
│ ├── mpv/
│ │ ├── build.sh
│ │ ├── main.c.patch
│ │ ├── mpv.conf
│ │ └── wscript.patch
│ ├── msmtp/
│ │ └── build.sh
│ ├── mtd-utils/
│ │ ├── build.sh
│ │ └── mkfs.jffs2.c.patch
│ ├── mtools/
│ │ ├── build.sh
│ │ └── sysinc.patch
│ ├── mu/
│ │ └── build.sh
│ ├── multitail/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── mt.c.patch
│ │ ├── my_pty.c.patch
│ │ ├── term.c.patch
│ │ └── utils.c.patch
│ ├── mutt/
│ │ ├── build.sh
│ │ ├── getdomain.c.patch
│ │ ├── init.c.patch
│ │ ├── lib.c.patch
│ │ ├── muttlib.c.patch
│ │ └── smime_keys_path.patch
│ ├── myrepos/
│ │ └── build.sh
│ ├── nano/
│ │ ├── build.sh
│ │ ├── src-files.c.patch
│ │ └── src-text.c.patch
│ ├── ncdc/
│ │ └── build.sh
│ ├── ncdu/
│ │ └── build.sh
│ ├── ncmpcpp/
│ │ ├── build.sh
│ │ ├── config.patch
│ │ ├── configure.ac.patch
│ │ ├── locale.patch
│ │ ├── ncmpcpp.cpp.patch
│ │ └── settings.cpp.patch
│ ├── ncompress/
│ │ └── build.sh
│ ├── ncurses/
│ │ ├── build.sh
│ │ ├── fix-paths.patch
│ │ ├── ncurses-tinfo-lib_setup.c.patch
│ │ ├── ncurses-tinfo-tinfo_driver.c.patch
│ │ ├── ncurses-ui-libs-static.subpackage.sh
│ │ ├── ncurses-ui-libs.subpackage.sh
│ │ └── ncurses-utils.subpackage.sh
│ ├── ndk-multilib/
│ │ └── build.sh
│ ├── ndk-sysroot/
│ │ ├── build.sh
│ │ └── math-header.diff
│ ├── ne/
│ │ └── build.sh
│ ├── neofetch/
│ │ └── build.sh
│ ├── neovim/
│ │ ├── build.sh
│ │ ├── runtime-CMakeLists.txt.patch
│ │ ├── runtime-autoload-man.vim.patch
│ │ ├── runtime-autoload-provider-clipboard.vim.patch
│ │ ├── src-nvim-os-stdpaths.c.patch
│ │ └── sysinit.vim
│ ├── net-tools/
│ │ ├── arp.c.patch
│ │ ├── build.sh
│ │ ├── ifconfig.c.patch
│ │ ├── lib-inet.c.patch
│ │ ├── lib-inet6.c.patch
│ │ ├── lib-inet6_sr.c.patch
│ │ ├── lib-pathnames.h.patch
│ │ ├── nameif.c.patch
│ │ ├── rarp.c.patch
│ │ ├── slattach.c.patch
│ │ └── unknown_state.patch
│ ├── netpbm/
│ │ ├── GNUmakefile.patch
│ │ ├── build.sh
│ │ ├── buildtools-Makefile.patch
│ │ ├── buildtools-installnetpbm.pl.patch
│ │ ├── camera.c.patch
│ │ ├── lib-Makefile.patch
│ │ ├── standardppmdfont.c
│ │ └── util.c.patch
│ ├── netsed/
│ │ └── build.sh
│ ├── newsboat/
│ │ ├── Makefile.patch
│ │ ├── avoid-gettext.patch
│ │ ├── build.sh
│ │ ├── fix-paths.patch
│ │ └── mbc-buffer-length-fix.patch
│ ├── nginx/
│ │ ├── Android-crossfile.patch32
│ │ ├── Android-crossfile.patch64
│ │ ├── auto-threads.patch
│ │ ├── build.sh
│ │ ├── cross-compile-nginx.patch
│ │ ├── src-core-ngx_cycle.c.patch
│ │ ├── src-core-ngx_file.c.patch
│ │ └── src-event-modules-ngx_epoll_module.c.patch
│ ├── nim/
│ │ ├── build.sh
│ │ └── osproc.nim.patch
│ ├── ninja/
│ │ ├── build.sh
│ │ ├── src-subprocess-posix.cc.patch
│ │ └── src-util.cc.patch
│ ├── nmap/
│ │ ├── build.sh
│ │ ├── fix-paths.patch
│ │ ├── netcat.subpackage.sh
│ │ └── nping-EchoServer.cc.patch
│ ├── nnn/
│ │ └── build.sh
│ ├── nodejs/
│ │ ├── build.sh
│ │ ├── configure.py.patch
│ │ ├── deps-uv-src-unix-core.c.patch
│ │ ├── deps-uv-src-unix-process.c.patch
│ │ ├── deps-uv-uv.gyp.patch
│ │ ├── deps-v8-src-flags-flag-definitions.h.patch
│ │ ├── deps-v8-src-logging-log.cc.patch
│ │ ├── fix_multiple_definitions.patch
│ │ ├── lib-child_process.js.patch
│ │ ├── lib-os.js.patch
│ │ ├── node.gyp.patch
│ │ ├── npm-link-patch.patch
│ │ ├── src-cares_wrap.cc.patch
│ │ ├── src-node_internals.h.patch
│ │ ├── src-node_main.cc.patch
│ │ └── tools-v8_gypfiles-v8.gyp.patch
│ ├── nodejs-lts/
│ │ ├── build.sh
│ │ ├── configure.py.patch
│ │ ├── deps-uv-src-unix-core.c.patch
│ │ ├── deps-uv-uv.gyp.patch
│ │ ├── deps-v8-src-flags-flag-definitions.h.patch
│ │ ├── deps-v8-src-logging-log.cc.patch
│ │ ├── fix_multiple_definitions.patch
│ │ ├── lib-child_process.js.patch
│ │ ├── lib-os.js.patch
│ │ ├── node.gyp.patch
│ │ ├── npm-link-patch.patch
│ │ ├── src-cares_wrap.cc.patch
│ │ ├── src-node_internals.h.patch
│ │ ├── src-node_main.cc.patch
│ │ └── tools-v8_gypfiles-v8.gyp.patch
│ ├── notmuch/
│ │ ├── Makefile.global.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── notmuch-config.c.patch
│ ├── nyancat/
│ │ ├── build.sh
│ │ └── makefile.patch
│ ├── nzbget/
│ │ ├── build.sh
│ │ └── options.cpp.patch
│ ├── oathtool/
│ │ └── build.sh
│ ├── obfs4proxy/
│ │ └── build.sh
│ ├── ocrad/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── odt2txt/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── oleo/
│ │ ├── basic.h.patch
│ │ ├── build.sh
│ │ ├── global.h.patch
│ │ ├── io-term.c.patch
│ │ ├── io-term.h.patch
│ │ ├── plotter.c.patch
│ │ ├── texi2html.in.patch
│ │ └── xrdb.c.patch
│ ├── openal-soft/
│ │ ├── alc-alconfig.cpp.patch
│ │ ├── build.sh
│ │ └── native-tools-CMakeLists.txt.patch
│ ├── openjpeg/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ └── openjpeg-tools.subpackage.sh
│ ├── openssh/
│ │ ├── Makefile.in.patch
│ │ ├── auth.c.patch
│ │ ├── auth2-passwd.c.patch
│ │ ├── build.sh
│ │ ├── fix-hardcoded-paths.patch
│ │ ├── hostfile.c.patch
│ │ ├── misc_c.patch
│ │ ├── mux.c.patch
│ │ ├── no_loginrec.patch
│ │ ├── no_tty_chmod.patch
│ │ ├── openbsd-compat-explicit_bzero.c.patch
│ │ ├── openbsd-compat-xcrypt.c.patch
│ │ ├── servconf.c.patch
│ │ ├── session.c.patch
│ │ ├── sftp-server.c.patch
│ │ ├── sftp-with-agent.sh
│ │ ├── source-ssh-agent.sh
│ │ ├── ssh-agent.c.patch
│ │ ├── ssh-keygen.c.patch
│ │ ├── ssh-with-agent.sh
│ │ ├── sshd.c.patch
│ │ └── sshd_config.5.patch
│ ├── openssl/
│ │ ├── Configurations-15-android.conf.patch
│ │ ├── add-trusted-certificate
│ │ ├── apps-ocsp.c.patch
│ │ ├── build.sh
│ │ ├── crypto-armcap.c.patch
│ │ ├── e_os.h.patch
│ │ └── openssl-tool.subpackage.sh
│ ├── optipng/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── opus-tools/
│ │ └── build.sh
│ ├── opusfile/
│ │ └── build.sh
│ ├── ossp-uuid/
│ │ ├── build.sh
│ │ ├── ossp.patch
│ │ ├── uuid-aarch64.patch
│ │ └── z-no-docs-no-strip.patch
│ ├── p7zip/
│ │ ├── 1-CVE-2016-9296.patch
│ │ ├── 2-CVE-2017-17969.patch
│ │ ├── 3-CVE-2018-5996.patch
│ │ ├── 4-CVE-2018-10115.patch
│ │ ├── build.sh
│ │ └── makefile.patch
│ ├── pango/
│ │ ├── bsearch-fix.patch
│ │ ├── build.sh
│ │ └── pango-view.1
│ ├── par2/
│ │ └── build.sh
│ ├── parallel/
│ │ ├── build.sh
│ │ ├── parallel.patch
│ │ └── sem.patch
│ ├── parted/
│ │ ├── 01_devmapper.patch
│ │ ├── 02_lseek.patch
│ │ ├── 03_minormajor.patch
│ │ ├── build.sh
│ │ └── configure-pthreads-no-weak.patch
│ ├── pass/
│ │ ├── build.sh
│ │ └── src-password-store.sh.patch
│ ├── pass-otp/
│ │ └── build.sh
│ ├── pastebinit/
│ │ ├── build.sh
│ │ └── pastebinit.patch
│ ├── patch/
│ │ ├── build.sh
│ │ └── tmpdir-path.patch
│ ├── patchelf/
│ │ └── build.sh
│ ├── pathpicker/
│ │ └── build.sh
│ ├── pcre/
│ │ ├── build.sh
│ │ └── libpcreposix.subpackage.sh
│ ├── pcre2/
│ │ └── build.sh
│ ├── pdfgrep/
│ │ └── build.sh
│ ├── perl/
│ │ ├── Cwd.pm.patch
│ │ ├── build.sh
│ │ ├── cnf-configure_func.sh.patch
│ │ ├── cnf-configure_path.sh.patch
│ │ ├── file-spec-unix.pm.patch
│ │ └── perlio.c.patch
│ ├── pforth/
│ │ └── build.sh
│ ├── php/
│ │ ├── Makefile.global.patch
│ │ ├── build.sh
│ │ ├── ext-opcache-config.m4.patch
│ │ ├── ext-opcache-zend_accelerator_module.c.patch
│ │ ├── ext-pdo_pgsql-config.m4.patch
│ │ ├── ext-pgsql-config.m4.patch
│ │ ├── ext-phar-Makefile.frag.patch
│ │ ├── ext-posix-posix.c.patch
│ │ ├── ext-standard-basic_functions.c.patch
│ │ ├── ext-standard-dns.c.patch
│ │ ├── ext-standard-php_fopen_wrapper.c.patch
│ │ ├── ext-standard-proc_open.c.patch
│ │ ├── iconv-config.m4.patch
│ │ ├── pear-Makefile.frag.patch
│ │ ├── php-apache.subpackage.sh
│ │ ├── php-fpm.patch
│ │ ├── php-fpm.subpackage.sh
│ │ ├── php-pgsql.subpackage.sh
│ │ └── sapi-apache2handler-config.m4.patch
│ ├── pianobar/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── pick/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── pick.c.patch
│ ├── picolisp/
│ │ ├── build.sh
│ │ ├── src-Makefile.patch
│ │ ├── src-ext.c.patch
│ │ └── src64-mkAsm.patch
│ ├── pigz/
│ │ ├── build.sh
│ │ ├── pigz-2.4_Makefile.patch
│ │ └── pigz-2.4_yarn.c.patch
│ ├── pinentry/
│ │ ├── build.sh
│ │ ├── pinentry-emacs.c.patch
│ │ └── pinentry-pinentry.c.patch
│ ├── pkg-config/
│ │ └── build.sh
│ ├── play-audio/
│ │ └── build.sh
│ ├── plzip/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── pngquant/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── poppler/
│ │ ├── build.sh
│ │ ├── gstrtod.cc.patch
│ │ └── poppler-Form.cc.patch
│ ├── postgresql/
│ │ ├── build.sh
│ │ ├── src-backend-Makefile.patch
│ │ ├── src-backend-commands-collationcmds.c.patch
│ │ ├── src-bin-initdb-initdb.c.patch
│ │ ├── src-bin-pg_ctl-pg_ctl.c.patch
│ │ ├── src-bin-pg_upgrade-check.c.patch
│ │ ├── src-bin-psql-command.c.patch
│ │ ├── src-include-pg_config_manual.h.patch
│ │ └── src-timezone-zic.c.patch.beforehostbuild
│ ├── potrace/
│ │ └── build.sh
│ ├── privoxy/
│ │ ├── GNUmakefile.in.patch
│ │ ├── build.sh
│ │ ├── jcc.c.patch
│ │ └── project.h.patch
│ ├── procps/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ ├── pgrep.c.patch
│ │ ├── pmap.c.patch
│ │ ├── proc-sysinfo.c.patch
│ │ ├── procio.c.patch
│ │ ├── sysctl.c.patch
│ │ ├── top-top.c.patch
│ │ └── w.c.patch
│ ├── profanity/
│ │ ├── build.sh
│ │ ├── cmd_funcs.c.patch
│ │ └── ui-inputwin.c.patch
│ ├── progress/
│ │ ├── Makefile.patch
│ │ ├── WithoutWordexp.patch
│ │ └── build.sh
│ ├── proot/
│ │ ├── build.sh
│ │ └── termux-chroot
│ ├── proxychains-ng/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── hostreader.c.patch
│ │ └── libproxychains.c.patch
│ ├── psmisc/
│ │ ├── build.sh
│ │ ├── pstree.patch
│ │ └── src-fuser.c.patch
│ ├── pulseaudio/
│ │ ├── 0001-atomic-Explicitly-cast-void-to-unsigned-long.patch
│ │ ├── aaudio.patch
│ │ ├── build.sh
│ │ ├── fix-paths.patch
│ │ ├── module-aaudio-sink.c
│ │ ├── module-sles-sink.c
│ │ ├── module-sles-source.c
│ │ ├── no_priv_drop.patch
│ │ └── sles.patch
│ ├── pure-ftpd/
│ │ ├── build.sh
│ │ ├── pure-pwconvert.c.patch
│ │ ├── src-ftpd.h.patch
│ │ └── src-ftpd_p.h.patch
│ ├── pv/
│ │ ├── build.sh
│ │ ├── header.in.patch
│ │ └── src-pv-cursor.c.patch
│ ├── pwgen/
│ │ └── build.sh
│ ├── python/
│ │ ├── 0001-compileall-Fix-ddir-when-recursing.patch
│ │ ├── Lib-pathlib.py.patch
│ │ ├── Lib-subprocess.py.patch
│ │ ├── Lib-tmpfile.py.patch
│ │ ├── Modules-socketmodule.c.patch
│ │ ├── _cursesmodule.c.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── cryptmodule.c.patch
│ │ ├── distutils-command-build.py.patch
│ │ ├── fix-paths.patch
│ │ ├── python-tkinter.subpackage.sh
│ │ └── setup.py.patch
│ ├── python2/
│ │ ├── Lib-subprocess.py.patch
│ │ ├── Lib-tempfile.py.patch
│ │ ├── Makefile.pre.in.patch
│ │ ├── Modules-pwdmodule.c.patch
│ │ ├── Python-bltinmodule.c.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── cryptmodule.c.patch
│ │ ├── fix-dlfcn.patch32
│ │ ├── fix-dlfcn.patch64
│ │ ├── fix-paths.patch
│ │ └── setup.py.patch
│ ├── qalc/
│ │ ├── build.sh
│ │ └── util.cc.patch
│ ├── qpdf/
│ │ └── build.sh
│ ├── quickjs/
│ │ └── build.sh
│ ├── radare2/
│ │ ├── 5d76b9ff992b1b7dd64b1ccb89afa40318ff25fa.patch
│ │ ├── build.sh
│ │ ├── f639c3b6a17a57c9a0fa1790811eff27dd124b59.patch
│ │ ├── libr-core-cconfig.c.patch
│ │ ├── libr-include-r_magic.h.patch
│ │ ├── libr-util-diff.c.patch
│ │ ├── libr-util-file.c.patch
│ │ ├── libr-util-sandbox.c.patch
│ │ ├── mk-termux-host.mk.patch
│ │ └── sys-ldconfig.sh.patch
│ ├── ragel/
│ │ └── build.sh
│ ├── ranger/
│ │ ├── build.sh
│ │ ├── ranger-core-actions.py.patch
│ │ └── ranger.patch
│ ├── rclone/
│ │ └── build.sh
│ ├── rcs/
│ │ ├── build.sh
│ │ └── noreturn.patch
│ ├── readline/
│ │ ├── build.sh
│ │ ├── inputrc
│ │ └── rlconf.h.patch
│ ├── redir/
│ │ ├── build.sh
│ │ └── redir.c.patch
│ ├── redis/
│ │ ├── bio.c.patch
│ │ ├── build.sh
│ │ ├── config.h.patch
│ │ ├── redis.conf.patch
│ │ ├── src-Makefile.patch
│ │ └── src-server.h.patch
│ ├── remind/
│ │ └── build.sh
│ ├── resolv-conf/
│ │ └── build.sh
│ ├── restic/
│ │ └── build.sh
│ ├── rgbds/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── rhash/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── librhash-byte_order.h.patch
│ │ └── parse_cmdline.c.patch
│ ├── ripgrep/
│ │ └── build.sh
│ ├── rlwrap/
│ │ ├── build.sh
│ │ ├── fix-hardcoded-paths.patch
│ │ └── ptytty.c.patch
│ ├── root-repo/
│ │ └── build.sh
│ ├── rsync/
│ │ ├── build.sh
│ │ ├── rsync-3.1.3_lib_getpass.c.patch
│ │ └── rsync.h.patch
│ ├── rtmpdump/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── ruby/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ ├── ext-etc-etc.c.patch
│ │ ├── ext-syslog-extconf.rb.patch
│ │ ├── fix-paths.patch
│ │ ├── lib-rubygems-install_update_options.rb.patch
│ │ ├── lib-tmpdir.rb.patch
│ │ ├── mkmf.rb.patch
│ │ ├── process.c.patch
│ │ ├── pty.c.patch
│ │ ├── ruby-ri.subpackage.sh
│ │ ├── src-signal.c.patch
│ │ ├── tests/
│ │ │ ├── default_encoding_isutf8.sh
│ │ │ └── extension_modules_installed.sh
│ │ └── tool-rbinstall.rb.patch
│ ├── rust/
│ │ ├── build.sh
│ │ ├── config.toml
│ │ ├── os-tmpdir.patch
│ │ ├── rust-std-wasm32.subpackage.sh
│ │ └── src-librustc_llvm-build.rs.patch
│ ├── samefile/
│ │ └── build.sh
│ ├── sc/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── cmds.c.patch
│ ├── sc-im/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ ├── cmds_command.c.patch
│ │ ├── cmds_normal.c.patch
│ │ ├── cmds_visual.c.patch
│ │ ├── file.c.patch
│ │ └── main.c.patch
│ ├── science-repo/
│ │ └── build.sh
│ ├── screen/
│ │ ├── attacher.c.patch
│ │ ├── build.sh
│ │ ├── config.h.in.patch
│ │ ├── fileio.c.patch
│ │ ├── misc.c.patch
│ │ ├── no-setuid.patch
│ │ ├── os.h.patch
│ │ ├── osdef.h.in.patch
│ │ ├── screen.h.patch
│ │ ├── utmp.c.patch
│ │ └── window.c.patch
│ ├── screenfetch/
│ │ ├── build.sh
│ │ └── screenfetch-dev.patch
│ ├── scrypt/
│ │ └── build.sh
│ ├── sdcv/
│ │ ├── build.sh
│ │ └── src-mapfile.hpp.patch
│ ├── seafile-client/
│ │ ├── build.sh
│ │ └── configure.ac.patch
│ ├── seccure/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── secure-delete/
│ │ ├── 000-from-debian.patch
│ │ ├── 001-makefile-cc.patch
│ │ └── build.sh
│ ├── sed/
│ │ └── build.sh
│ ├── sensible-utils/
│ │ └── build.sh
│ ├── serf/
│ │ ├── build.sh
│ │ └── sconstruct.patch
│ ├── sharutils/
│ │ ├── build.sh
│ │ └── config.h.in.patch
│ ├── shellharden/
│ │ └── build.sh
│ ├── silversearcher-ag/
│ │ └── build.sh
│ ├── sl/
│ │ ├── build.sh
│ │ └── makefile.patch
│ ├── socat/
│ │ ├── build.sh
│ │ ├── dont_use_resolv_h.patch
│ │ ├── no-o_append.patch
│ │ └── openpty.c.patch
│ ├── sox/
│ │ └── build.sh
│ ├── speexdsp/
│ │ └── build.sh
│ ├── spiped/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── squid/
│ │ ├── CpuAffinitySet.cc.patch
│ │ ├── build.sh
│ │ ├── dns_internal.cc.patch
│ │ ├── src-esi-VarState.cc.patch
│ │ └── sys-stat.h.patch
│ ├── sshpass/
│ │ └── build.sh
│ ├── ssss/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── ssss.1
│ ├── stag/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── stag.c.patch
│ ├── starship/
│ │ └── build.sh
│ ├── steghide/
│ │ ├── build.sh
│ │ ├── gcc-4.2.patch
│ │ ├── libtool-fix.patch
│ │ ├── steghide-climits.patch
│ │ └── steghide-gcc6.patch
│ ├── stfl/
│ │ ├── 001-makefile.patch
│ │ └── build.sh
│ ├── stow/
│ │ └── build.sh
│ ├── strace/
│ │ ├── build.sh
│ │ ├── ipc_msgctl.c.patch
│ │ ├── ipc_shmctl.c.patch
│ │ └── strace.c.patch
│ ├── stunnel/
│ │ └── build.sh
│ ├── subversion/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ └── no_setlocale.patch
│ ├── swi-prolog/
│ │ └── build.sh
│ ├── swig/
│ │ └── build.sh
│ ├── syncthing/
│ │ └── build.sh
│ ├── taglib/
│ │ └── build.sh
│ ├── tar/
│ │ ├── build.sh
│ │ ├── gnu-stdio-impl.h.patch
│ │ ├── gnu-vasnprintf.c.patch
│ │ ├── src-system.c.patch
│ │ └── tmpdir-path.patch
│ ├── tasksh/
│ │ └── build.sh
│ ├── taskwarrior/
│ │ ├── CMakeLists.txt.patch
│ │ └── build.sh
│ ├── tcl/
│ │ └── build.sh
│ ├── tcsh/
│ │ ├── Makefile.in.patch
│ │ ├── build.sh
│ │ └── sh.h.patch
│ ├── teckit/
│ │ └── build.sh
│ ├── tergent/
│ │ └── build.sh
│ ├── termimage/
│ │ └── build.sh
│ ├── termux-am/
│ │ └── build.sh
│ ├── termux-api/
│ │ └── build.sh
│ ├── termux-apt-repo/
│ │ └── build.sh
│ ├── termux-auth/
│ │ └── build.sh
│ ├── termux-create-package/
│ │ └── build.sh
│ ├── termux-elf-cleaner/
│ │ └── build.sh
│ ├── termux-exec/
│ │ └── build.sh
│ ├── termux-keyring/
│ │ ├── build.sh
│ │ ├── fornwall.gpg
│ │ ├── grimler.gpg
│ │ ├── termux-autobuilds.gpg
│ │ └── xeffyr.gpg
│ ├── termux-licenses/
│ │ ├── LICENSES/
│ │ │ ├── AGPL-V3.txt
│ │ │ ├── Apache-2.0.txt
│ │ │ ├── Artistic-License-2.0.txt
│ │ │ ├── BSD 2-Clause.txt
│ │ │ ├── BSD 3-Clause.txt
│ │ │ ├── BSD.txt
│ │ │ ├── BSL-1.0.txt
│ │ │ ├── CC0-1.0.txt
│ │ │ ├── CeCILL-2.1.txt
│ │ │ ├── EPL-1.0.txt
│ │ │ ├── EPL-2.0.txt
│ │ │ ├── GPL-2.0.txt
│ │ │ ├── GPL-3.0.txt
│ │ │ ├── ISC.txt
│ │ │ ├── ImageMagick.txt
│ │ │ ├── LGPL-2.0.txt
│ │ │ ├── LGPL-2.1.txt
│ │ │ ├── LGPL-3.0.txt
│ │ │ ├── Libpng.txt
│ │ │ ├── MIT.txt
│ │ │ ├── MPL-2.0.txt
│ │ │ ├── NCSA.txt
│ │ │ ├── Nethack.txt
│ │ │ ├── OpenLDAP.txt
│ │ │ ├── PHP-3.0.txt
│ │ │ ├── Public Domain.txt
│ │ │ ├── PythonPL.txt
│ │ │ ├── Unlicense.txt
│ │ │ ├── VIM License.txt
│ │ │ ├── WTFPL.txt
│ │ │ ├── ZLIB.txt
│ │ │ └── wxWindows.txt
│ │ └── build.sh
│ ├── termux-services/
│ │ └── build.sh
│ ├── termux-tools/
│ │ ├── build.sh
│ │ ├── chsh
│ │ ├── dalvikvm
│ │ ├── login
│ │ ├── motd
│ │ ├── pkg
│ │ ├── su
│ │ ├── termux-fix-shebang
│ │ ├── termux-info
│ │ ├── termux-open
│ │ ├── termux-open-url
│ │ ├── termux-reload-settings
│ │ ├── termux-setup-storage
│ │ ├── termux-wake-lock
│ │ └── termux-wake-unlock
│ ├── teseq/
│ │ └── build.sh
│ ├── tesseract/
│ │ └── build.sh
│ ├── texinfo/
│ │ ├── build.sh
│ │ └── texindex-texindex.in.patch
│ ├── texlive/
│ │ ├── build.sh
│ │ ├── check_for_conflicts.py
│ │ ├── fmtutil.cnf.patch
│ │ ├── parse_tlpdb.py
│ │ ├── texlive-bibtexextra.subpackage.sh
│ │ ├── texlive-binextra.subpackage.sh
│ │ ├── texlive-context.subpackage.sh
│ │ ├── texlive-fontsextra.subpackage.sh
│ │ ├── texlive-fontsrecommended.subpackage.sh
│ │ ├── texlive-fontutils.subpackage.sh
│ │ ├── texlive-formatsextra.subpackage.sh
│ │ ├── texlive-full.subpackage.sh
│ │ ├── texlive-games.subpackage.sh
│ │ ├── texlive-humanities.subpackage.sh
│ │ ├── texlive-langarabic.subpackage.sh
│ │ ├── texlive-langchinese.subpackage.sh
│ │ ├── texlive-langcjk.subpackage.sh
│ │ ├── texlive-langcyrillic.subpackage.sh
│ │ ├── texlive-langczechslovak.subpackage.sh
│ │ ├── texlive-langenglish.subpackage.sh
│ │ ├── texlive-langeuropean.subpackage.sh
│ │ ├── texlive-langfrench.subpackage.sh
│ │ ├── texlive-langgerman.subpackage.sh
│ │ ├── texlive-langgreek.subpackage.sh
│ │ ├── texlive-langitalian.subpackage.sh
│ │ ├── texlive-langjapanese.subpackage.sh
│ │ ├── texlive-langkorean.subpackage.sh
│ │ ├── texlive-langother.subpackage.sh
│ │ ├── texlive-langpolish.subpackage.sh
│ │ ├── texlive-langportuguese.subpackage.sh
│ │ ├── texlive-langspanish.subpackage.sh
│ │ ├── texlive-latexextra.subpackage.sh
│ │ ├── texlive-latexrecommended.subpackage.sh
│ │ ├── texlive-luatex.subpackage.sh
│ │ ├── texlive-mathscience.subpackage.sh
│ │ ├── texlive-metapost.subpackage.sh
│ │ ├── texlive-music.subpackage.sh
│ │ ├── texlive-pictures.subpackage.sh
│ │ ├── texlive-plaingeneric.subpackage.sh
│ │ ├── texlive-pstricks.subpackage.sh
│ │ ├── texlive-publishers.subpackage.sh
│ │ ├── texlive-xetex.subpackage.sh
│ │ ├── texmf.cnf.patch
│ │ └── web2c-texmf.cnf
│ ├── texlive-bin/
│ │ ├── build.sh
│ │ ├── pdftoepdf-poppler0.76.0.cc
│ │ ├── pdftosrc-poppler0.76.0.cc
│ │ ├── texk-kpathsea-texmf.cnf.patch
│ │ ├── texk-web2c-luatexdir-luaffi-ffi.h.patch
│ │ ├── xetex-poppler-fixes.patch
│ │ └── zziplib_disable_have_dirent.patch
│ ├── texlive-tlmgr/
│ │ ├── TLConfig.pm.patch
│ │ ├── TLUtils.pm.patch
│ │ ├── build.sh
│ │ └── texlive.tlpdb
│ ├── tidy/
│ │ ├── build.sh
│ │ └── disable-target-manpages.patch
│ ├── tig/
│ │ └── build.sh
│ ├── timewarrior/
│ │ ├── build.sh
│ │ ├── cmake-CXXSniffer.cmake.patch
│ │ └── src-CMakeLists.txt.patch
│ ├── tintin++/
│ │ ├── build.sh
│ │ └── src-system.c.patch
│ ├── tinyproxy/
│ │ ├── build.sh
│ │ ├── child.c.patch
│ │ ├── configure.patch
│ │ └── heap.c.patch
│ ├── tinyscheme/
│ │ ├── build.sh
│ │ ├── makefile.patch
│ │ └── schema.c.patch
│ ├── tk/
│ │ ├── build.sh
│ │ └── no-hardlinks.patch
│ ├── tmate/
│ │ ├── build.sh
│ │ └── tmux.h.patch
│ ├── tmux/
│ │ ├── build.sh
│ │ ├── compat-imsg.c.patch
│ │ ├── compat-setproctitle.c.patch
│ │ ├── configure.patch
│ │ ├── socket-path.patch
│ │ └── tmux.conf
│ ├── toilet/
│ │ └── build.sh
│ ├── tokei/
│ │ └── build.sh
│ ├── tor/
│ │ ├── build.sh
│ │ ├── src-app-main-main.c.patch
│ │ └── src-feature-relay-dns.c.patch
│ ├── torsocks/
│ │ ├── Makefile.am.patch
│ │ ├── build.sh
│ │ ├── configure.ac.patch
│ │ ├── src-common-compat.h.patch
│ │ ├── src-common-config-file.h.patch
│ │ ├── src-lib-gethostbyname.c.patch
│ │ └── src-lib-syscall.c.patch
│ ├── toxic/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── cfg-checks-audio.mk.patch
│ ├── tracepath/
│ │ ├── build.sh
│ │ └── tracepath.c.patch
│ ├── translate-shell/
│ │ └── build.sh
│ ├── transmission/
│ │ ├── arpa_inet_h.patch
│ │ ├── build.sh
│ │ ├── libtransmission-fdlimit.c.patch
│ │ ├── miniwget_min.patch
│ │ ├── no_locale.patch
│ │ └── no_quota.patch
│ ├── tree/
│ │ ├── build.sh
│ │ └── tree.c.patch
│ ├── tsocks/
│ │ ├── 00_patch_from_1.8beta5-9.2.patch
│ │ ├── 01_symbolexport.patch
│ │ ├── 02_hyphenfix.patch
│ │ ├── 03_fixloop.patch
│ │ ├── 04_getpeername.patch
│ │ ├── 05_config_in_home.patch
│ │ ├── 06_fallback.patch
│ │ ├── 07_tsocks-1.8_beta5-hostname-config-fix.patch
│ │ ├── 08_manpages-fixes.patch
│ │ ├── 10_hardening.patch
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── no-static-linking.patch
│ │ ├── tsocks.c.patch
│ │ └── tsocks.patch
│ ├── tsu/
│ │ └── build.sh
│ ├── tty-clock/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── ttyd/
│ │ ├── CMakeLists.txt.patch
│ │ ├── build.sh
│ │ └── src-utils.c.patch
│ ├── ttyrec/
│ │ ├── Makefile.patch
│ │ ├── build.sh
│ │ └── ttyrec.c.patch
│ ├── tweego/
│ │ └── build.sh
│ ├── uftrace/
│ │ ├── arm-clang-mcount-hook.patch
│ │ ├── build.sh
│ │ ├── cmds-live.c.patch
│ │ ├── cmds-record.c.patch
│ │ ├── disable-librt.patch
│ │ ├── kernel.c.patch
│ │ ├── libmcount-record.c.patch
│ │ ├── libmcount-wrap.c.patch
│ │ └── pr_warn.patch
│ ├── unicorn/
│ │ ├── build.sh
│ │ └── samples-Makefile.patch
│ ├── unifdef/
│ │ └── build.sh
│ ├── units/
│ │ ├── build.sh
│ │ └── units.h.patch.debug
│ ├── unrar/
│ │ ├── build.sh
│ │ ├── makefile.patch
│ │ └── os.hpp.patch
│ ├── unstable-repo/
│ │ └── build.sh
│ ├── unzip/
│ │ ├── bugfix-crc32.patch
│ │ ├── bugfix-csiz-underflow.patch
│ │ ├── bugfix-cve20149636.patch
│ │ ├── bugfix-empty-input.patch
│ │ ├── bugfix-getZip64Data.patch
│ │ ├── bugfix-nextbyte-overflow.patch
│ │ ├── bugfix-overflow-fsize.patch
│ │ ├── bugfix-test_compr_eb.patch
│ │ ├── build.sh
│ │ ├── makefile.patch
│ │ ├── unix-configure.patch
│ │ └── unzip.c.patch
│ ├── utf8cpp/
│ │ └── build.sh
│ ├── utf8proc/
│ │ ├── Makefile.patch
│ │ └── build.sh
│ ├── utfdecode/
│ │ └── build.sh
│ ├── util-linux/
│ │ ├── build.sh
│ │ ├── configure.patch
│ │ ├── fix-paths.patch
│ │ ├── lib-ismounted.c.patch
│ │ ├── sys-utils-ipcutils.c.patch
│ │ └── sys-utils-ipcutils.h.patch
│ ├── valac/
│ │ ├── build.sh
│ │ └── valadoc.subpackage.sh
│ ├── valgrind/
│ │ ├── aarch64-setjmp.S
│ │ ├── build.sh
│ │ ├── coregrind-vgdb.c.patch
│ │ ├── coregrindmake.am.patch
│ │ ├── dont-redefine-elf32_nhdr.patch
│ │ ├── libcsetjmp.h.patch
│ │ ├── memcheckmake.am.patch
│ │ └── vg_preloaded.c.patch
│ ├── vcsh/
│ │ └── build.sh
│ ├── vegeta/
│ │ └── build.sh
│ ├── vifm/
│ │ ├── build.sh
│ │ ├── cmd_completion.c.patch
│ │ ├── configure.ac.patch
│ │ ├── file_info.c.patch
│ │ ├── src-Makefile.am.patch
│ │ ├── src-registers.c.patch
│ │ ├── src-utils-path.c.patch
│ │ └── src-utils-shmem_nix.c.patch
│ ├── vim/
│ │ ├── build.sh
│ │ ├── option.c.patch
│ │ ├── os_unix.h.patch
│ │ ├── src-auto-configure.patch
│ │ ├── src-if_cscope.c.patch
│ │ ├── vim-runtime.subpackage.sh
│ │ ├── vimrc
│ │ ├── vimtutor.patch
│ │ └── vterm_internal.h.patch
│ ├── vim-python/
│ │ ├── build.sh
│ │ ├── option.c.patch
│ │ ├── os_unix.h.patch
│ │ ├── src-auto-configure.patch
│ │ ├── src-if_cscope.c.patch
│ │ ├── vimrc
│ │ ├── vimtutor.patch
│ │ └── vterm_internal.h.patch
│ ├── virustotal-cli/
│ │ └── build.sh
│ ├── vis/
│ │ ├── build.sh
│ │ └── configure.patch
│ ├── vorbis-tools/
│ │ └── build.sh
│ ├── vttest/
│ │ └── build.sh
│ ├── vtutils/
│ │ └── build.sh
│ ├── w3m/
│ │ ├── Makefile.in.patch
│ │ ├── Str.h.patch
│ │ ├── build.sh
│ │ └── gc.h
│ ├── wcalc/
│ │ └── build.sh
│ ├── weechat/
│ │ ├── build.sh
│ │ ├── cmake-FindPerl.cmake.patch
│ │ ├── no-setuid.patch
│ │ ├── src-core-wee-config.c.patch
│ │ ├── src-core-weechat.c.patch
│ │ ├── src-gui-curses-CMakeLists.txt.patch
│ │ ├── weechat-lua-plugin.subpackage.sh
│ │ ├── weechat-perl-plugin.subpackage.sh
│ │ ├── weechat-python-plugin.subpackage.sh
│ │ ├── weechat-python38.patch
│ │ └── weechat-ruby-plugin.subpackage.sh
│ ├── wget/
│ │ ├── build.sh
│ │ ├── lib-stdio-impl.h.patch
│ │ └── tmpdir-path.patch
│ ├── wireguard-tools/
│ │ ├── android.c.patch
│ │ └── build.sh
│ ├── wol/
│ │ ├── build.sh
│ │ ├── lib-getline.h.patch
│ │ └── src-magic.c.patch
│ ├── wordgrinder/
│ │ ├── Makefile.patch
│ │ ├── build.lua.patch
│ │ └── build.sh
│ ├── wren/
│ │ ├── build.sh
│ │ ├── libuv-sys-include.patch
│ │ └── util-wren.mk.patch
│ ├── wuzz/
│ │ └── build.sh
│ ├── x11-repo/
│ │ └── build.sh
│ ├── xcb-proto/
│ │ └── build.sh
│ ├── xmlsec/
│ │ └── build.sh
│ ├── xmlstarlet/
│ │ └── build.sh
│ ├── xorg-util-macros/
│ │ ├── build.sh
│ │ └── util-macros-1.19.1_xorg-macros.m4.in.patch
│ ├── xorgproto/
│ │ ├── build.sh
│ │ ├── include-x11-Xos_r.h.patch
│ │ ├── include-x11-Xpoll.h.in.patch
│ │ └── meson.build.patch
│ ├── xorriso/
│ │ ├── build.sh
│ │ └── pthread.patch
│ ├── xtrans/
│ │ ├── build.sh
│ │ ├── xtrans-1.3.5_Xtransutil.c.patch
│ │ ├── xtrans-1.4.0_Xtranslcl.c.patch
│ │ └── xtrans-1.4.0_Xtranssock.c.patch
│ ├── xvidcore/
│ │ └── build.sh
│ ├── yadm/
│ │ └── build.sh
│ ├── yajl/
│ │ └── build.sh
│ ├── yarn/
│ │ └── build.sh
│ ├── yasm/
│ │ └── build.sh
│ ├── zbar/
│ │ ├── build.sh
│ │ ├── configure.ac.patch
│ │ └── zbarimg.c.patch
│ ├── zile/
│ │ ├── build.sh
│ │ ├── configure-pthreads-no-weak.patch
│ │ ├── lib-vasnprintf.c.patch
│ │ ├── spawn.patch
│ │ └── zile.1
│ ├── zip/
│ │ ├── build.sh
│ │ ├── makefile.patch
│ │ └── unix-configure.patch
│ ├── zlib/
│ │ └── build.sh
│ ├── zsh/
│ │ ├── Src-exec.c.patch
│ │ ├── build.sh
│ │ ├── compaudit.patch
│ │ ├── configure.patch
│ │ ├── etc-zshrc
│ │ ├── src-init.c.patch
│ │ ├── src-module.c.patch
│ │ └── tmp_path.patch
│ ├── zstd/
│ │ ├── build.sh
│ │ └── no-timespec_get.patch
│ └── zsync/
│ └── build.sh
├── print.txt
├── sample/
│ ├── build.sh
│ └── sample-sub.subpackage.sh
└── scripts/
├── Dockerfile
├── Vagrantfile
├── apt-compare-versions
├── build/
│ ├── ci/
│ │ └── cirrus-ci_dispatcher.sh
│ ├── configure/
│ │ ├── termux_step_configure.sh
│ │ ├── termux_step_configure_autotools.sh
│ │ ├── termux_step_configure_cmake.sh
│ │ └── termux_step_configure_meson.sh
│ ├── setup/
│ │ ├── termux_setup_cmake.sh
│ │ ├── termux_setup_golang.sh
│ │ ├── termux_setup_meson.sh
│ │ ├── termux_setup_ninja.sh
│ │ ├── termux_setup_protobuf.sh
│ │ └── termux_setup_rust.sh
│ ├── termux_create_subpackages.sh
│ ├── termux_download.sh
│ ├── termux_download_deb.sh
│ ├── termux_error_exit.sh
│ ├── termux_extract_dep_info.sh
│ ├── termux_get_repo_files.sh
│ ├── termux_step_create_datatar.sh
│ ├── termux_step_create_debfile.sh
│ ├── termux_step_extract_into_massagedir.sh
│ ├── termux_step_extract_package.sh
│ ├── termux_step_finish_build.sh
│ ├── termux_step_handle_buildarch.sh
│ ├── termux_step_handle_hostbuild.sh
│ ├── termux_step_host_build.sh
│ ├── termux_step_install_license.sh
│ ├── termux_step_make.sh
│ ├── termux_step_make_install.sh
│ ├── termux_step_massage.sh
│ ├── termux_step_patch_package.sh
│ ├── termux_step_replace_guess_scripts.sh
│ ├── termux_step_setup_toolchain.sh
│ ├── termux_step_setup_variables.sh
│ └── termux_step_start_build.sh
├── buildorder.py
├── check-built-packages.py
├── check-pie.sh
├── check-versions.sh
├── config.guess
├── config.sub
├── get_hash_from_file.py
├── ldd
├── lint-packages.sh
├── list-packages.sh
├── list-versions.sh
├── package_uploader.sh
├── print.txt
├── properties.sh
├── run-docker.ps1
├── run-docker.sh
├── setup-android-sdk.sh
├── setup-archlinux.sh
├── setup-termux.sh
├── setup-ubuntu.sh
├── test-runner.sh
└── update-docker.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .cirrus.yml
================================================
container:
image: andronixapp/package-builder:latest
##
## When doing release builds (branch 'master'), update Docker image if
## required.
##
docker_builder:
name: Update docker image
only_if: $CIRRUS_BRANCH == 'master'
env:
DOCKER_USERNAME: andronixapp
DOCKER_PASSWORD: ENCRYPTED[f1e136ddb0b71978bd017089b1ba5101d43e263b5e22d3121055b948890110b8f98208eb26424ffe4bdbd99a7a0502b5]
script: |
bash ./scripts/build/ci/cirrus-ci_dispatcher.sh --update-docker
##
## Perform basic check for errors in build.sh package scripts.
## If error found, exit with error code to stop build.
##
task:
container:
cpu: 1
memory: 4
name: Lint packages
timeout_in: 5m
depends_on:
- Update docker image
script: |
bash scripts/lint-packages.sh
##
## Determine changes in the last push, find modified packages and
## build them for aarch64/arm/i686/x86_64 architectures.
##
## Built packages are accessible from Cirrus CI web interface.
##
task:
container:
# Max configuration required by few large packages such as `rust`.
cpu: 8
memory: 24
name: Build packages
# 2 hours is a maximal timeout available for free use.
timeout_in: 120m
depends_on:
- Lint packages
environment:
TERMUX_MAKE_PROCESSES: 8
matrix:
- TERMUX_ARCH: aarch64
- TERMUX_ARCH: arm
- TERMUX_ARCH: i686
- TERMUX_ARCH: x86_64
# Do not use built-in git client provided by Cirrus as it may
# cause problems when determining changed files.
clone_script: |
if [[ -z "$CIRRUS_PR" ]]; then
git clone --recursive --branch="$CIRRUS_BRANCH" "https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git" "$CIRRUS_WORKING_DIR"
git reset --hard "$CIRRUS_CHANGE_IN_REPO"
else
git clone --recursive "https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git" "$CIRRUS_WORKING_DIR"
git fetch origin "pull/$CIRRUS_PR/head:pull/$CIRRUS_PR"
git reset --hard "$CIRRUS_CHANGE_IN_REPO"
fi
build_script: |
export TERMUX_DEBDIR="/tmp/debs-${TERMUX_ARCH}"
ln -s "$TERMUX_DEBDIR" debs
bash ./scripts/build/ci/cirrus-ci_dispatcher.sh
aarch64_debs_cache:
folder: "/tmp/debs-aarch64"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-aarch64"
arm_debs_cache:
folder: "/tmp/debs-arm"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-arm"
i686_debs_cache:
folder: "/tmp/debs-i686"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-i686"
x86-64_debs_cache:
folder: "/tmp/debs-x86_64"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-x86_64"
output_artifacts:
path: "./debs/*.deb"
##
## When doing release build (branch 'master'), upload built packages
## to APT repository on Bintray.
##
task:
container:
cpu: 1
memory: 4
name: Upload packages to Bintray
only_if: $CIRRUS_BRANCH == 'master'
timeout_in: 60m
depends_on:
- Build packages
environment:
BINTRAY_USERNAME: imprakharshukla
BINTRAY_API_KEY: ENCRYPTED[6dd62eec639e531a066d198368d73a890d91f28d92652b4b7b4eed40a175c1bb13b43b66e74441c3d4b7e85d2eb3e808]
BINTRAY_GPG_SUBJECT: andronixapp
BINTRAY_GPG_PASSPHRASE: ENCRYPTED[c766a2569ac7b479de6aba07da6ba146e90d96013cdc8a86d1d68e4d76e9e855c05d93f8727d2838140856ff85ac655a]
TERMUX_ANDROID_HOME: /data/data/studio.com.techriz.andronix/files/home
TERMUX_PREFIX: /data/data/studio.com.techriz.andronix/files/usr
# Do not use built-in git client provided by Cirrus as it may
# cause problems when determining changed files.
clone_script: |
if [[ -z "$CIRRUS_PR" ]]; then
git clone --recursive --branch="$CIRRUS_BRANCH" "https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git" "$CIRRUS_WORKING_DIR"
git reset --hard "$CIRRUS_CHANGE_IN_REPO"
else
git clone --recursive "https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git" "$CIRRUS_WORKING_DIR"
git fetch origin "pull/$CIRRUS_PR/head:pull/$CIRRUS_PR"
git reset --hard "$CIRRUS_CHANGE_IN_REPO"
fi
aarch64_debs_cache:
folder: "./debs"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-aarch64"
arm_debs_cache:
folder: "./debs"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-arm"
i686_debs_cache:
folder: "./debs"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-i686"
x86-64_debs_cache:
folder: "./debs"
fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-x86_64"
script: |
bash ./scripts/build/ci/cirrus-ci_dispatcher.sh --upload
================================================
FILE: .github/main.workflow
================================================
workflow "Discord" {
on = "check_suite"
resolves = "Discord Webhook"
}
action "Discord Webhook" {
uses = "docker://cirrusactions/discord:latest"
secrets = ["WEBHOOK_URL"]
}
================================================
FILE: .gitignore
================================================
### Vim ###
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
/debs/
### Vagrant ###
scripts/*.log
scripts/.vagrant/
env.sh
/scripts/env.sh
env.sh
env2.sh
bootstrap-aarch64.zip
bootstrap-arm.zip
bootstrap-i686.zip
bootstrap-x86_64.zip
================================================
FILE: LICENSE.md
================================================
# License for package patches
The scripts and patches to build each package is licensed under the same
license as the actual package (so the patches and scripts to build bash are
licensed under the same license as bash, while the patches and scripts to build
python are licensed under the same license as python).
# License for the build infrastructure
For build infrastructure outside the `packages/` folder the license is
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
================================================
FILE: README.md
================================================
[](https://cirrus-ci.com/andronixapp/termux-packages)
This project contains all the essential packages and utilities required to build packages for **Termux integrated within Andronix**.
Find the packages @ [official Andronix Repository](https://androfile.online)
> Do not confuse this repository with the official [Termux packages repository](https://github.com/termux/termux-packages). Packages built with the instructions given in this project will not work across apps. ***DO NOT MIX THE PACKAGES WITH THE OFFICIAL TERMUX REPOSITORY IN YOUR ANDRONIX INSTALLATION (visa versa).***
Termux package management quick how-to available on https://github.com/imprakharshukla/termux-packages/wiki.
To learn about using our build environment, read the [Developer's Wiki](https://github.com/imprakharshukla/termux-packages/wiki).
## Project structure
There 2 main branches available:
- [master] - packages for Android 7.0 or higher.
Directories:
- [disabled-packages](disabled-packages/):
Packages that cannot be published due to serious issues.
- [ndk-patches](ndk-patches/):
Our changes to Android NDK headers.
- [packages](packages/):
Main set of packages.
- [sample](sample/):
Sample structure for creating new packages.
- [scripts](scripts/):
Set of utilities and build system scripts.
## Contributing
### Bug reports
Do not request the addition of any packages. We are using the bare minimum packages like `proot,tar,pulseaudio` for example. We will only be updating those packages. **Rest all the packages will be not maintained.**
## Reach us
**AndroNix communities**
Twitter- https://twitter.com/AndronixApp
Telegram- https://t.me/AndronixApp
Discord- https://discord.gg/jywhBH4
## Credits
Termux- https://play.google.com/store/apps/details?id=com.termux
================================================
FILE: build-all.sh
================================================
#!/bin/bash
# build-all.sh - script to build all packages with a build order specified by buildorder.py
set -e -u -o pipefail
if [ "$(uname -o)" = "Android" ] || [ -e "/system/bin/app_process" ]; then
echo "On-device execution of this script is not supported."
exit 1
fi
# Read settings from .termuxrc if existing
test -f $HOME/.termuxrc && . $HOME/.termuxrc
: ${TERMUX_TOPDIR:="$HOME/.termux-build"}
: ${TERMUX_ARCH:="aarch64"}
: ${TERMUX_DEBUG:=""}
: ${TERMUX_INSTALL_DEPS:="-s"}
# Set TERMUX_INSTALL_DEPS to -s unless set to -i
_show_usage() {
echo "Usage: ./build-all.sh [-a ARCH] [-d] [-i] [-o DIR]"
echo "Build all packages."
echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all."
echo " -d Build with debug symbols."
echo " -i Build dependencies."
echo " -o Specify deb directory. Default: debs/."
exit 1
}
while getopts :a:hdio: option; do
case "$option" in
a) TERMUX_ARCH="$OPTARG";;
d) TERMUX_DEBUG='-d';;
i) TERMUX_INSTALL_DEPS='-i';;
o) TERMUX_DEBDIR="$(realpath -m $OPTARG)";;
h) _show_usage;;
esac
done
shift $((OPTIND-1))
if [ "$#" -ne 0 ]; then _show_usage; fi
if [[ ! "$TERMUX_ARCH" =~ ^(all|aarch64|arm|i686|x86_64)$ ]]; then
echo "ERROR: Invalid arch '$TERMUX_ARCH'" 1>&2
exit 1
fi
BUILDSCRIPT=$(dirname $0)/build-package.sh
BUILDALL_DIR=$TERMUX_TOPDIR/_buildall-$TERMUX_ARCH
BUILDORDER_FILE=$BUILDALL_DIR/buildorder.txt
BUILDSTATUS_FILE=$BUILDALL_DIR/buildstatus.txt
if [ -e $BUILDORDER_FILE ]; then
echo "Using existing buildorder file: $BUILDORDER_FILE"
else
mkdir -p $BUILDALL_DIR
./scripts/buildorder.py > $BUILDORDER_FILE
fi
if [ -e $BUILDSTATUS_FILE ]; then
echo "Continuing build-all from: $BUILDSTATUS_FILE"
fi
exec > >(tee -a $BUILDALL_DIR/ALL.out)
exec 2> >(tee -a $BUILDALL_DIR/ALL.err >&2)
trap "echo ERROR: See $BUILDALL_DIR/\${PKG}.err" ERR
while read PKG PKG_DIR; do
# Check build status (grepping is a bit crude, but it works)
if [ -e $BUILDSTATUS_FILE ] && grep "^$PKG\$" $BUILDSTATUS_FILE >/dev/null; then
echo "Skipping $PKG"
continue
fi
echo -n "Building $PKG... "
BUILD_START=$(date "+%s")
bash -x $BUILDSCRIPT -a $TERMUX_ARCH $TERMUX_DEBUG \
${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} $TERMUX_INSTALL_DEPS $PKG_DIR \
> $BUILDALL_DIR/${PKG}.out 2> $BUILDALL_DIR/${PKG}.err
BUILD_END=$(date "+%s")
BUILD_SECONDS=$(( $BUILD_END - $BUILD_START ))
echo "done in $BUILD_SECONDS"
# Update build status
echo "$PKG" >> $BUILDSTATUS_FILE
done<${BUILDORDER_FILE}
# Update build status
rm -f $BUILDSTATUS_FILE
echo "Finished"
================================================
FILE: build-package.sh
================================================
#!/bin/bash
# shellcheck disable=SC1117
set -e -o pipefail -u
: "${TMPDIR:=/tmp}"
export TMPDIR
if [ "$(uname -o)" = "Android" ] || [ -e "/system/bin/app_process" ]; then
if [ "$(id -u)" = "0" ]; then
echo "On-device execution of this script as root is disabled."
exit 1
fi
# This variable tells all parts of build system that build
# is performed on device.
export TERMUX_ON_DEVICE_BUILD=true
else
export TERMUX_ON_DEVICE_BUILD=false
fi
cd "$(realpath "$(dirname "$0")")"
TERMUX_SCRIPTDIR=$(pwd)
export TERMUX_SCRIPTDIR
# Lock file to prevent parallel running in the same environment.
TERMUX_BUILD_LOCK_FILE="${TMPDIR}/.termux-build.lck"
if [ ! -e "$TERMUX_BUILD_LOCK_FILE" ]; then
touch "$TERMUX_BUILD_LOCK_FILE"
fi
# Special variable for internal use. It forces script to ignore
# lock file.
: "${TERMUX_BUILD_IGNORE_LOCK:=false}"
# Utility function to log an error message and exit with an error code.
# shellcheck source=scripts/build/termux_error_exit.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_error_exit.sh"
# Utility function to download a resource with an expected checksum.
# shellcheck source=scripts/build/termux_download.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_download.sh"
# Utility function for golang-using packages to setup a go toolchain.
# shellcheck source=scripts/build/setup/termux_setup_golang.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_golang.sh"
# Utility function for rust-using packages to setup a rust toolchain.
# shellcheck source=scripts/build/setup/termux_setup_rust.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_rust.sh"
# Utility function to setup a current ninja build system.
# shellcheck source=scripts/build/setup/termux_setup_ninja.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_ninja.sh"
# Utility function to setup a current meson build system.
# shellcheck source=scripts/build/setup/termux_setup_meson.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_meson.sh"
# Utility function to setup a current cmake build system
# shellcheck source=scripts/build/setup/termux_setup_cmake.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_cmake.sh"
# Utility function to setup protobuf:
# shellcheck source=scripts/build/setup/termux_setup_protobuf.sh
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_protobuf.sh"
# Setup variables used by the build. Not to be overridden by packages.
# shellcheck source=scripts/build/termux_step_setup_variables.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_setup_variables.sh"
# Save away and restore build setups which may change between builds.
# shellcheck source=scripts/build/termux_step_handle_buildarch.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_handle_buildarch.sh"
# Function to get TERMUX_PKG_VERSION from build.sh
# shellcheck source=scripts/build/termux_extract_dep_info.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_extract_dep_info.sh"
# Function that downloads a .deb (using the termux_download function)
# shellcheck source=scripts/build/termux_download_deb.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_download_deb.sh"
# Script to download InRelease, verify it's signature and then download Packages.xz by hash
# shellcheck source=scripts/build/termux_get_repo_files.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_get_repo_files.sh"
# Source the package build script and start building. No to be overridden by packages.
# shellcheck source=scripts/build/termux_step_start_build.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_start_build.sh"
# Run just after sourcing $TERMUX_PKG_BUILDER_SCRIPT. May be overridden by packages.
# shellcheck source=scripts/build/termux_step_extract_package.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_extract_package.sh"
# Hook for packages to act just after the package has been extracted.
# Invoked in $TERMUX_PKG_SRCDIR.
termux_step_post_extract_package() {
return
}
# Optional host build. Not to be overridden by packages.
# shellcheck source=scripts/build/termux_step_handle_hostbuild.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_handle_hostbuild.sh"
# Perform a host build. Will be called in $TERMUX_PKG_HOSTBUILD_DIR.
# After termux_step_post_extract_package() and before termux_step_patch_package()
# shellcheck source=scripts/build/termux_step_host_build.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_host_build.sh"
# Setup a standalone Android NDK toolchain. Not to be overridden by packages.
# shellcheck source=scripts/build/termux_step_setup_toolchain.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_setup_toolchain.sh"
# Apply all *.patch files for the package. Not to be overridden by packages.
# shellcheck source=scripts/build/termux_step_patch_package.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_patch_package.sh"
# Replace autotools build-aux/config.{sub,guess} with ours to add android targets.
# shellcheck source=scripts/build/termux_step_replace_guess_scripts.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_replace_guess_scripts.sh"
# For package scripts to override. Called in $TERMUX_PKG_BUILDDIR.
termux_step_pre_configure() {
return
}
# Setup configure args and run $TERMUX_PKG_SRCDIR/configure. This function is called from termux_step_configure
# shellcheck source=scripts/build/configure/termux_step_configure_autotools.sh
source "$TERMUX_SCRIPTDIR/scripts/build/configure/termux_step_configure_autotools.sh"
# Setup configure args and run cmake. This function is called from termux_step_configure
# shellcheck source=scripts/build/configure/termux_step_configure_cmake.sh
source "$TERMUX_SCRIPTDIR/scripts/build/configure/termux_step_configure_cmake.sh"
# Setup configure args and run meson. This function is called from termux_step_configure
# shellcheck source=scripts/build/configure/termux_step_configure_meson.sh
source "$TERMUX_SCRIPTDIR/scripts/build/configure/termux_step_configure_meson.sh"
# Configure the package
# shellcheck source=scripts/build/configure/termux_step_configure.sh
source "$TERMUX_SCRIPTDIR/scripts/build/configure/termux_step_configure.sh"
# Hook for packages after configure step
termux_step_post_configure() {
return
}
# Make package, either with ninja or make
# shellcheck source=scripts/build/termux_step_make.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_make.sh"
# Make install, either with ninja, make of cargo
# shellcheck source=scripts/build/termux_step_make_install.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_make_install.sh"
# Hook function for package scripts to override.
termux_step_post_make_install() {
return
}
# Link/copy the LICENSE for the package to $TERMUX_PREFIX/share/$TERMUX_PKG_NAME/
# shellcheck source=scripts/build/termux_step_install_license.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_install_license.sh"
# Function to cp (through tar) installed files to massage dir
# shellcheck source=scripts/build/termux_step_extract_into_massagedir.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_extract_into_massagedir.sh"
# Create all subpackages. Run from termux_step_massage
# shellcheck source=scripts/build/termux_create_subpackages.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_create_subpackages.sh"
# Function to run various cleanup/fixes
# shellcheck source=scripts/build/termux_step_massage.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_massage.sh"
# Hook for packages after massage step
termux_step_post_massage() {
return
}
# Create data.tar.gz with files to package. Not to be overridden by package scripts.
# shellcheck source=scripts/build/termux_step_create_datatar.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_datatar.sh"
# Hook function to create {pre,post}install, {pre,post}rm-scripts and similar
termux_step_create_debscripts() {
return
}
# Create the build deb file. Not to be overridden by package scripts.
# shellcheck source=scripts/build/termux_step_create_debfile.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_debfile.sh"
# Finish the build. Not to be overridden by package scripts.
# shellcheck source=scripts/build/termux_step_finish_build.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_finish_build.sh"
################################################################################
# shellcheck source=scripts/properties.sh
. "$TERMUX_SCRIPTDIR/scripts/properties.sh"
if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
# For on device builds cross compiling is not supported.
# Target architecture must be same as for environment used currently.
TERMUX_ARCH=$(dpkg --print-architecture)
export TERMUX_ARCH
fi
_show_usage() {
echo "Usage: ./build-package.sh [options] PACKAGE_1 PACKAGE_2 ..."
echo
echo "Build a package by creating a .deb file in the debs/ folder."
echo
echo "Available options:"
[ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all."
echo " -d Build with debug symbols."
echo " -D Build a disabled package in disabled-packages/."
echo " -f Force build even if package has already been built."
[ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && echo " -i Download and extract dependencies instead of building them."
echo " -I Download and extract dependencies instead of building them, keep existing /data/data/com.termux files."
echo " -q Quiet build."
echo " -s Skip dependency check."
echo " -o Specify deb directory. Default: debs/."
exit 1
}
while getopts :a:hdDfiIqso: option; do
case "$option" in
a)
if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
termux_error_exit "./build-package.sh: option '-a' is not available for on-device builds"
else
export TERMUX_ARCH="$OPTARG"
fi
;;
h) _show_usage;;
d) export TERMUX_DEBUG=true;;
D) TERMUX_IS_DISABLED=true;;
f) TERMUX_FORCE_BUILD=true;;
i)
if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
termux_error_exit "./build-package.sh: option '-i' is not available for on-device builds"
else
export TERMUX_INSTALL_DEPS=true
fi
;;
I) export TERMUX_INSTALL_DEPS=true && export TERMUX_NO_CLEAN=true;;
q) export TERMUX_QUIET_BUILD=true;;
s) export TERMUX_SKIP_DEPCHECK=true;;
o) TERMUX_DEBDIR=$(realpath -m "$OPTARG");;
?) termux_error_exit "./build-package.sh: illegal option -$OPTARG";;
esac
done
shift $((OPTIND-1))
if [ "$#" -lt 1 ]; then _show_usage; fi
unset -f _show_usage
while (($# > 0)); do
# Following commands must be executed under lock to prevent running
# multiple instances of "./build-package.sh".
#
# To provide sane environment for each package, builds are done
# in subshell.
(
if ! $TERMUX_BUILD_IGNORE_LOCK; then
flock -n 5 || termux_error_exit "Another build is already running within same environment."
fi
# Handle 'all' arch:
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && [ -n "${TERMUX_ARCH+x}" ] && [ "${TERMUX_ARCH}" = 'all' ]; then
for arch in 'aarch64' 'arm' 'i686' 'x86_64'; do
env TERMUX_ARCH="$arch" TERMUX_BUILD_IGNORE_LOCK=true ./build-package.sh \
${TERMUX_FORCE_BUILD+-f} ${TERMUX_INSTALL_DEPS+-i} ${TERMUX_IS_DISABLED+-D} \
${TERMUX_DEBUG+-d} ${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} "$1"
done
exit
fi
# Check the package to build:
TERMUX_PKG_NAME=$(basename "$1")
if [[ $1 == *"/"* ]]; then
# Path to directory which may be outside this repo:
if [ ! -d "$1" ]; then termux_error_exit "'$1' seems to be a path but is not a directory"; fi
export TERMUX_PKG_BUILDER_DIR
TERMUX_PKG_BUILDER_DIR=$(realpath "$1")
else
# Package name:
if [ -n "${TERMUX_IS_DISABLED=""}" ]; then
export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/disabled-packages/$TERMUX_PKG_NAME
else
export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/packages/$TERMUX_PKG_NAME
fi
fi
TERMUX_PKG_BUILDER_SCRIPT=$TERMUX_PKG_BUILDER_DIR/build.sh
if test ! -f "$TERMUX_PKG_BUILDER_SCRIPT"; then
termux_error_exit "No build.sh script at package dir $TERMUX_PKG_BUILDER_DIR!"
fi
termux_step_setup_variables
termux_step_handle_buildarch
termux_step_start_build
termux_step_extract_package
cd "$TERMUX_PKG_SRCDIR"
termux_step_post_extract_package
termux_step_handle_hostbuild
termux_step_setup_toolchain
termux_step_patch_package
termux_step_replace_guess_scripts
cd "$TERMUX_PKG_SRCDIR"
termux_step_pre_configure
cd "$TERMUX_PKG_BUILDDIR"
termux_step_configure
cd "$TERMUX_PKG_BUILDDIR"
termux_step_post_configure
cd "$TERMUX_PKG_BUILDDIR"
termux_step_make
cd "$TERMUX_PKG_BUILDDIR"
termux_step_make_install
cd "$TERMUX_PKG_BUILDDIR"
termux_step_post_make_install
termux_step_install_license
cd "$TERMUX_PKG_MASSAGEDIR"
termux_step_extract_into_massagedir
cd "$TERMUX_PKG_MASSAGEDIR"
termux_step_massage
cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"
termux_step_post_massage
termux_step_create_datatar
termux_step_create_debfile
termux_step_finish_build
) 5< "$TERMUX_BUILD_LOCK_FILE"
shift 1
done
================================================
FILE: clean.sh
================================================
#!/bin/sh
# clean.sh - clean everything.
set -e -u
# Checking if script is running on Android with 2 different methods.
# Needed for safety to prevent execution of potentially dangerous
# operations such as 'rm -rf /data/*' on Android device.
if [ "$(uname -o)" = "Android" ] || [ -e "/system/bin/app_process" ]; then
TERMUX_ON_DEVICE_BUILD=true
else
TERMUX_ON_DEVICE_BUILD=false
fi
if [ "$(id -u)" = "0" ] && $TERMUX_ON_DEVICE_BUILD; then
echo "On-device execution of this script as root is disabled."
exit 1
fi
# Read settings from .termuxrc if existing
test -f "$HOME/.termuxrc" && . "$HOME/.termuxrc"
: "${TERMUX_TOPDIR:="$HOME/.termux-build"}"
: "${TMPDIR:=/tmp}"
export TMPDIR
# Lock file. Same as used in build-package.sh.
TERMUX_BUILD_LOCK_FILE="${TMPDIR}/.termux-build.lck"
if [ ! -e "$TERMUX_BUILD_LOCK_FILE" ]; then
touch "$TERMUX_BUILD_LOCK_FILE"
fi
{
if ! flock -n 5; then
echo "Not cleaning build directory since you have unfinished build running."
exit 1
fi
if [ -d "$TERMUX_TOPDIR" ]; then
chmod +w -R "$TERMUX_TOPDIR"
fi
if $TERMUX_ON_DEVICE_BUILD; then
# For on-device build cleanup /data shouldn't be erased.
rm -Rf "$TERMUX_TOPDIR"
else
rm -Rf /data/* "$TERMUX_TOPDIR"
fi
} 5< "$TERMUX_BUILD_LOCK_FILE"
================================================
FILE: disabled-packages/abuild/Makefile.patch
================================================
diff -u -r ../abuild-3.2.0/Makefile ./Makefile
--- ../abuild-3.2.0/Makefile 2018-06-22 07:24:10.000000000 +0000
+++ ./Makefile 2018-11-18 01:32:10.950452195 +0000
@@ -95,7 +95,6 @@
for i in $(USR_BIN_FILES); do\
install -m 755 $$i $(DESTDIR)/$(bindir)/$$i;\
done
- chmod 4111 $(DESTDIR)/$(prefix)/bin/abuild-sudo
for i in adduser addgroup apk; do \
ln -fs abuild-sudo $(DESTDIR)/$(bindir)/abuild-$$i; \
done
================================================
FILE: disabled-packages/abuild/abuild-fetch.c.patch
================================================
diff -uNr abuild-3.4.0/abuild-fetch.c abuild-3.4.0.mod/abuild-fetch.c
--- abuild-3.4.0/abuild-fetch.c 2019-06-14 15:13:23.000000000 +0300
+++ abuild-3.4.0.mod/abuild-fetch.c 2019-07-21 16:45:34.475241394 +0300
@@ -189,7 +189,7 @@
int main(int argc, char *argv[])
{
int opt;
- char *destdir = "/var/cache/distfiles";
+ char *destdir = "@TERMUX_PREFIX@/var/cache/distfiles";
program = argv[0];
while ((opt = getopt(argc, argv, "hd:")) != -1) {
================================================
FILE: disabled-packages/abuild/abuild-keygen.in.patch
================================================
--- abuild-3.2.0/abuild-keygen.in 2018-06-22 10:24:10.000000000 +0300
+++ abuild-3.2.0.mod/abuild-keygen.in 2018-11-18 20:02:12.017576128 +0200
@@ -56,14 +56,14 @@
if [ -n "$install_pubkey" ]; then
- msg "Installing $pubkey to /etc/apk/keys..."
- sudo mkdir -p /etc/apk/keys
- sudo cp -i "$pubkey" /etc/apk/keys/
+ msg "Installing $pubkey to \$PREFIX/etc/apk/keys..."
+ mkdir -p @TERMUX_PREFIX@/etc/apk/keys
+ cp -i "$pubkey" @TERMUX_PREFIX@/etc/apk/keys/
else
msg ""
msg "You'll need to install $pubkey into "
- msg "/etc/apk/keys to be able to install packages and repositories signed with"
+ msg "\$PREFIX/etc/apk/keys to be able to install packages and repositories signed with"
msg "$privkey"
fi
@@ -94,7 +94,7 @@
Options:
-a, --append Set PACKAGER_PRIVKEY= in
$ABUILD_USERCONF
- -i, --install Install public key into /etc/apk/keys using sudo
+ -i, --install Install public key into \$PREFIX/etc/apk/keys
-n Non-interactive. Use defaults
-q, --quiet
-h, --help Show this help
================================================
FILE: disabled-packages/abuild/abuild-rmtemp.c.patch
================================================
--- abuild-3.2.0/abuild-rmtemp.c 2018-06-22 10:24:10.000000000 +0300
+++ abuild-3.2.0.mod/abuild-rmtemp.c 2018-11-18 19:54:49.254290401 +0200
@@ -16,7 +16,7 @@
#include
#include
-#define PREFIX "/var/tmp/abuild."
+#define PREFIX "@TERMUX_PREFIX@/var/tmp/abuild."
static void fail() {
errx(1, "%s", strerror(errno));
@@ -29,10 +29,12 @@
int main(int argc, char **argv) {
if (argc < 2) return 0;
+#ifndef __ANDROID__
if (getuid()) {
argv[0] = "-abuild-rmtemp";
execv("/usr/bin/abuild-sudo", argv);
}
+#endif
if (strncmp(argv[1], PREFIX, strlen(PREFIX)) || \
strchr(argv[1] + strlen(PREFIX), '/'))
@@ -40,9 +42,12 @@
struct stat s;
if (lstat(argv[1], &s)) fail();
+
+#ifndef __ANDROID__
struct passwd *p = getpwnam(getenv("USER"));
if (!p) errx(1, "Incorrect user");
if (s.st_uid != p->pw_uid) errx(1, "Permission denied");
+#endif
if (nftw(argv[1], handler, 512, FTW_DEPTH)) fail();
================================================
FILE: disabled-packages/abuild/abuild-sign.in.patch
================================================
--- abuild-3.2.0/abuild-sign.in 2018-06-22 10:24:10.000000000 +0300
+++ abuild-3.2.0.mod/abuild-sign.in 2018-11-18 20:28:48.283970248 +0200
@@ -51,7 +51,7 @@
-e, --installed Check only of there exist a private key for signing
-k, --private KEY The private key to use for signing
-p, --public KEY The name of public key. apk add will look for
- /etc/apk/keys/KEY
+ \$PREFIX/etc/apk/keys/KEY
-q, --quiet
-h, --help Show this help
================================================
FILE: disabled-packages/abuild/abuild.conf.patch
================================================
diff -uNr abuild-3.2.0/abuild.conf abuild-3.2.0.mod/abuild.conf
--- abuild-3.2.0/abuild.conf 2018-06-22 10:24:10.000000000 +0300
+++ abuild-3.2.0.mod/abuild.conf 2018-11-18 16:42:45.897130881 +0200
@@ -1,4 +1,4 @@
-export CFLAGS="-Os -fomit-frame-pointer"
+export CFLAGS="-Os"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-Wl,--as-needed"
@@ -9,7 +9,7 @@
# remove line below to disable colors
USE_COLORS=1
-SRCDEST=/var/cache/distfiles
+SRCDEST=@TERMUX_PREFIX@/var/cache/distfiles
# uncomment line below to store built packages in other location
# The package will be stored as $REPODEST/$repo/$pkgname-$pkgver-r$pkgrel.apk
================================================
FILE: disabled-packages/abuild/abuild.in.patch
================================================
diff -uNr abuild-3.4.0/abuild.in abuild-3.4.0.mod/abuild.in
--- abuild-3.4.0/abuild.in 2019-06-14 15:13:23.000000000 +0300
+++ abuild-3.4.0.mod/abuild.in 2019-07-21 16:56:56.898285307 +0300
@@ -1,4 +1,4 @@
-#!/bin/ash -e
+#!/bin/bash -e
# abuild - build apk packages (light version of makepkg)
# Copyright (c) 2008-2015 Natanael Copa
@@ -21,11 +21,7 @@
. "$datadir/functions.sh"
# defaults
-: ${FAKEROOT:="fakeroot"}
-: ${SUDO_APK:="abuild-apk"}
: ${APK:="apk"}
-: ${ADDUSER:="abuild-adduser"}
-: ${ADDGROUP:="abuild-addgroup"}
apk_opt_wait="--wait 30"
@@ -438,7 +434,7 @@
initdcheck || return 1
mkdir -p "$srcdir"
local gunzip=$(command -v pigz || echo gunzip)
- [ $gunzip = "/usr/bin/pigz" ] && gunzip="$gunzip -d"
+ [ $gunzip = "@TERMUX_PREFIX@/bin/pigz" ] && gunzip="$gunzip -d"
for u in $source; do
local s
if is_remote "$u"; then
@@ -466,7 +462,7 @@
*.tar.xz)
msg "Unpacking $s..."
local threads_opt
- if [ $(readlink -f $(command -v unxz)) != "/bin/busybox" ]; then
+ if [ $(realpath $(command -v unxz)) != "@TERMUX_PREFIX@/bin/busybox" ]; then
threads_opt="--threads=0"
fi
unxz $threads_opt -c "$s" | tar -C "$srcdir" -x || return 1;;
@@ -554,26 +550,6 @@
return 0
}
-mkusers() {
- local i
- for i in $pkggroups; do
- if ! getent group $i >/dev/null; then
- msg "Creating group $i"
- $ADDGROUP -S $i || return 1
- fi
- done
- for i in $pkgusers; do
- if ! getent passwd $i >/dev/null; then
- local gopt=
- msg "Creating user $i"
- if getent group $i >/dev/null; then
- gopt="-G $i"
- fi
- $ADDUSER -S -D -H $gopt $i || return 1
- fi
- done
-}
-
# helper to update config.sub to a recent version
update_config_sub() {
find . -name config.sub | (local changed=false; while read f; do
@@ -687,10 +663,10 @@
find "$dir" -name '*.la' -type f -delete
fi
- # look for /usr/lib/charset.alias
- if [ -e "$dir"/usr/lib/charset.alias ] \
+ # look for @TERMUX_PREFIX@/lib/charset.alias
+ if [ -e "$dir"/@TERMUX_PREFIX@/lib/charset.alias ] \
&& ! options_has "charset.alias"; then
- error "Found /usr/lib/charset.alias"
+ error "Found @TERMUX_PREFIX@/lib/charset.alias"
return 1
fi
# look for /etc/init.d and /etc/conf.d
@@ -704,22 +680,15 @@
warning "Found static archive on ${i##*$dir/} but name doesn't end with -static"
done
fi
- # look for /usr/share/doc
- if [ -e "$dir"/usr/share/doc ] \
+ # look for @TERMUX_PREFIX@/share/doc
+ if [ -e "$dir"/@TERMUX_PREFIX@/share/doc ] \
&& ! is_doc_pkg "$name"; then
- warning "Found /usr/share/doc but package name doesn't end with -doc"
+ warning "Found @TERMUX_PREFIX@/share/doc but package name doesn't end with -doc"
fi
- # look for /usr/share/man
- if [ -e "$dir"/usr/share/man ]; then
+ # look for @TERMUX_PREFIX@/share/man
+ if [ -e "$dir"/@TERMUX_PREFIX@/share/man ]; then
if ! is_doc_pkg "$name"; then
- warning "Found /usr/share/man but package name doesn't end with -doc"
- fi
- # check for uncompressed man pages
- i=$(find "$dir"/usr/share/man -name '*.[0-8]' -type f | sed "s|^$dir|\t|")
- if [ -n "$i" ]; then
- error "Found uncompressed man pages:"
- echo "$i"
- return 1
+ warning "Found @TERMUX_PREFIX@/share/man but package name doesn't end with -doc"
fi
fi
# check directory permissions
@@ -780,9 +749,9 @@
&& postcheck "$pkgbasedir/$subpkgname" "$subpkgname" ) || return 1
done
postcheck "$pkgdir" "$pkgname" || return 1
- # post check for /usr/share/locale
- if [ -d "$pkgdir"/usr/share/locale ]; then
- warning "Found /usr/share/locale"
+ # post check for @TERMUX_PREFIX@/share/locale
+ if [ -d "$pkgdir"/@TERMUX_PREFIX@/share/locale ]; then
+ warning "Found @TERMUX_PREFIX@/share/locale"
warning2 "Maybe add \$pkgname-lang to subpackages?"
fi
}
@@ -792,7 +761,7 @@
install_if="$pkgname=$pkgver-r$pkgrel lang"
local dir
- for dir in ${langdir:-/usr/share/locale}; do
+ for dir in ${langdir:-@TERMUX_PREFIX@/share/locale}; do
mkdir -p "$subpkgdir"/${dir%/*}
mv "$pkgdir"/"$dir" "$subpkgdir"/"$dir" || return 1
done
@@ -811,7 +780,7 @@
install_if="$pkgname=$pkgver-r$pkgrel lang-$lang"
local dir
- for dir in ${langdir:-/usr/share/locale}; do
+ for dir in ${langdir:-@TERMUX_PREFIX@/share/locale}; do
mkdir -p "$subpkgdir"/$dir
mv "$pkgdir"/$dir/$lang* \
"$subpkgdir"/$dir/ \
@@ -866,7 +835,7 @@
check_license() {
local ret=0
- local license_list=/usr/share/spdx/license.lst
+ local license_list=@TERMUX_PREFIX@/share/spdx/license.lst
local exclude="AND OR WITH"
if options_has "!spdx" || ! [ -f "$license_list" ]; then
return 0
@@ -939,10 +908,7 @@
local builddate=$(date -u "+%s")
# Fix package size on several filesystems
- case "$(df -PT . | awk 'END {print $2}')" in
- btrfs|ecryptfs|zfs)
- sync;;
- esac
+ sync
local size=$(du -sk | awk '{print $1 * 1024}')
@@ -955,7 +921,7 @@
echo "# Generated by $(basename "$abuild_path") $program_version" >"$pkginfo"
if [ -n "$FAKEROOTKEY" ]; then
- echo "# using $($FAKEROOT -v)" >> "$pkginfo"
+ echo "# using $(fakeroot -v)" >> "$pkginfo"
fi
echo "# $(date -u)" >> "$pkginfo"
cat >> "$pkginfo" <<-EOF
@@ -975,9 +941,9 @@
for i in $install $triggers; do
local s=${i%=*}
[ "$name" != "${s%.*}" ] && continue
- if head -n 1 "$startdir/$s" | grep '^#!/bin/sh' >/dev/null ; then
- msg "Script found. /bin/sh added as a dependency for $pkg"
- deps="$deps /bin/sh"
+ if head -n 1 "$startdir/$s" | grep '^#!@TERMUX_PREFIX@/bin/sh' >/dev/null ; then
+ msg "Script found. @TERMUX_PREFIX@/bin/sh added as a dependency for $pkg"
+ deps="$deps @TERMUX_PREFIX@/bin/sh"
break
fi
done
@@ -1049,8 +1015,8 @@
scanelf --quiet --recursive --rpath "$dir" \
| sed -e 's/[[:space:]].*//' -e 's/:/\n/' | sort -u \
>"$controldir"/.rpaths
- if grep -q -x '/usr/lib' "$controldir"/.rpaths; then
- warning "Redundant /usr/lib in rpath found"
+ if grep -q -x '@TERMUX_PREFIX@/lib' "$controldir"/.rpaths; then
+ warning "Redundant @TERMUX_PREFIX@/lib in rpath found"
fi
if grep '^/home/' "$controldir"/.rpaths; then
error "Has /home/... in rpath"
@@ -1076,12 +1042,12 @@
local dir="${subpkgdir:-$pkgdir}"
options_has "!tracedeps" && return 0
cd "$dir" || return 1
- for i in usr/lib/pkgconfig/*.pc; do
+ for i in ./@TERMUX_PREFIX@/lib/pkgconfig/*.pc; do
if ! [ -e "$i" ]; then
continue
fi
local f=${i##*/}
- local v=$(PKG_CONFIG_PATH="$dir"/usr/lib/pkgconfig PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1 pkg-config \
+ local v=$(PKG_CONFIG_PATH="$dir"/@TERMUX_PREFIX@/lib/pkgconfig PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH=1 pkg-config \
--modversion ${f%.pc})
echo "$pcprefix${f%.pc}=${v:-0}" >> "$controldir"/.provides-pc
done
@@ -1176,12 +1142,19 @@
return 1
}
-# search rpaths and /usr/lib /lib for given so files
+# search rpaths and @TERMUX_PREFIX@/lib for given so files
find_so_files() {
+ local android_libs
local rpaths=$(cat "$1")
shift
+
+ case ${CTARGET_ARCH} in
+ aarch64|x86_64) android_libs="/system/lib64" ;;
+ *) android_libs="/system/lib" ;;
+ esac
+
while [ $# -gt 0 ]; do
- real_so_path "$1" /usr/lib /lib $rpaths || return 1
+ real_so_path "$1" @TERMUX_PREFIX@/lib $rpaths $android_libs || return 1
shift
done
return 0
@@ -1219,20 +1192,12 @@
esac
msg "Tracing dependencies..."
- # add pkgconfig if usr/lib/pkgconfig is found
- if [ -d "$pkgbasedir"/$name/usr/lib/pkgconfig ] \
+ # add pkgconfig if @TERMUX_PREFIX@/lib/pkgconfig is found
+ if [ -d "$pkgbasedir"/$name/@TERMUX_PREFIX@/lib/pkgconfig ] \
&& ! grep -q '^depend = pkgconfig' "$dir"/.PKGINFO; then
autodeps="$autodeps pkgconfig"
fi
- # special case for libpthread: we need depend on libgcc
- if [ "$CLIBC" = "uclibc" ] && [ -f "$dir"/.needs-so ] \
- && grep -q -w '^libpthread.so.*' "$dir"/.needs-so \
- && ! grep -q -w "^depend = libgcc" "$dir"/.PKGINFO; then
- autodeps="$autodeps libgcc"
- msg " added libgcc (due to libpthread)"
- fi
-
[ -f "$dir"/.needs-so ] && for i in $(cat "$dir"/.needs-so); do
# first check if its provided by same apkbuild
grep -q -w "^$sonameprefix$i" "$dir"/.provides-so 2>/dev/null && continue
@@ -1249,7 +1214,7 @@
# find all packages that holds the so files
if [ -f "$dir"/.rpaths ]; then
- local so_files=$(find_so_files "$dir"/.rpaths $missing) \
+ local so_files=$(find_so_files "$dir"/.rpaths $missing | grep -v /system/lib) \
|| return 1
deppkgs=$($APK $apkroot info --quiet --who-owns $so_files) || return 1
fi
@@ -1283,7 +1248,7 @@
autodeps="$autodeps pc:$i"
else
warning "Could not find any provider for pc:$i"
- local pcfile=/usr/lib/pkgconfig/"${i%%[<>=]*}".pc
+ local pcfile=@TERMUX_PREFIX@/lib/pkgconfig/"${i%%[<>=]*}".pc
if [ -e "$pcfile" ]; then
local owner=$($APK $apkroot info --quiet --who-owns $pcfile)
warning "${owner:-package providing $pcfile} needs to be rebuilt"
@@ -1315,7 +1280,7 @@
find_scanelf_paths() {
local datadir="$1"
- local paths="$datadir/lib:$datadir/usr/lib" i= rpaths=
+ local paths="$datadir/lib" i= rpaths=
if [ -n "$ldpath" ]; then
paths="$paths:$(echo "${datadir}${ldpath}" | sed "s|:|:$datadir|g")"
fi
@@ -1461,7 +1426,7 @@
name="$(pkginfo_val pkgname "$controldir"/.PKGINFO)"
datadir="$pkgbasedir"/$name
for i in $(sort -u "$provides_pc"); do
- PKG_CONFIG_PATH="$datadir"/usr/lib/pkgconfig pkg-config \
+ PKG_CONFIG_PATH="$datadir"/@TERMUX_PREFIX@/lib/pkgconfig pkg-config \
--print-requires \
--print-requires-private ${i%=*} \
| sed -E 's/\s*([<>=]+)\s*/\1/' \
@@ -1555,7 +1520,7 @@
logcmd "building $repo/$pkgname-$pkgver-r$pkgrel"
local _starttime=$(date --utc +%s)
msg "Building $repo/$pkgname $pkgver-r$pkgrel (using $program $program_version) started $(date -R)"
- for part in sanitycheck builddeps clean fetch unpack prepare mkusers build \
+ for part in sanitycheck builddeps clean fetch unpack prepare build \
$_check rootpkg; do
runpart $part
done
@@ -1625,14 +1590,14 @@
local i
for i in doc man info html sgml licenses gtk-doc ri help; do
- if [ -d "$pkgdir/usr/share/$i" ]; then
- mkdir -p "$subpkgdir/usr/share"
- mv "$pkgdir/usr/share/$i" "$subpkgdir/usr/share/"
+ if [ -d "$pkgdir/@TERMUX_PREFIX@/share/$i" ]; then
+ mkdir -p "$subpkgdir/@TERMUX_PREFIX@/share"
+ mv "$pkgdir/@TERMUX_PREFIX@/share/$i" "$subpkgdir/@TERMUX_PREFIX@/share/"
fi
done
# compress man pages
- local mandir="$subpkgdir"/usr/share/man
+ local mandir="$subpkgdir"/@TERMUX_PREFIX@/share/man
[ -d "$mandir" ] && find "$mandir" -type l \
-a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \
-a \! \( -name '*.gz' -o -name '*.bz2' -o -name '*.xz' \) \
@@ -1664,10 +1629,10 @@
[ $islink -eq 0 ] && $gzip -9 "$name"
done
- rm -f "$subpkgdir/usr/share/info/dir"
+ rm -f "$subpkgdir/@TERMUX_PREFIX@/share/info/dir"
# remove if empty, ignore error (not empty)
- rmdir "$pkgdir/usr/share" "$pkgdir/usr" 2>/dev/null || :
+ rmdir "$pkgdir/@TERMUX_PREFIX@/share" "$pkgdir" 2>/dev/null || :
}
doc() {
@@ -1682,19 +1647,15 @@
scanelf -R "$pkgdir" | grep ET_DYN | sed "s:$pkgdir\/::g" | sed "s:ET_DYN ::g" | while read f; do
local ddbg_srcdir=$(dirname "$pkgdir/$f")
local ddbg_srcfile=$(basename "$pkgdir/$f")
- local ddbg_dstdir=$(dirname "$subpkgdir/usr/lib/debug/$f.debug")
- local ddbg_dstfile=$(basename "$subpkgdir/usr/lib/debug/$f.debug")
+ local ddbg_dstdir=$(dirname "$subpkgdir/@TERMUX_PREFIX@/lib/debug/$f.debug")
+ local ddbg_dstfile=$(basename "$subpkgdir/@TERMUX_PREFIX@/lib/debug/$f.debug")
mkdir -p "$ddbg_dstdir"
cd "$ddbg_srcdir"
- local xattr=$(getfattr --match="" --dump "${ddbg_srcfile}")
${CROSS_COMPILE}objcopy --only-keep-debug "$ddbg_srcfile" "$ddbg_dstfile"
${CROSS_COMPILE}objcopy --add-gnu-debuglink="$ddbg_dstfile" "$ddbg_srcdir/$ddbg_srcfile"
mv "$ddbg_dstfile" "$ddbg_dstdir"
${CROSS_COMPILE}strip "$ddbg_srcfile"
- if [ -n "$xattr" ]; then
- echo "$xattr" | setfattr --restore=-
- fi
done
return 0
}
@@ -1710,14 +1671,14 @@
pkgdesc="$pkgdesc (development files)"
cd "$pkgdir" || return 0
- local libdirs=usr/
+ local libdirs=./@TERMUX_PREFIX@/lib
[ -d lib/ ] && libdirs="lib/ $libdirs"
- for i in usr/include usr/lib/pkgconfig usr/share/aclocal\
- usr/share/gettext usr/bin/*-config \
- usr/share/vala/vapi usr/share/gir-[0-9]*\
- usr/share/qt*/mkspecs \
- usr/lib/qt*/mkspecs \
- usr/lib/cmake \
+ for i in ./@TERMUX_PREFIX@/lib/pkgconfig ./@TERMUX_PREFIX@/share/aclocal \
+ ./@TERMUX_PREFIX@/share/gettext ./@TERMUX_PREFIX@/bin/*-config \
+ ./@TERMUX_PREFIX@/share/vala/vapi ./@TERMUX_PREFIX@/share/gir-[0-9]* \
+ ./@TERMUX_PREFIX@/share/qt*/mkspecs \
+ ./@TERMUX_PREFIX@/lib/qt*/mkspecs \
+ ./@TERMUX_PREFIX@/lib/cmake \
$(find . -name include -type d) \
$([ -z "${subpackages##*$pkgname-static*}" ] && find $libdirs \
-name '*.a' 2>/dev/null) \
@@ -1808,27 +1769,11 @@
type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function"
}
-do_fakeroot() {
- if [ -n "$FAKEROOT" ]; then
- $FAKEROOT -- "$@"
- else
- "$@"
- fi
-}
-
-# wrap check() with fakeroot
-check_fakeroot() {
- cd "$startdir"
- [ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
- do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build check
-}
-
# build and package in fakeroot
rootpkg() {
cd "$startdir"
rm -rf "$pkgdir"
- [ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
- do_fakeroot "$abuild_path" $forceroot $color_opt $keep_build \
+ "$abuild_path" $forceroot $color_opt $keep_build \
package \
prepare_subpackages \
prepare_language_packs \
@@ -2151,7 +2096,7 @@
$install_deps $recursive $upgrade $color_opt \
abuildindex || return 1
done
- $SUDO_APK add --upgrade --repository "$REPODEST/$repo" \
+ $APK add --upgrade --repository "$REPODEST/$repo" \
$apk_opt_wait \
--virtual .makedepends-$pkgname $builddeps \
|| return 1
@@ -2218,8 +2163,6 @@
msg "Preparing build chroot..."
- mkusers
-
BUILD_ROOT=$(mktemp -d /var/tmp/abuild.XXXXXXXXXX)
local aportsgit=${APORTSDIR:-${startdir}}
@@ -2260,7 +2203,7 @@
) < "$repo_template" > "$BUILD_ROOT/etc/apk/repositories"
calcdeps
- $SUDO_APK add --initdb --root "$BUILD_ROOT" --update \
+ $APK add --initdb --root "$BUILD_ROOT" --update \
abuild alpine-base build-base git $hostdeps $builddeps
local bwrap_opts=""
@@ -2307,11 +2250,7 @@
[ -e "$filename" ] || continue
[ "$osabi" != "STANDALONE" ] || continue
- local XATTR=$(getfattr --match="" --dump "${filename}")
"${stripcmd}" "${filename}"
- if [ -n "$XATTR" ]; then
- echo "$XATTR" | setfattr --restore=-
- fi
done
}
@@ -2401,22 +2340,22 @@
local _quiet="$1"
[ -z "$_quiet" ] && msg "Installing for build:$builddeps"
- $SUDO_APK add $_quiet $apk_opt_wait --repository "$REPODEST/$repo" \
+ $APK add $_quiet $apk_opt_wait --repository "$REPODEST/$repo" \
--virtual .makedepends-$pkgname \
$builddeps \
|| return 1
if [ -n "$CBUILDROOT" ]; then
[ -z "$_quiet" ] && msg "Installing for host:$hostdeps"
- $SUDO_APK add $_quiet --root "$CBUILDROOT" --arch "$CTARGET_ARCH" --repository "$REPODEST/$repo" $apk_opt_wait \
+ $APK add $_quiet --root "$CBUILDROOT" --arch "$CTARGET_ARCH" --repository "$REPODEST/$repo" $apk_opt_wait \
--no-scripts --virtual .makedepends-$pkgname $hostdeps || return 1
fi
}
undeps() {
local _quiet="$@"
- $SUDO_APK del $_quiet $apk_opt_wait .makedepends-$pkgname || :
+ $APK del $_quiet $apk_opt_wait .makedepends-$pkgname || :
if [ -n "$CBUILDROOT" ]; then
- $SUDO_APK del $_quiet --root "$CBUILDROOT" --arch "$CTARGET_ARCH" $apk_opt_wait \
+ $APK del $_quiet --root "$CBUILDROOT" --arch "$CTARGET_ARCH" $apk_opt_wait \
--no-scripts .makedepends-$pkgname || :
fi
}
@@ -2536,7 +2475,7 @@
package Install project into $pkgdir
prepare Apply patches
rootbld Build package in clean chroot
- rootpkg Run 'package', the split functions and create apks as fakeroot
+ rootpkg Run 'package', the split functions and create apks
sanitycheck Basic sanity check of APKBUILD
snapshot Create a \$giturl or \$svnurl snapshot and upload to \$disturl
sourcecheck Check if remote source package exists upstream
@@ -2618,7 +2557,7 @@
if [ -z "$REPODEST" ]; then
warning "REPODEST is not set and is now required. Defaulting to ~/packages"
[ -n "$PKGDEST" ] && die "PKGDEST is no longer supported."
- REPODEST="~/packages"
+ REPODEST="$HOME/packages"
fi
# for recursive action
================================================
FILE: disabled-packages/abuild/build.sh
================================================
##
## Since Termux is continuing to use APT as package manager, abuild & apk-tools
## are disabled because don't have real use-cases currently.
##
## TODO: restore fakeroot functionality
TERMUX_PKG_HOMEPAGE=https://github.com/alpinelinux/abuild
TERMUX_PKG_DESCRIPTION="Build script to build Alpine packages"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=3.4.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/alpinelinux/abuild/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=f6f704e34f9d388a0228b645050dc7db7bf92f15a088835ae2c9b244420b9b61
TERMUX_PKG_DEPENDS="apk-tools, autoconf, automake, bash, clang, curl, libtool, make, openssl-tool, pkg-config, tar, zlib"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="sysconfdir=$TERMUX_PREFIX/etc"
TERMUX_PKG_CONFFILES="etc/abuild.conf"
TERMUX_PKG_RM_AFTER_INSTALL="
bin/abuild-adduser
bin/abuild-addgroup
bin/abuild-apk
bin/abuild-sudo
bin/buildlab
"
termux_step_post_make_install() {
install -Dm600 "$TERMUX_PKG_SRCDIR/abuild.conf" "$TERMUX_PREFIX/etc/abuild.conf"
}
================================================
FILE: disabled-packages/abuild/checkapk.in.patch
================================================
--- abuild-3.2.0/checkapk.in 2018-06-22 10:24:10.000000000 +0300
+++ abuild-3.2.0.mod/checkapk.in 2018-11-18 20:27:51.357171116 +0200
@@ -64,7 +64,7 @@
[ -f "$filepath" ] || die "can't find $pkgfile"
# generate a temp repositories file with only the http(s) repos
- grep -E "^https?:" /etc/apk/repositories > $tmpdir/repositories
+ grep -E "^https?:" @TERMUX_PREFIX@/etc/apk/repositories > $tmpdir/repositories
oldpkg=$(apk fetch --repositories-file $tmpdir/repositories --simulate 2>&1 | sed 's/^Downloading //')
if [ "${oldpkg}" = "${pkg}" ]; then
================================================
FILE: disabled-packages/abuild/functions.sh.in.patch
================================================
diff -uNr abuild-3.4.0/functions.sh.in abuild-3.4.0.mod/functions.sh.in
--- abuild-3.4.0/functions.sh.in 2019-06-14 15:13:23.000000000 +0300
+++ abuild-3.4.0.mod/functions.sh.in 2019-07-21 17:00:19.730135313 +0300
@@ -5,40 +5,20 @@
arch_to_hostspec() {
case "$1" in
- aarch64) echo "aarch64-alpine-linux-musl" ;;
- armel) echo "armv5-alpine-linux-musleabi" ;;
- armhf) echo "armv6-alpine-linux-musleabihf" ;;
- armv7) echo "armv7-alpine-linux-musleabihf" ;;
- mips) echo "mips-alpine-linux-musl" ;;
- mips64) echo "mips64-alpine-linux-musl" ;;
- mipsel) echo "mipsel-alpine-linux-musl" ;;
- mips64el) echo "mips64el-alpine-linux-musl" ;;
- ppc) echo "powerpc-alpine-linux-musl" ;;
- ppc64) echo "powerpc64-alpine-linux-musl" ;;
- ppc64le) echo "powerpc64le-alpine-linux-musl" ;;
- s390x) echo "s390x-alpine-linux-musl" ;;
- x86) echo "i586-alpine-linux-musl" ;;
- x86_64) echo "x86_64-alpine-linux-musl" ;;
+ aarch64) echo "aarch64-linux-android" ;;
+ arm) echo "arm-linux-androideabi" ;;
+ i686) echo "i686-linux-android" ;;
+ x86_64) echo "x86_64-linux-android" ;;
*) echo "unknown" ;;
esac
}
hostspec_to_arch() {
case "$1" in
- aarch64*-*-*-*) echo "aarch64" ;;
- arm*-*-*-*eabi) echo "armel" ;;
- armv6*-*-*-*eabihf) echo "armhf" ;;
- armv7*-*-*-*eabihf) echo "armv7" ;;
- i[0-9]86-*-*-*) echo "x86" ;;
- mips-*-*-*) echo "mips" ;;
- mips64-*-*-*) echo "mips64" ;;
- mipsel-*-*-*) echo "mipsel" ;;
- mips64el-*-*-*) echo "mips64el" ;;
- powerpc-*-*-*) echo "ppc" ;;
- powerpc64-*-*-*) echo "ppc64" ;;
- powerpc64le-*-*-*) echo "ppc64le" ;;
- s390x-*-*-*) echo "s390x" ;;
- x86_64-*-*-*) echo "x86_64" ;;
+ aarch64-*) echo "aarch64" ;;
+ arm-*) echo "arm" ;;
+ i686-*) echo "i686" ;;
+ x86_64-*) echo "x86_64" ;;
*) echo "unknown" ;;
esac
}
@@ -114,7 +94,7 @@
PACKAGER=${_PACKAGER-$PACKAGER}
USE_COLORS=${_USE_COLORS-$USE_COLORS}
- [ -z "$CBUILD" ] && CBUILD="$(gcc -dumpmachine)"
+ [ -z "$CBUILD" ] && CBUILD="$(clang -dumpmachine)"
[ -z "$CHOST" ] && CHOST="$CBUILD"
[ -z "$CTARGET" ] && CTARGET="$CHOST"
[ "$(arch_to_hostspec $CBUILD)" != "unknown" ] && CBUILD="$(arch_to_hostspec $CBUILD)"
@@ -134,11 +114,71 @@
# setup build root
[ -z "$CBUILDROOT" ] && export CBUILDROOT="$HOME/sysroot-$CTARGET_ARCH/"
# prepare pkg-config for cross building
- [ -z "$PKG_CONFIG_PATH" ] && export PKG_CONFIG_PATH="${CBUILDROOT}/usr/lib/pkgconfig/"
+ [ -z "$PKG_CONFIG_PATH" ] && export PKG_CONFIG_PATH="${CBUILDROOT}/lib/pkgconfig/"
[ -z "$PKG_CONFIG_SYSROOT_DIR" ] && export PKG_CONFIG_SYSROOT_DIR="${CBUILDROOT}"
+
# libtool bug workaround for extra rpaths
- [ -z "$lt_cv_sys_lib_dlsearch_path_spec" ] && \
- export lt_cv_sys_lib_dlsearch_path_spec="${CBUILDROOT}/lib ${CBUILDROOT}/usr/lib /usr/lib /lib /usr/local/lib"
+ if [ -z "$lt_cv_sys_lib_dlsearch_path_spec" ]; then
+ case $CTARGET_ARCH in
+ aarch64|x86_64) export lt_cv_sys_lib_dlsearch_path_spec="${CBUILDROOT}/lib @TERMUX_PREFIX@/lib /system/lib64" ;;
+ *) export lt_cv_sys_lib_dlsearch_path_spec="${CBUILDROOT}/lib @TERMUX_PREFIX@/lib /system/lib" ;;
+ esac
+ fi
+
+ # Originally set in build-package.sh script in Termux build environment.
+ # https://github.com/termux/termux-packages/blob/master/build-package.sh
+ export ac_cv_func_getpwent=no
+ export ac_cv_func_getpwnam=no
+ export ac_cv_func_getpwuid=no
+ export ac_cv_func_sigsetmask=no
+ export ac_cv_c_bigendian=no
+ export ac_cv_func_calloc_0_nonnull=yes
+ export ac_cv_func_calloc_0_nonnull=yes
+ export ac_cv_func_chown_works=yes
+ export ac_cv_func_getgroups_works=yes
+ export ac_cv_func_malloc_0_nonnull=yes
+ export ac_cv_func_realloc_0_nonnull=yes
+ export am_cv_func_working_getline=yes
+ export gl_cv_C_locale_sans_EILSEQ=yes
+ export gl_cv_func_dup2_works=yes
+ export gl_cv_func_fcntl_f_dupfd_cloexec=yes
+ export gl_cv_func_fcntl_f_dupfd_works=yes
+ export gl_cv_func_fnmatch_posix=yes
+ export gl_cv_func_getcwd_abort_bug=no
+ export gl_cv_func_getcwd_null=yes
+ export gl_cv_func_getcwd_path_max=yes
+ export gl_cv_func_getcwd_posix_signature=yes
+ export gl_cv_func_gettimeofday_clobber=no
+ export gl_cv_func_gettimeofday_posix_signature=yes
+ export gl_cv_func_link_works=yes
+ export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+ export gl_cv_func_malloc_0_nonnull=yes
+ export gl_cv_func_memchr_works=yes
+ export gl_cv_func_mkdir_trailing_dot_works=yes
+ export gl_cv_func_mkdir_trailing_slash_works=yes
+ export gl_cv_func_mkfifo_works=yes
+ export gl_cv_func_mknod_works=yes
+ export gl_cv_func_realpath_works=yes
+ export gl_cv_func_select_detects_ebadf=yes
+ export gl_cv_func_snprintf_posix=yes
+ export gl_cv_func_snprintf_retval_c99=yes
+ export gl_cv_func_snprintf_truncation_c99=yes
+ export gl_cv_func_stat_dir_slash=yes
+ export gl_cv_func_stat_file_slash=yes
+ export gl_cv_func_strerror_0_works=yes
+ export gl_cv_func_symlink_works=yes
+ export gl_cv_func_tzset_clobber=no
+ export gl_cv_func_unlink_honors_slashes=yes
+ export gl_cv_func_unlink_honors_slashes=yes
+ export gl_cv_func_vsnprintf_posix=yes
+ export gl_cv_func_vsnprintf_zerosize_c99=yes
+ export gl_cv_func_wcwidth_works=yes
+ export gl_cv_func_working_getdelim=yes
+ export gl_cv_func_working_mkstemp=yes
+ export gl_cv_func_working_mktime=yes
+ export gl_cv_func_working_strerror=yes
+ export gl_cv_header_working_fcntl_h=yes
+
# setup cross-compiler
if [ -z "$CROSS_COMPILE" ]; then
export CROSS_COMPILE="${CHOST}-"
@@ -149,8 +189,8 @@
export HOSTCXXFLAGS="$CXXFLAGS"
export HOSTCFLAGS="$CFLAGS"
export HOSTLDFLAGS="$LDFLAGS"
- export CC=${CROSS_COMPILE}gcc
- export CXX=${CROSS_COMPILE}g++
+ export CC=${CROSS_COMPILE}clang
+ export CXX=${CROSS_COMPILE}clang++
export LD=${CROSS_COMPILE}ld
export CPPFLAGS="--sysroot=${CBUILDROOT} $CPPFLAGS"
export CXXFLAGS="--sysroot=${CBUILDROOT} $CXXFLAGS"
================================================
FILE: disabled-packages/abuild/sample.APKBUILD.patch
================================================
--- abuild-3.2.0/sample.APKBUILD 2018-06-22 10:24:10.000000000 +0300
+++ abuild-3.2.0.mod/sample.APKBUILD 2018-11-19 01:28:10.783277331 +0200
@@ -27,10 +27,10 @@
build() {
cd "$builddir"
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info
+ ./configure --prefix=$PREFIX \
+ --sysconfdir=$PREFIX/etc \
+ --mandir=$PREFIX/share/man \
+ --infodir=$PREFIX/share/info
make
}
================================================
FILE: disabled-packages/alsa-lib/alsa-conf-dir.patch
================================================
--- ./src/conf/alsa.conf.orig 2016-12-20 14:43:20.000000000 +0000
+++ ./src/conf/alsa.conf 2017-03-06 22:51:47.242150837 +0000
@@ -15,7 +15,7 @@
"/alsa.conf.d/"
]
}
- "/etc/asound.conf"
+ "@TERMUX_PREFIX@/etc/asound.conf"
"~/.asoundrc"
]
errors false
================================================
FILE: disabled-packages/alsa-lib/build.sh
================================================
# patches taken from https://github.com/michaelwu/alsa-lib
TERMUX_PKG_HOMEPAGE=http://www.alsa-project.org
TERMUX_PKG_VERSION=1.1.3
# TERMUX_PKG_DEPENDS="libandroid-shmem, python2"
TERMUX_PKG_DEPENDS="libandroid-shmem"
TERMUX_PKG_SRCURL=ftp://ftp.alsa-project.org/pub/lib/alsa-lib-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=71282502184c592c1a008e256c22ed0ba5728ca65e05273ceb480c70f515969c
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-pythonlibs=\"-lpython2.7\" --with-pythonincludes=-I/$TERMUX_PREFIX/include/python2.7"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-python"
termux_step_pre_configure() {
#LDFLAGS="$LDFLAGS -landroid-shmem"
#_files='src/pcm/pcm_dsnoop.c src/pcm/pcm_mmap.c src/pcm/pcm_shm.c src/pcm/pcm_dmix.c src/pcm/pcm_dshare.c src/pcm/pcm_direct.c src/shmarea.c src/control/control_shm.c aserver/aserver.c'
#for _file in $_files; do sed -i 's%#include %#include %' "$TERMUX_PKG_SRCDIR/$_file"; done
#export ac_cv_header_sys_shm_h='no'
CPPFLAGS="$CPPFLAGS -DTERMUX_SHMEM_STUBS -DTERMUX_SEMOPS_STUBS"
}
================================================
FILE: disabled-packages/alsa-lib/pcm_direct.c.patch
================================================
--- ./src/pcm/pcm_direct.c 2016-08-02 23:18:38.000000000 +0530
+++ ./src/pcm/pcm_direct.c 2016-12-02 23:19:30.771819040 +0530
@@ -44,12 +44,14 @@
*
*/
+#if !defined(ANDROID) && !defined(__ANDROID__)
union semun {
int val; /* Value for SETVAL */
struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */
unsigned short *array; /* Array for GETALL, SETALL */
struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */
};
+#endif
/*
* FIXME:
================================================
FILE: disabled-packages/alsa-lib/pcm_mmap.c.patch.old
================================================
--- ./src/pcm/pcm_mmap.c 2016-08-02 23:18:38.000000000 +0530
+++ /home/vishal/AndroidDev/alsa/src/pcm/pcm_mmap.c 2016-12-03 00:06:36.620336924 +0530
@@ -344,7 +344,7 @@
i->addr = ptr;
break;
case SND_PCM_AREA_SHM:
-#ifdef HAVE_SYS_SHM_H
+#if 0
if (i->u.shm.shmid < 0) {
int id;
/* FIXME: safer permission? */
@@ -474,7 +474,7 @@
errno = 0;
break;
case SND_PCM_AREA_SHM:
-#ifdef HAVE_SYS_SHM_H
+#if 0
if (i->u.shm.area) {
snd_shm_area_destroy(i->u.shm.area);
i->u.shm.area = NULL;
================================================
FILE: disabled-packages/alsa-lib/versionsort.patch
================================================
diff -ruN ./src/conf.c /home/vishal/AndroidDev/alsa/src/conf.c
--- ./src/conf.c 2016-08-02 23:18:38.000000000 +0530
+++ /home/vishal/AndroidDev/alsa/src/conf.c 2016-12-02 23:42:04.689785910 +0530
@@ -3558,7 +3558,7 @@
int n;
#ifndef DOC_HIDDEN
-#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
+#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(__ANDROID__) && !defined(ANDROID)
#define SORTFUNC versionsort
#else
#define SORTFUNC alphasort
diff -ruN ./src/ucm/parser.c /home/vishal/AndroidDev/alsa/src/ucm/parser.c
--- ./src/ucm/parser.c 2016-08-02 23:18:38.000000000 +0530
+++ /home/vishal/AndroidDev/alsa/src/ucm/parser.c 2016-12-02 23:42:17.406370931 +0530
@@ -1274,7 +1274,7 @@
"%s", env ? env : ALSA_USE_CASE_DIR);
filename[MAX_FILE-1] = '\0';
-#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
+#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(__ANDROID__) && !defined(ANDROID)
#define SORTFUNC versionsort
#else
#define SORTFUNC alphasort
================================================
FILE: disabled-packages/alsa-plugins/asound.conf
================================================
# Use pulseaudio by default
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
# vim:set ft=alsaconf:
================================================
FILE: disabled-packages/alsa-plugins/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.alsa-project.org
TERMUX_PKG_VERSION=1.1.1
TERMUX_PKG_SRCURL=ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=8ea4d1e082c36528a896a2581e5eb62d4dc2683238e353050d0d624e65f901f1
TERMUX_PKG_DEPENDS="alsa-lib, pulseaudio"
TERMUX_PKG_EXTRA_MAKE_ARGS='SUBDIRS=pulse'
termux_step_post_make_install() {
cp $TERMUX_PKG_BUILDER_DIR/asound.conf $TERMUX_PREFIX/etc
}
================================================
FILE: disabled-packages/alsa-utils/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.alsa-project.org
TERMUX_PKG_VERSION=1.1.3
TERMUX_PKG_SRCURL=ftp://ftp.alsa-project.org/pub/utils/alsa-utils-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=127217a54eea0f9a49700a2f239a2d4f5384aa094d68df04a8eb80132eb6167c
TERMUX_PKG_DEPENDS="alsa-lib, ncurses"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-udev-rules-dir=$TERMUX_PREFIX/lib/udev/rules.d --with-asound-state-dir=$TERMUX_PREFIX/var/lib/alsa --disable-bat --disable-rst2man"
termux_step_pre_configure() {
LDFLAGS+=" -llog"
}
================================================
FILE: disabled-packages/alsa-utils/configure.patch
================================================
--- ./configure 2016-08-02 22:44:23.000000000 +0530
+++ ../configure 2016-12-03 23:06:46.641370754 +0530
@@ -7123,7 +7123,7 @@
LDFLAGS="$LDFLAGS $ALSA_LIBS"
fi
-ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
+ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl"
LIBS="$ALSA_LIBS $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
$as_echo "$ALSA_LIBS" >&6; }
@@ -7741,7 +7741,6 @@
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7776,7 +7775,6 @@
#define HAVE_LIBPTHREAD 1
_ACEOF
- LIBS="-lpthread $LIBS"
else
as_fn_error $? "Error: need PTHREAD library" "$LINENO" 5
================================================
FILE: disabled-packages/alsa-utils/volume_mapping.c.patch
================================================
--- ./alsamixer/volume_mapping.c 2016-08-02 22:39:45.000000000 +0530
+++ ../volume_mapping.c 2016-12-03 23:15:26.390744307 +0530
@@ -37,7 +37,7 @@
#include
#include "volume_mapping.h"
-#ifdef __UCLIBC__
+#if defined(__UCLIBC__) || defined(__ANDROID__)
/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
#define exp10(x) (exp((x) * log(10)))
#endif /* __UCLIBC__ */
================================================
FILE: disabled-packages/ant/ant
================================================
#!@TERMUX_PREFIX@/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e -u
# Extract launch and ant arguments, (see details below).
ant_exec_args=
no_config=false
ant_exec_debug=false
show_help=false
for arg in "$@" ; do
if [ "$arg" = "--noconfig" ] ; then
no_config=true
elif [ "$arg" = "--execdebug" ] ; then
ant_exec_debug=true
elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then
show_help=true
ant_exec_args="$ant_exec_args -h"
else
if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then
show_help=true
fi
ant_exec_args="$ant_exec_args \"$arg\""
fi
done
if [ -z "$ANT_HOME" ]; then
ANT_HOME=@TERMUX_PREFIX@/share/ant
fi
if ! $no_config ; then
if [ -f "$HOME/.ant/ant.conf" ] ; then
. $HOME/.ant/ant.conf
fi
if [ -f "$HOME/.antrc" ] ; then
. "$HOME/.antrc"
fi
fi
ANT_LIB="${ANT_HOME}/lib"
if [ -z "$LOCALCLASSPATH" ] ; then
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
else
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
fi
# Show script help if requested
if $show_help ; then
echo $0 '[script options] [options] [target [target2 [target3] ..]]'
echo 'Script Options:'
echo ' --help, --h print this message and ant help'
echo ' --noconfig suppress sourcing of /etc/ant.conf,'
echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
echo ' configuration files'
echo ' --execdebug print ant exec line generated by this'
echo ' launch script'
echo ' '
fi
# Execute ant using eval/exec to preserve spaces in paths, java options, and ant args
ant_sys_opts=
ant_exec_command="exec dalvikvm $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\""
if $ant_exec_debug ; then
echo $ant_exec_command $ant_exec_args
fi
eval $ant_exec_command "$ant_exec_args"
================================================
FILE: disabled-packages/ant/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://ant.apache.org/
TERMUX_PKG_DESCRIPTION="Java based build tool like make"
TERMUX_PKG_VERSION=1.9.6
TERMUX_PKG_SRCURL=http://apache.mirrors.spacedump.net//ant/binaries/apache-ant-${TERMUX_PKG_VERSION}-bin.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install() {
mkdir -p $TERMUX_PREFIX/share/ant/lib
for jar in ant ant-launcher; do
$TERMUX_DX \
--dex \
--output=$TERMUX_PREFIX/share/ant/lib/${jar}.jar \
lib/${jar}.jar
done
install $TERMUX_PKG_BUILDER_DIR/ant $TERMUX_PREFIX/bin/ant
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/ant
}
================================================
FILE: disabled-packages/apk-tools/Make.rules.patch
================================================
diff -u -r ../apk-tools-2.10.1/Make.rules ./Make.rules
--- ../apk-tools-2.10.1/Make.rules 2018-09-10 08:04:03.000000000 +0000
+++ ./Make.rules 2018-09-10 21:36:27.914805239 +0000
@@ -64,9 +64,9 @@
# Utilities and default flags for them.
CROSS_COMPILE ?=
-CC := $(CROSS_COMPILE)gcc
-AR := $(CROSS_COMPILE)ar
-LD := $(CROSS_COMPILE)ld
+CC ?= $(CROSS_COMPILE)gcc
+AR ?= $(CROSS_COMPILE)ar
+LD ?= $(CROSS_COMPILE)ld
INSTALL := install
INSTALLDIR := $(INSTALL) -d
================================================
FILE: disabled-packages/apk-tools/Makefile.patch
================================================
diff -u -r ../apk-tools-2.10.1/Makefile ./Makefile
--- ../apk-tools-2.10.1/Makefile 2018-09-10 08:04:03.000000000 +0000
+++ ./Makefile 2018-09-10 21:58:19.631911343 +0000
@@ -10,11 +10,11 @@
# Default directories
DESTDIR :=
-SBINDIR := /sbin
-LIBDIR := /lib
-CONFDIR := /etc/apk
-MANDIR := /usr/share/man
-DOCDIR := /usr/share/doc/apk
+SBINDIR := @TERMUX_PREFIX@/bin
+LIBDIR := @TERMUX_PREFIX@/lib
+CONFDIR := @TERMUX_PREFIX@/etc/apk
+MANDIR := @TERMUX_PREFIX@/share/man
+DOCDIR := @TERMUX_PREFIX@/share/doc/apk
export DESTDIR SBINDIR LIBDIR CONFDIR MANDIR DOCDIR
================================================
FILE: disabled-packages/apk-tools/build.sh
================================================
##
## Since Termux is continuing to use APT as package manager, abuild & apk-tools
## are disabled because don't have real use-cases currently.
##
TERMUX_PKG_HOMEPAGE=https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
TERMUX_PKG_DESCRIPTION="Alpine Linux package management tools"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=2.10.4
TERMUX_PKG_SRCURL=https://github.com/alpinelinux/apk-tools/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c08aa725a0437a6a83c5364a1a3a468e4aef5d1d09523369074779021397281c
TERMUX_PKG_DEPENDS="openssl, zlib"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_MAKE_ARGS="LUAAPK="
TERMUX_PKG_CONFFILES="etc/apk/repositories"
termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/etc/apk/
echo $TERMUX_ARCH > $TERMUX_PREFIX/etc/apk/arch
echo "https://termux.net/apk/main" > $TERMUX_PREFIX/etc/apk/repositories
}
termux_step_post_massage() {
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/keys"
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/protected_paths.d"
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/apk/db/"
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk"
ln -sfr \
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk" \
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/cache"
}
termux_step_create_debscripts() {
{
echo "#!$TERMUX_PREFIX/bin/sh"
echo "touch $TERMUX_PREFIX/etc/apk/world"
} > ./postinst
chmod 755 postinst
}
================================================
FILE: disabled-packages/apk-tools/libfetch-http.c.patch
================================================
diff -uNr apk-tools-2.10.4/libfetch/http.c apk-tools-2.10.4.mod/libfetch/http.c
--- apk-tools-2.10.4/libfetch/http.c 2019-06-05 15:34:16.000000000 +0300
+++ apk-tools-2.10.4.mod/libfetch/http.c 2019-07-21 16:38:08.300760202 +0300
@@ -496,14 +496,11 @@
static int
http_parse_mtime(const char *p, time_t *mtime)
{
- char *locale, *r;
+ char *r;
struct tm tm;
- locale = strdupa(setlocale(LC_TIME, NULL));
- setlocale(LC_TIME, "C");
r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm);
- /* XXX should add support for date-2 and date-3 */
- setlocale(LC_TIME, locale);
+
if (r == NULL)
return (-1);
*mtime = timegm(&tm);
================================================
FILE: disabled-packages/apk-tools/src-apk.c.patch
================================================
diff -u -r ../apk-tools-2.10.1/src/apk.c ./src/apk.c
--- ../apk-tools-2.10.1/src/apk.c 2018-09-10 08:04:03.000000000 +0000
+++ ./src/apk.c 2018-09-10 22:02:50.668809543 +0000
@@ -486,7 +486,7 @@
apk_flags |= APK_PROGRESS;
if (!(apk_flags & APK_SIMULATE) &&
- access("/etc/apk/interactive", F_OK) == 0)
+ access("@TERMUX_PREFIX@/etc/apk/interactive", F_OK) == 0)
apk_flags |= APK_INTERACTIVE;
}
================================================
FILE: disabled-packages/apk-tools/src-archive.c.patch
================================================
diff -uNr apk-tools-2.10.3/src/archive.c apk-tools-2.10.3.mod/src/archive.c
--- apk-tools-2.10.3/src/archive.c 2018-11-15 15:09:07.000000000 +0200
+++ apk-tools-2.10.3.mod/src/archive.c 2018-11-19 17:36:03.835900565 +0200
@@ -20,6 +20,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -441,7 +442,9 @@
struct apk_istream *is,
apk_progress_cb cb, void *cb_ctx)
{
+#ifndef __ANDROID__
struct apk_xattr *xattr;
+#endif
const char *fn = extract_name ?: ae->name;
int fd, r = -1, atflags = 0, ret = 0;
@@ -487,12 +490,14 @@
return ret;
}
+#ifndef __ANDROID__
r = fchownat(atfd, fn, ae->uid, ae->gid, atflags);
if (r < 0) {
apk_error("Failed to set ownership on %s: %s",
fn, strerror(errno));
if (!ret) ret = -errno;
}
+#endif
/* chown resets suid bit so we need set it again */
if (ae->mode & 07000) {
@@ -506,6 +511,7 @@
}
/* extract xattrs */
+#ifndef __ANDROID__
if (!S_ISLNK(ae->mode) && ae->xattrs && ae->xattrs->num) {
r = 0;
fd = openat(atfd, fn, O_RDWR);
@@ -527,6 +533,7 @@
if (!ret) ret = r;
}
}
+#endif
if (!S_ISLNK(ae->mode)) {
/* preserve modification time */
================================================
FILE: disabled-packages/apk-tools/src-commit.c.patch
================================================
diff -uNr apk-tools-2.10.3/src/commit.c apk-tools-2.10.3.mod/src/commit.c
--- apk-tools-2.10.3/src/commit.c 2018-11-15 15:09:07.000000000 +0200
+++ apk-tools-2.10.3.mod/src/commit.c 2018-11-19 17:44:44.799596053 +0200
@@ -19,6 +19,8 @@
#include "apk_print.h"
+#include "termux_prefix.h"
+
static inline int pkg_available(struct apk_database *db, struct apk_package *pkg)
{
if (pkg->repos & db->available_repos)
@@ -235,7 +237,7 @@
if (file[0] == '.') return 0;
if ((apk_flags & (APK_NO_SCRIPTS | APK_SIMULATE)) != 0) return 0;
- snprintf(fn, sizeof(fn), "etc/apk/commit_hooks.d" "/%s", file);
+ snprintf(fn, sizeof(fn), TERMUX_PREFIX_RELATIVE"etc/apk/commit_hooks.d" "/%s", file);
if ((apk_flags & APK_NO_COMMIT_HOOKS) != 0) {
apk_message("Skipping: %s %s", fn, commit_hook_str[hook->type]);
return 0;
@@ -251,7 +253,7 @@
static int run_commit_hooks(struct apk_database *db, int type)
{
struct apk_commit_hook hook = { .db = db, .type = type };
- return apk_dir_foreach_file(openat(db->root_fd, "etc/apk/commit_hooks.d", O_RDONLY | O_CLOEXEC),
+ return apk_dir_foreach_file(openat(db->root_fd, TERMUX_PREFIX_RELATIVE"etc/apk/commit_hooks.d", O_RDONLY | O_CLOEXEC),
run_commit_hook, &hook);
}
================================================
FILE: disabled-packages/apk-tools/src-database.c.patch
================================================
diff -uNr apk-tools-2.10.3/src/database.c apk-tools-2.10.3.mod/src/database.c
--- apk-tools-2.10.3/src/database.c 2018-11-15 15:09:07.000000000 +0200
+++ apk-tools-2.10.3.mod/src/database.c 2018-11-19 17:45:05.469750983 +0200
@@ -37,6 +37,8 @@
#include "apk_print.h"
#include "apk_openssl.h"
+#include "termux_prefix.h"
+
static const apk_spn_match_def apk_spn_repo_separators = {
[4] = (1<<0) /* */,
[7] = (1<<2) /*:*/,
@@ -54,22 +56,22 @@
static const char * const apkindex_tar_gz = "APKINDEX.tar.gz";
-static const char * const apk_static_cache_dir = "var/cache/apk";
+static const char * const apk_static_cache_dir = TERMUX_PREFIX_RELATIVE"var/cache/apk";
-static const char * const apk_world_file = "etc/apk/world";
-static const char * const apk_world_file_tmp = "etc/apk/world.new";
-static const char * const apk_arch_file = "etc/apk/arch";
+static const char * const apk_world_file = TERMUX_PREFIX_RELATIVE"etc/apk/world";
+static const char * const apk_world_file_tmp = TERMUX_PREFIX_RELATIVE"etc/apk/world.new";
+static const char * const apk_arch_file = TERMUX_PREFIX_RELATIVE"etc/apk/arch";
-static const char * const apk_lock_file = "lib/apk/db/lock";
+static const char * const apk_lock_file = TERMUX_PREFIX_RELATIVE"lib/apk/db/lock";
-static const char * const apk_scripts_file = "lib/apk/db/scripts.tar";
-static const char * const apk_scripts_file_tmp = "lib/apk/db/scripts.tar.new";
+static const char * const apk_scripts_file = TERMUX_PREFIX_RELATIVE"lib/apk/db/scripts.tar";
+static const char * const apk_scripts_file_tmp = TERMUX_PREFIX_RELATIVE"lib/apk/db/scripts.tar.new";
-static const char * const apk_triggers_file = "lib/apk/db/triggers";
-static const char * const apk_triggers_file_tmp = "lib/apk/db/triggers.new";
+static const char * const apk_triggers_file = TERMUX_PREFIX_RELATIVE"lib/apk/db/triggers";
+static const char * const apk_triggers_file_tmp = TERMUX_PREFIX_RELATIVE"lib/apk/db/triggers.new";
-const char * const apk_installed_file = "lib/apk/db/installed";
-static const char * const apk_installed_file_tmp = "lib/apk/db/installed.new";
+const char * const apk_installed_file = TERMUX_PREFIX_RELATIVE"lib/apk/db/installed";
+static const char * const apk_installed_file_tmp = TERMUX_PREFIX_RELATIVE"lib/apk/db/installed.new";
static struct apk_db_acl *apk_default_acl_dir, *apk_default_acl_file;
@@ -1332,19 +1334,20 @@
static int apk_db_create(struct apk_database *db)
{
int fd;
-
- mkdirat(db->root_fd, "tmp", 01777);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"tmp", 01777);
mkdirat(db->root_fd, "dev", 0755);
+#ifndef __ANDROID__
mknodat(db->root_fd, "dev/null", S_IFCHR | 0666, makedev(1, 3));
- mkdirat(db->root_fd, "etc", 0755);
- mkdirat(db->root_fd, "etc/apk", 0755);
- mkdirat(db->root_fd, "lib", 0755);
- mkdirat(db->root_fd, "lib/apk", 0755);
- mkdirat(db->root_fd, "lib/apk/db", 0755);
- mkdirat(db->root_fd, "var", 0755);
- mkdirat(db->root_fd, "var/cache", 0755);
- mkdirat(db->root_fd, "var/cache/apk", 0755);
- mkdirat(db->root_fd, "var/cache/misc", 0755);
+#endif
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"etc", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"etc/apk", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"lib", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"lib/apk", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"lib/apk/db", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"var", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"var/cache", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"var/cache/apk", 0755);
+ mkdirat(db->root_fd, TERMUX_PREFIX_RELATIVE"var/cache/misc", 0755);
fd = openat(db->root_fd, apk_world_file, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC, 0644);
if (fd < 0)
@@ -1533,7 +1536,7 @@
!(dbopts->open_flags & APK_OPENF_NO_AUTOUPDATE) &&
!(apk_flags & APK_NO_NETWORK))
db->autoupdate = 1;
- if (!dbopts->cache_dir) dbopts->cache_dir = "etc/apk/cache";
+ if (!dbopts->cache_dir) dbopts->cache_dir = TERMUX_PREFIX_RELATIVE"etc/apk/cache";
apk_db_setup_repositories(db, dbopts->cache_dir);
@@ -1625,7 +1628,7 @@
blob = APK_BLOB_STR("+etc\n" "@etc/init.d\n" "!etc/apk\n");
apk_blob_for_each_segment(blob, "\n", add_protected_path, db);
- apk_dir_foreach_file(openat(db->root_fd, "etc/apk/protected_paths.d", O_RDONLY | O_CLOEXEC),
+ apk_dir_foreach_file(openat(db->root_fd, TERMUX_PREFIX_RELATIVE"etc/apk/protected_paths.d", O_RDONLY | O_CLOEXEC),
add_protected_paths_from_file, db);
/* figure out where to have the cache */
@@ -1655,7 +1658,7 @@
}
db->keys_fd = openat(db->root_fd,
- dbopts->keys_dir ?: "etc/apk/keys",
+ dbopts->keys_dir ?: TERMUX_PREFIX_RELATIVE"etc/apk/keys",
O_RDONLY | O_CLOEXEC);
if (apk_flags & APK_OVERLAY_FROM_STDIN) {
@@ -1693,8 +1696,8 @@
apk_db_add_repository(db, APK_BLOB_STR(repo->url));
if (dbopts->repositories_file == NULL) {
- add_repos_from_file(db, db->root_fd, "etc/apk/repositories");
- apk_dir_foreach_file(openat(db->root_fd, "etc/apk/repositories.d", O_RDONLY | O_CLOEXEC),
+ add_repos_from_file(db, db->root_fd, TERMUX_PREFIX_RELATIVE"etc/apk/repositories");
+ apk_dir_foreach_file(openat(db->root_fd, TERMUX_PREFIX_RELATIVE"etc/apk/repositories.d", O_RDONLY | O_CLOEXEC),
add_repos_from_file, db);
} else {
add_repos_from_file(db, db->root_fd, dbopts->repositories_file);
@@ -1931,7 +1934,7 @@
int status;
pid_t pid;
static char * const environment[] = {
- "PATH=/usr/sbin:/usr/bin:/sbin:/bin",
+ "PATH=@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets",
NULL
};
@@ -1968,9 +1971,10 @@
r = fstatat(db->root_fd, dir->name, &st, AT_SYMLINK_NOFOLLOW);
if (r < 0 || (st.st_mode & 07777) != (dir->mode & 07777))
fchmodat(db->root_fd, dir->name, dir->mode, 0);
+#ifndef __ANDROID__
if (r < 0 || st.st_uid != dir->uid || st.st_gid != dir->gid)
fchownat(db->root_fd, dir->name, dir->uid, dir->gid, 0);
-
+#endif
return 0;
}
================================================
FILE: disabled-packages/apk-tools/src-io.c.patch
================================================
diff -uNr apk-tools-2.10.3/src/io.c apk-tools-2.10.3.mod/src/io.c
--- apk-tools-2.10.3/src/io.c 2018-11-15 15:09:07.000000000 +0200
+++ apk-tools-2.10.3.mod/src/io.c 2018-11-19 17:36:03.842567276 +0200
@@ -1012,6 +1012,7 @@
.delete_item = (apk_hash_delete_f) free,
};
+#ifndef __ANDROID__
static struct cache_item *resolve_cache_item(struct apk_hash *hash, apk_blob_t name)
{
struct cache_item *ci;
@@ -1032,6 +1033,7 @@
return ci;
}
+#endif
void apk_id_cache_init(struct apk_id_cache *idc, int root_fd)
{
@@ -1056,6 +1058,9 @@
uid_t apk_resolve_uid(struct apk_id_cache *idc, const char *username, uid_t default_uid)
{
+#ifdef __ANDROID__
+ return getuid();
+#else
#ifdef HAVE_FGETPWENT_R
char buf[1024];
struct passwd pwent;
@@ -1095,10 +1100,14 @@
return ci->uid;
return default_uid;
+#endif
}
uid_t apk_resolve_gid(struct apk_id_cache *idc, const char *groupname, uid_t default_gid)
{
+#ifdef __ANDROID__
+ return getgid();
+#else
#ifdef HAVE_FGETGRENT_R
char buf[1024];
struct group grent;
@@ -1138,4 +1147,5 @@
return ci->gid;
return default_gid;
+#endif
}
================================================
FILE: disabled-packages/apk-tools/src-package.c.patch
================================================
diff -uNr apk-tools-2.10.3/src/package.c apk-tools-2.10.3.mod/src/package.c
--- apk-tools-2.10.3/src/package.c 2018-11-15 15:09:07.000000000 +0200
+++ apk-tools-2.10.3.mod/src/package.c 2018-11-19 17:44:51.566313390 +0200
@@ -30,6 +30,8 @@
#include "apk_database.h"
#include "apk_print.h"
+#include "termux_prefix.h"
+
static const apk_spn_match_def apk_spn_dependency_comparer = {
[7] = (1<<4) /*<*/ | (1<<5) /*=*/ | (1<<6) /*<*/,
[15] = (1<<6) /*~*/
@@ -1008,7 +1010,7 @@
argv[0] = (char *) apk_script_types[type];
/* Avoid /tmp as it can be mounted noexec */
- snprintf(fn, sizeof(fn), "var/cache/misc/" PKG_VER_FMT ".%s",
+ snprintf(fn, sizeof(fn), TERMUX_PREFIX_RELATIVE"var/cache/misc/" PKG_VER_FMT ".%s",
PKG_VER_PRINTF(pkg),
apk_script_types[type]);
@@ -1018,7 +1020,7 @@
apk_message("Executing %s", &fn[15]);
fd = openat(root_fd, fn, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC, 0755);
if (fd < 0) {
- mkdirat(root_fd, "var/cache/misc", 0755);
+ mkdirat(root_fd, TERMUX_PREFIX_RELATIVE"var/cache/misc", 0755);
fd = openat(root_fd, fn, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC, 0755);
if (fd < 0) goto err_log;
}
================================================
FILE: disabled-packages/apk-tools/src-termux_prefix.h.patch
================================================
diff -uNr apk-tools-2.10.3/src/termux_prefix.h apk-tools-2.10.3.mod/src/termux_prefix.h
--- apk-tools-2.10.3/src/termux_prefix.h 1970-01-01 03:00:00.000000000 +0300
+++ apk-tools-2.10.3.mod/src/termux_prefix.h 2018-11-19 17:42:52.188760273 +0200
@@ -0,0 +1,6 @@
+#ifndef __TERMUX_PREFIX_H
+#define __TERMUX_PREFIX_H
+
+#define TERMUX_PREFIX_RELATIVE "data/data/com.termux/files/usr/"
+
+#endif
================================================
FILE: disabled-packages/apt-updated/CMakeLists.txt.patch
================================================
diff -u -r ../apt-1.6~alpha3/CMakeLists.txt ./CMakeLists.txt
--- ../apt-1.6~alpha3/CMakeLists.txt 2017-10-28 17:57:05.000000000 +0200
+++ ./CMakeLists.txt 2017-11-02 17:42:28.162838378 +0100
@@ -33,7 +33,6 @@
include(GNUInstallDirs)
include(TestBigEndian)
find_package(Threads REQUIRED)
-find_package(LFS REQUIRED)
find_package(Iconv REQUIRED)
find_package(Perl REQUIRED)
@@ -44,11 +43,6 @@
include_directories(${Intl_INCLUDE_DIRS})
endif()
-# Add large file support
-add_compile_options(${LFS_COMPILE_OPTIONS})
-add_definitions(${LFS_DEFINITIONS})
-link_libraries(${LFS_LIBRARIES})
-
# Set compiler flags
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -69,12 +63,6 @@
add_optional_compile_options(Wsign-promo)
add_optional_compile_options(Wundef)
-# apt-ftparchive dependencies
-find_package(BerkeleyDB REQUIRED)
-if (BERKELEY_DB_FOUND)
- set(HAVE_BDB 1)
-endif()
-
find_package(GnuTLS REQUIRED)
if (GNUTLS_FOUND)
set(HAVE_GNUTLS 1)
@@ -87,22 +75,12 @@
endif()
-find_package(BZip2 REQUIRED)
-if (BZIP2_FOUND)
- set(HAVE_BZ2 1)
-endif()
-
find_package(LZMA REQUIRED)
if (LZMA_FOUND)
set(HAVE_LZMA 1)
endif()
-find_package(LZ4 REQUIRED)
-if (LZ4_FOUND)
- set(HAVE_LZ4 1)
-endif()
-
find_package(Udev)
if (UDEV_FOUND)
set(HAVE_UDEV 1)
@@ -184,10 +162,10 @@
message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
endif()
-if (NOT DEFINED COMMON_ARCH)
- execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
- OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
+# if (NOT DEFINED COMMON_ARCH)
+# execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
+ #OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
+# endif()
if (NOT DEFINED ROOT_GROUP)
execute_process(COMMAND id -gn root
OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -215,11 +193,8 @@
add_subdirectory(apt-inst)
add_subdirectory(cmdline)
add_subdirectory(completions)
-add_subdirectory(doc)
add_subdirectory(dselect)
-add_subdirectory(ftparchive)
add_subdirectory(methods)
-add_subdirectory(test)
if (USE_NLS)
add_subdirectory(po)
================================================
FILE: disabled-packages/apt-updated/apt-pkg-contrib-fileutl.patch
================================================
diff -u -r ../apt-1.6~alpha3/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
--- ../apt-1.6~alpha3/apt-pkg/contrib/fileutl.cc 2017-10-28 17:57:05.000000000 +0200
+++ ./apt-pkg/contrib/fileutl.cc 2017-11-02 17:38:43.633482989 +0100
@@ -37,7 +37,9 @@
#include
#include
#include
+#ifndef __ANDROID__
#include
+#endif
#include
#include
#include
@@ -2790,6 +2792,7 @@
}
/*}}}*/
+#ifndef __ANDROID__
// Glob - wrapper around "glob()" /*{{{*/
std::vector Glob(std::string const &pattern, int flags)
{
@@ -2815,6 +2818,7 @@
globfree(&globbuf);
return result;
}
+#endif
/*}}}*/
static std::string APT_NONNULL(1) GetTempDirEnv(char const * const env) /*{{{*/
{
diff -u -r ../apt-1.6~alpha3/apt-pkg/contrib/fileutl.h ./apt-pkg/contrib/fileutl.h
--- ../apt-1.6~alpha3/apt-pkg/contrib/fileutl.h 2017-10-28 17:57:05.000000000 +0200
+++ ./apt-pkg/contrib/fileutl.h 2017-11-02 17:37:38.518249720 +0100
@@ -262,7 +262,9 @@
APT_HIDDEN std::string flNormalize(std::string file);
// simple c++ glob
+#ifndef __ANDROID__
std::vector Glob(std::string const &pattern, int flags=0);
+#endif
/** \brief Popen() implementation that execv() instead of using a shell
*
================================================
FILE: disabled-packages/apt-updated/apt-pkg-contrib-srvrec.cc.patch
================================================
diff -u -r ../apt-1.1.3/apt-pkg/contrib/srvrec.cc ./apt-pkg/contrib/srvrec.cc
--- ../apt-1.1.3/apt-pkg/contrib/srvrec.cc 2015-11-30 03:08:24.000000000 -0500
+++ ./apt-pkg/contrib/srvrec.cc 2015-12-03 16:21:54.397715576 -0500
@@ -40,14 +40,24 @@
struct servent *s_ent = nullptr;
std::vector buf(1024);
+#ifdef __ANDROID__
+ s_ent = getservbyport(htons(port), "tcp");
+ if (s_ent == nullptr) return false;
+#else
res = getservbyport_r(htons(port), "tcp", &s_ent_buf, buf.data(), buf.size(), &s_ent);
if (res != 0 || s_ent == nullptr)
return false;
+#endif
strprintf(target, "_%s._tcp.%s", s_ent->s_name, host.c_str());
return GetSrvRecords(target, Result);
}
+#ifdef __ANDROID__
+extern "C" int __dn_skipname(const unsigned char* comp_dn, const unsigned char* eom);
+static inline int dn_skipname(const unsigned char* a, const unsigned char* b) { return __dn_skipname(a,b); }
+#endif
+
bool GetSrvRecords(std::string name, std::vector &Result)
{
unsigned char answer[PACKETSZ];
================================================
FILE: disabled-packages/apt-updated/apt-pkg-contrib-strutl.cc.patch
================================================
diff -u -r ../apt-1.4.7/apt-pkg/contrib/strutl.cc ./apt-pkg/contrib/strutl.cc
--- ../apt-1.4.7/apt-pkg/contrib/strutl.cc 2017-07-13 23:45:39.000000000 +0200
+++ ./apt-pkg/contrib/strutl.cc 2017-07-23 22:58:23.103247428 +0200
@@ -100,6 +100,7 @@
}
}
/*}}}*/
+#ifndef __ANDROID__
// UTF8ToCodeset - Convert some UTF-8 string for some codeset /*{{{*/
// ---------------------------------------------------------------------
/* This is handy to use before display some information for enduser */
@@ -169,6 +170,7 @@
return true;
}
+#endif
/*}}}*/
// strstrip - Remove white space from the front and back of a string /*{{{*/
// ---------------------------------------------------------------------
================================================
FILE: disabled-packages/apt-updated/apt-pkg-deb-debrecords.cc.patch
================================================
diff -u -r ../apt-1.6~alpha3/apt-pkg/deb/debrecords.cc ./apt-pkg/deb/debrecords.cc
--- ../apt-1.6~alpha3/apt-pkg/deb/debrecords.cc 2017-10-28 17:57:05.000000000 +0200
+++ ./apt-pkg/deb/debrecords.cc 2017-11-02 17:40:35.816161798 +0100
@@ -23,7 +23,9 @@
#include
#include
#include
+#ifndef __ANDROID__
#include
+#endif
#include
#include
@@ -151,12 +153,14 @@
orig = Section.FindS("Description");
}
+#ifndef __ANDROID__
char const * const codeset = nl_langinfo(CODESET);
if (strcmp(codeset,"UTF-8") != 0) {
string dest;
UTF8ToCodeset(codeset, orig, &dest);
return dest;
}
+#endif
return orig;
}
================================================
FILE: disabled-packages/apt-updated/apt-pkg-init-dir.patch
================================================
--- ../cache/apt-1.4.7/apt-pkg/init.cc 2017-07-14 07:45:39.000000000 +1000
+++ ./apt-pkg/init.cc 2017-07-19 17:03:07.949752843 +1000
@@ -51,7 +51,7 @@
return vec;
}
-
+#ifndef __ANDROID__
// pkgInitArchTupleMap - Initialize the architecture tuple map /*{{{*/
// ---------------------------------------------------------------------
/* This initializes */
@@ -116,7 +116,7 @@
return true;
}
- /*}}}*/
+#endif /*}}}*/
// pkgInitConfig - Initialize the configuration class /*{{{*/
@@ -133,6 +133,7 @@
Cnf.CndSet("APT::Install-Recommends", true);
Cnf.CndSet("APT::Install-Suggests", false);
Cnf.CndSet("Dir","/");
+ Cnf.CndSet("Acquire::Languages", "none");
// State
Cnf.CndSet("Dir::State", STATE_DIR + 1);
@@ -158,9 +159,9 @@
Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg");
Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d");
Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods");
- Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/solvers");
- Cnf.CndSet("Dir::Bin::planners::",LIBEXEC_DIR "/planners");
- Cnf.CndSet("Dir::Media::MountPath","/media/apt");
+ Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/solvers");
+ Cnf.CndSet("Dir::Bin::planners::", LIBEXEC_DIR "/planners");
+ Cnf.CndSet("Dir::Media::MountPath","media/apt");
// State
Cnf.CndSet("Dir::Log", LOG_DIR + 1);
@@ -283,8 +284,6 @@
return _error->Error(_("Unable to determine a suitable packaging system type"));
}
- if (pkgInitArchTupleMap() == false)
- return false;
return Sys->Initialize(Cnf);
}
================================================
FILE: disabled-packages/apt-updated/apt-private-private-download.cc.patch
================================================
diff -u -r ../apt-1.2.12/apt-private/private-download.cc ./apt-private/private-download.cc
--- ../apt-1.2.12/apt-private/private-download.cc 2016-05-11 10:57:51.000000000 +0200
+++ ./apt-private/private-download.cc 2017-07-01 00:31:32.131776100 +0200
@@ -121,7 +121,6 @@
/*}}}*/
bool CheckFreeSpaceBeforeDownload(std::string const &Dir, unsigned long long FetchBytes)/*{{{*/
{
- uint32_t const RAMFS_MAGIC = 0x858458f6;
/* Check for enough free space, but only if we are actually going to
download */
if (_config->FindB("APT::Get::Print-URIs", false) == true ||
================================================
FILE: disabled-packages/apt-updated/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
TERMUX_PKG_DEPENDS="libutil, libcurl, liblzma, dpkg, gpgv, libc++"
TERMUX_PKG_VERSION=1.6~alpha3
TERMUX_PKG_SHA256=2acd561ff04fc3efa4c590139ca60cfdbc93787ea80334f7448ecf466faab119
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DPERL_EXECUTABLE=$(which perl)
-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX
-DCOMMON_ARCH=$TERMUX_ARCH
-DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg
-DUSE_NLS=OFF
-DWITH_DOC=OFF
"
TERMUX_PKG_ESSENTIAL=true
TERMUX_PKG_CONFFILES="etc/apt/sources.list"
TERMUX_PKG_CONFLICTS=apt-transport-https
TERMUX_PKG_REPLACES=apt-transport-https
TERMUX_PKG_RM_AFTER_INSTALL="
bin/apt-cdrom
bin/apt-extracttemplates
bin/apt-sortpkgs
etc/apt/apt.conf.d
lib/apt/apt-helper
lib/apt/methods/bzip2
lib/apt/methods/cdrom
lib/apt/methods/mirror
lib/apt/methods/rred
lib/apt/planners/
lib/apt/solvers/
lib/dpkg/
lib/libapt-inst.so
"
termux_step_post_make_install() {
printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
rm /data/data/com.termux/files/usr/include/apt-pkg -r
}
================================================
FILE: disabled-packages/apt-updated/cmdline-apt-key.in.patch
================================================
diff -u -r ../apt-1.4.7/cmdline/apt-key.in ./cmdline/apt-key.in
--- ../apt-1.4.7/cmdline/apt-key.in 2017-07-13 23:45:39.000000000 +0200
+++ ./cmdline/apt-key.in 2017-07-26 12:18:17.424086422 +0200
@@ -16,10 +16,7 @@
aptkey_echo() { echo "$@"; }
requires_root() {
- if [ "$(id -u)" -ne 0 ]; then
- apt_error "This command can only be used by root."
- exit 1
- fi
+continue
}
command_available() {
@@ -260,7 +257,7 @@
if accessible_file_exists "$TRUSTEDFILE"; then
$ACTION "$TRUSTEDFILE" "$@"
fi
- local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
+ local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
eval "$(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)"
if [ -d "$TRUSTEDPARTS" ]; then
TRUSTEDPARTS="$(readlink -f "$TRUSTEDPARTS")"
@@ -542,7 +539,7 @@
done
if [ -z "$TRUSTEDFILE" ]; then
- TRUSTEDFILE="/etc/apt/trusted.gpg"
+ TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
fi
@@ -612,7 +609,8 @@
unset TMPDIR
fi
fi
- GPGHOMEDIR="$(mktemp --directory --tmpdir 'apt-key-gpghome.XXXXXXXXXX')"
+ # Use short options as busybox mktemp does not support long ones:
+ GPGHOMEDIR="$(mktemp -d -t 'apt-key-gpghome.XXXXXXXXXX')"
CURRENTTRAP="${CURRENTTRAP} cleanup_gpg_home;"
trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
if [ -z "$GPGHOMEDIR" ]; then
================================================
FILE: disabled-packages/apt-updated/cmndline-no-strchrnul.patch
================================================
diff -u -r ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc ./apt-pkg/contrib/cmndline.cc
--- ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc 2014-03-15 17:23:45.000000000 +0100
+++ ./apt-pkg/contrib/cmndline.cc 2014-03-25 01:10:30.764711007 +0100
@@ -27,6 +27,14 @@
/*}}}*/
using namespace std;
+#if defined(__ANDROID__)
+static char* strchrnul(char const* s, int c)
+{
+ char const* result = strchr(s, c);
+ return const_cast((result == NULL) ? (s + strlen(s)) : result);
+}
+#endif
+
// CommandLine::CommandLine - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
================================================
FILE: disabled-packages/apt-updated/debsrcrecords.patch
================================================
diff -u -r ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc ./apt-pkg/deb/debsrcrecords.cc
--- ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc 2014-03-15 17:23:45.000000000 +0100
+++ ./apt-pkg/deb/debsrcrecords.cc 2014-03-25 01:23:30.652689687 +0100
@@ -26,6 +26,14 @@
#include
#include
/*}}}*/
+#if defined(__ANDROID__)
+static char* strchrnul(char const* s, int c)
+{
+ char const* result = strchr(s, c);
+ return const_cast((result == NULL) ? (s + strlen(s)) : result);
+}
+#endif
+
using std::max;
using std::string;
================================================
FILE: disabled-packages/apt-updated/methods-cmakelist.patch
================================================
diff -u -r ../apt-1.6~alpha3/methods/CMakeLists.txt ./methods/CMakeLists.txt
--- ../apt-1.6~alpha3/methods/CMakeLists.txt 2017-10-28 17:57:05.000000000 +0200
+++ ./methods/CMakeLists.txt 2017-11-02 17:45:55.436395981 +0100
@@ -9,11 +9,8 @@
add_executable(copy copy.cc)
add_executable(store store.cc)
add_executable(gpgv gpgv.cc)
-add_executable(cdrom cdrom.cc)
add_executable(http http_main.cc $ $)
add_executable(mirror mirror.cc $ $)
-add_executable(ftp ftp.cc $)
-add_executable(rred rred.cc)
add_executable(rsh rsh.cc)
target_compile_definitions(connectlib PRIVATE ${GNUTLS_DEFINITIONS})
@@ -22,10 +19,9 @@
# Additional libraries to link against for networked stuff
target_link_libraries(http ${GNUTLS_LIBRARIES})
target_link_libraries(mirror ${RESOLV_LIBRARIES} ${GNUTLS_LIBRARIES})
-target_link_libraries(ftp ${GNUTLS_LIBRARIES})
# Install the library
-install(TARGETS file copy store gpgv cdrom http ftp rred rsh mirror
+install(TARGETS file copy store gpgv http rsh mirror
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store)
================================================
FILE: disabled-packages/apt-updated/methods-connect.cc.patch
================================================
diff -u -r ../apt-1.6~alpha3/methods/connect.cc ./methods/connect.cc
--- ../apt-1.6~alpha3/methods/connect.cc 2017-10-28 17:57:05.000000000 +0200
+++ ./methods/connect.cc 2017-11-02 17:47:18.803413361 +0100
@@ -164,7 +164,7 @@
// Check the socket for an error condition
unsigned int Err;
- unsigned int Len = sizeof(Err);
+ socklen_t Len = sizeof(Err);
if (getsockopt(Fd->Fd(), SOL_SOCKET, SO_ERROR, &Err, &Len) != 0)
return _error->Errno("getsockopt",_("Failed"));
@@ -335,7 +335,10 @@
if(LastHost != Host || LastPort != Port)
{
SrvRecords.clear();
- if (_config->FindB("Acquire::EnableSrvRecords", true) == true)
+ /* Disable by default in Termux due to it breaking on (some) HTC
+ devices (https://github.com/termux/termux-packages/issues/99). */
+
+ if (_config->FindB("Acquire::EnableSrvRecords", false) == true)
{
GetSrvRecords(Host, DefPort, SrvRecords);
// RFC2782 defines that a lonely '.' target is an abort reason
================================================
FILE: disabled-packages/apt-updated/private-output-no-langinfo.patch
================================================
diff -u -r ../upstream.git/apt-private/private-output.cc ./apt-private/private-output.cc
--- ../upstream.git/apt-private/private-output.cc 2014-06-10 15:24:50.000000000 +0200
+++ ./apt-private/private-output.cc 2014-06-15 02:40:10.539223656 +0200
@@ -20,7 +20,11 @@
#include
#include
#include
-#include
+#ifdef __ANDROID__
+# include
+# else
+# include
+#endif
#include
#include
#include
@@ -764,7 +768,7 @@
regex_t Pattern;
int Res;
- Res = regcomp(&Pattern, nl_langinfo(YESEXPR),
+ Res = regcomp(&Pattern, "^[yY]",
REG_EXTENDED|REG_ICASE|REG_NOSUB);
if (Res != 0) {
================================================
FILE: disabled-packages/apt-updated/vendor.patch
================================================
diff -u -r ../upstream.git/vendor/ubuntu/apt-vendor.ent ./vendor/ubuntu/apt-vendor.ent
--- ../upstream.git/vendor/ubuntu/apt-vendor.ent 2014-04-25 13:39:00.000000000 +0200
+++ ./vendor/ubuntu/apt-vendor.ent 2014-06-03 11:53:11.535752314 +0200
@@ -1,7 +1,7 @@
-
-ubuntu-keyring">
-/usr/share/keyrings/ubuntu-archive-keyring.gpg">
-/usr/share/keyrings/ubuntu-archive-removed-keys.gpg">
-
+
+termux-keyring">
+@TERMUX_PREFIX@/share/keyrings/termux-archive-keyring.gpg">
+@TERMUX_PREFIX@/share/keyrings/termux-archive-removed-keys.gpg">
+
================================================
FILE: disabled-packages/cadaver/build.sh
================================================
# Status: Does not work with openssl 1.1 or later.
TERMUX_PKG_HOMEPAGE=http://www.webdav.org/cadaver/
TERMUX_PKG_DESCRIPTION="cadaver is a command-line WebDAV client for Unix"
TERMUX_PKG_VERSION=0.23.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://fossies.org/linux/www/old/cadaver-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=123772d7d33f06a76742dba874b1c444423b52ad3a7bbb87559616ec78b9ae5e
TERMUX_PKG_DEPENDS="openssl, libxml2, ncurses, readline"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-libxml2
--without-gssapi
--with-ssl=openssl
"
termux_step_pre_configure() {
export ac_cv_func_setlocale=no
}
================================================
FILE: disabled-packages/checkinstall/Makefile.patch
================================================
diff -u -r ../checkinstall-1.6.2/Makefile ./Makefile
--- ../checkinstall-1.6.2/Makefile 2008-11-11 21:43:53.000000000 -0500
+++ ./Makefile 2016-10-28 16:14:22.403691119 -0400
@@ -1,7 +1,7 @@
# $Id: Makefile,v 1.6.2.1 2008/11/09 07:48:18 izto Exp $
# Where to install.
-PREFIX=/usr/local
+PREFIX?=/usr/local
BINDIR=$(PREFIX)/sbin
LCDIR=$(PREFIX)/lib/checkinstall/locale
CONFDIR=$(PREFIX)/lib/checkinstall
================================================
FILE: disabled-packages/checkinstall/build.sh
================================================
# NOTE: Currently segfaults when running.
TERMUX_PKG_HOMEPAGE=http://checkinstall.izto.org/
TERMUX_PKG_DESCRIPTION="Installation tracker creating a package from a local install"
TERMUX_PKG_VERSION=1.6.2
TERMUX_PKG_SRCURL=http://checkinstall.izto.org/files/source/checkinstall-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="file, make"
TERMUX_PKG_RM_AFTER_INSTALL="lib/checkinstall/locale/"
termux_step_pre_configure() {
CFLAGS+=" -D__off64_t=off64_t"
CFLAGS+=" -D_STAT_VER=3"
CFLAGS+=" -D_MKNOD_VER=1"
CFLAGS+=" -DS_IREAD=S_IRUSR"
}
termux_step_post_make_install() {
mv $TERMUX_PREFIX/lib/checkinstall/checkinstallrc-dist \
$TERMUX_PREFIX/lib/checkinstall/checkinstallrc
}
================================================
FILE: disabled-packages/checkinstall/checkinstall.patch
================================================
diff -u -r ../checkinstall-1.6.2/checkinstall ./checkinstall
--- ../checkinstall-1.6.2/checkinstall 2009-12-26 14:17:24.000000000 -0500
+++ ./checkinstall 2016-10-28 16:32:12.759574819 -0400
@@ -492,7 +492,7 @@
ckversion
echo
-CHECKINSTALLRC=${CHECKINSTALLRC:-${INSTALLDIR}/checkinstallrc}
+CHECKINSTALLRC=${CHECKINSTALLRC:-${INSTALLDIR}/lib/checkinstall/checkinstallrc}
if ! [ -f $CHECKINSTALLRC ]; then
echog "The checkinstallrc file was not found at:\n$CHECKINSTALLRC"
echo
@@ -974,7 +974,7 @@
! [ "$INSTALL" ] && INSTALL=0
# The place where we will be storing the temp files
-! [ "$BASE_TMP_DIR" ] && BASE_TMP_DIR=/var/tmp
+! [ "$BASE_TMP_DIR" ] && BASE_TMP_DIR=/data/data/com.termux/files/usr/tmp
# Default RPM FLAGS
! [ "$RPM_FLAGS" ] && RPM_FLAGS=" --force --nodeps --replacepkgs "
@@ -1249,7 +1249,7 @@
# Fix the PowerPC & Amd64 architecture description if we're on Debian
if [ "$CK_DEBIAN" = "1" ] ; then
- ARCHITECTURE=`dpkg-architecture -qDEB_HOST_ARCH`
+ ARCHITECTURE=`dpkg --print-architecture`
fi
fi
@@ -1508,7 +1508,7 @@
TMP_SCRIPT=${TMP_DIR}/installscript.sh
cat << EOF > $TMP_SCRIPT
-#!/bin/sh
+#!@TERMUX_PREFIX@/bin/sh
cd "$DIRECTORIO_FUENTE"
EOF
@@ -1538,7 +1538,7 @@
# installwatch excludes itself some directories, but we put them all here,
# to be explicit.
#
-IEXCLUDE="${DIRECTORIO_FUENTE},/dev,/proc,/tmp,/var/tmp"
+IEXCLUDE="${DIRECTORIO_FUENTE},/dev,/proc,/tmp,/var/tmp,/data/data/com.termux/files/usr/tmp"
# Run the install command, showing the results interactively if we were asked
================================================
FILE: disabled-packages/checkinstall/checkinstallrc-dist.patch
================================================
diff -u -r ../checkinstall-1.6.2/checkinstallrc-dist ./checkinstallrc-dist
--- ../checkinstall-1.6.2/checkinstallrc-dist 2008-11-11 14:10:34.000000000 -0500
+++ ./checkinstallrc-dist 2016-10-28 16:28:56.558529656 -0400
@@ -16,14 +16,14 @@
DEBUG=0
# Location of the "installwatch" program
-INSTALLWATCH_PREFIX="/usr/local"
+INSTALLWATCH_PREFIX="/data/data/com.termux/files/usr"
INSTALLWATCH=${INSTALLWATCH_PREFIX}/bin/installwatch
# Location of the makepkg program. "makepak" is the default, and is
# included with checkinstall. If you want to use Slackware's native "makepkg"
# then set this to "makepkg"
-MAKEPKG=/sbin/makepkg
+MAKEPKG=/data/data/com.termux/files/usr/bin/makepkg
# makepkg optional flags. These are recommended if running a newer Slackware
# version: "-l y -c n"
@@ -36,7 +36,7 @@
SHOW_MAKEPKG=0
# Where will we keep our temp files?
-BASE_TMP_DIR=/var/tmp ## Don't set this to /tmp or / !!
+BASE_TMP_DIR=@TERMUX_PREFIX@/tmp ## Don't set this to /tmp or / !!
# Where to place the installed document files
DOC_DIR=""
================================================
FILE: disabled-packages/checkinstall/installwatch-Makefile.patch
================================================
diff -u -r ../checkinstall-1.6.2/installwatch/Makefile ./installwatch/Makefile
--- ../checkinstall-1.6.2/installwatch/Makefile 2008-11-16 11:20:53.000000000 -0500
+++ ./installwatch/Makefile 2016-10-28 16:34:12.825762120 -0400
@@ -4,7 +4,7 @@
# Well, the only configurable part is the following variable.
# Make sure the directory you specify exists.
-PREFIX=/usr/local
+PREFIX?=/usr/local
# End of configurable part
@@ -16,10 +16,10 @@
all: installwatch.so
installwatch.so: installwatch.o
- ld -shared -o installwatch.so installwatch.o -ldl -lc
+ $(CC) $(LDFLAGS) -shared -o installwatch.so installwatch.o -ldl -lc -llog
installwatch.o: installwatch.c localdecls.h
- gcc -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DVERSION=\"$(VERSION)\" installwatch.c
+ $(CC) $(CFLAGS) -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -DVERSION=\"$(VERSION)\" installwatch.c
localdecls.h: create-localdecls
./create-localdecls
================================================
FILE: disabled-packages/checkinstall/installwatch.c.patch
================================================
diff -u -r ../checkinstall-1.6.2/installwatch/installwatch.c ./installwatch/installwatch.c
--- ../checkinstall-1.6.2/installwatch/installwatch.c 2008-11-16 11:20:53.000000000 -0500
+++ ./installwatch/installwatch.c 2016-10-28 16:12:42.017221485 -0400
@@ -2938,13 +2938,8 @@
return result;
}
-#if (GLIBC_MINOR <= 4)
-int readlink(const char *path,char *buf,size_t bufsiz) {
- int result;
-#else
ssize_t readlink(const char *path,char *buf,size_t bufsiz) {
ssize_t result;
-#endif
instw_t instw;
int status;
@@ -3079,7 +3074,7 @@
int scandir( const char *dir,struct dirent ***namelist,
int (*select)(const struct dirent *),
- int (*compar)(const void *,const void *) ) {
+ int (*compar)(const struct dirent**,const struct dirent**) ) {
int result;
if (!libc_handle)
@@ -3691,7 +3686,7 @@
int scandir64( const char *dir,struct dirent64 ***namelist,
int (*select)(const struct dirent64 *),
- int (*compar)(const void *,const void *) ) {
+ int (*compar)(const struct dirent64**,const struct dirent64**) ) {
int result;
if (!libc_handle)
================================================
FILE: disabled-packages/clisp/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.clisp.org/
TERMUX_PKG_DESCRIPTION="GNU CLISP - an ANSI Common Lisp Implementation"
TERMUX_PKG_VERSION=2.49
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/clisp/clisp/${TERMUX_PKG_VERSION}/clisp-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_DEPENDS="readline, libandroid-support"
TERMUX_MAKE_PROCESSES=1
termux_step_configure() {
cd $TERMUX_PKG_BUILDDIR
export XCPPFLAGS="$CPPFLAGS"
export XCFLAGS="$CFLAGS"
export XLDFLAGS="$LDFLAGS"
unset CC
unset CPPFLAGS
unset CFLAGS
unset LDFLAGS
$TERMUX_PKG_SRCDIR/configure \
--host=$TERMUX_HOST_PLATFORM \
--prefix=$TERMUX_PREFIX \
--enable-shared \
--disable-static \
--srcdir=$TERMUX_PKG_SRCDIR \
--ignore-absence-of-libsigsegv \
ac_cv_func_select=yes
}
================================================
FILE: disabled-packages/clisp/src-gllib-stdint.in.h.patch
================================================
diff -u -r ../clisp-2.49/src/gllib/stdint.in.h ./src/gllib/stdint.in.h
--- ../clisp-2.49/src/gllib/stdint.in.h 2010-05-18 14:38:04.000000000 -0400
+++ ./src/gllib/stdint.in.h 2016-02-17 15:35:07.664544781 -0500
@@ -1,568 +1 @@
-/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
- Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
- This file is part of gnulib.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/*
- * ISO C 99 for platforms that lack it.
- *
- */
-
-#ifndef _gl_GL_STDINT_H
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-
-/* When including a system file that in turn includes ,
- use the system , not our substitute. This avoids
- problems with (for example) VMS, whose includes
- . */
-#define _gl_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
-
-/* Get those types that are already defined in other system include
- files, so that we can "#define int8_t signed char" below without
- worrying about a later system include file containing a "typedef
- signed char int8_t;" that will get messed up by our macro. Our
- macros should all be consistent with the system versions, except
- for the "fast" types and macros, which we recommend against using
- in public interfaces due to compiler differences. */
-
-#if @HAVE_STDINT_H@
-# if defined __sgi && ! defined __c99
- /* Bypass IRIX's if in C89 mode, since it merely annoys users
- with "This header file is to be used only for c99 mode compilations"
- diagnostics. */
-# define __STDINT_H__
-# endif
- /* Other systems may have an incomplete or buggy .
- Include it before , since any "#include "
- in would reinclude us, skipping our contents because
- _gl_GL_STDINT_H is defined.
- The include_next requires a split double-inclusion guard. */
-# @INCLUDE_NEXT@ @NEXT_STDINT_H@
-#endif
-
-#if ! defined _gl_GL_STDINT_H && ! defined _gl_GL_JUST_INCLUDE_SYSTEM_STDINT_H
-#define _gl_GL_STDINT_H
-
-/* defines some of the stdint.h types as well, on glibc,
- IRIX 6.5, and OpenBSD 3.8 (via ).
- AIX 5.2 isn't needed and causes troubles.
- MacOS X 10.4.6 includes (which is us), but
- relies on the system definitions, so include
- after @NEXT_STDINT_H@. */
-#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
-# include
-#endif
-
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
-#include
-
-#if @HAVE_INTTYPES_H@
- /* In OpenBSD 3.8, includes , which defines
- int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
- also defines intptr_t and uintptr_t. */
-# include
-#elif @HAVE_SYS_INTTYPES_H@
- /* Solaris 7 has the types except the *_fast*_t types, and
- the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
-# include
-#endif
-
-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
- /* Linux libc4 >= 4.6.7 and libc5 have a that defines
- int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
- included by . */
-# include
-#endif
-
-#undef _gl_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
-
-/* Minimum and maximum values for a integer type under the usual assumption.
- Return an unspecified value if BITS == 0, adding a check to pacify
- picky compilers. */
-
-#define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
-
-#define _STDINT_MAX(signed, bits, zero) \
- ((signed) \
- ? ~ _STDINT_MIN (signed, bits, zero) \
- : /* The expression for the unsigned case. The subtraction of (signed) \
- is a nop in the unsigned case and avoids "signed integer overflow" \
- warnings in the signed case. */ \
- ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
-
-/* 7.18.1.1. Exact-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. */
-
-#undef int8_t
-#undef uint8_t
-typedef signed char gl_int8_t;
-typedef unsigned char gl_uint8_t;
-#define int8_t gl_int8_t
-#define uint8_t gl_uint8_t
-
-#undef int16_t
-#undef uint16_t
-typedef short int gl_int16_t;
-typedef unsigned short int gl_uint16_t;
-#define int16_t gl_int16_t
-#define uint16_t gl_uint16_t
-
-#undef int32_t
-#undef uint32_t
-typedef int gl_int32_t;
-typedef unsigned int gl_uint32_t;
-#define int32_t gl_int32_t
-#define uint32_t gl_uint32_t
-
-/* Do not undefine int64_t if gnulib is not being used with 64-bit
- types, since otherwise it breaks platforms like Tandem/NSK. */
-#if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
-typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif defined _MSC_VER
-# undef int64_t
-typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#elif @HAVE_LONG_LONG_INT@
-# undef int64_t
-typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-#endif
-
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#elif defined _MSC_VER
-# undef uint64_t
-typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
-typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-#endif
-
-/* Avoid collision with Solaris 2.5.1 etc. */
-#define _UINT8_T
-#define _UINT32_T
-#define _UINT64_T
-
-
-/* 7.18.1.2. Minimum-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
- are the same as the corresponding N_t types. */
-
-#undef int_least8_t
-#undef uint_least8_t
-#undef int_least16_t
-#undef uint_least16_t
-#undef int_least32_t
-#undef uint_least32_t
-#undef int_least64_t
-#undef uint_least64_t
-#define int_least8_t int8_t
-#define uint_least8_t uint8_t
-#define int_least16_t int16_t
-#define uint_least16_t uint16_t
-#define int_least32_t int32_t
-#define uint_least32_t uint32_t
-#ifdef GL_INT64_T
-# define int_least64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_least64_t uint64_t
-#endif
-
-/* 7.18.1.3. Fastest minimum-width integer types */
-
-/* Note: Other substitutes may define these types differently.
- It is not recommended to use these types in public header files. */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
- are taken from the same list of types. Assume that 'long int'
- is fast enough for all narrower integers. */
-
-#undef int_fast8_t
-#undef uint_fast8_t
-#undef int_fast16_t
-#undef uint_fast16_t
-#undef int_fast32_t
-#undef uint_fast32_t
-#undef int_fast64_t
-#undef uint_fast64_t
-typedef long int gl_int_fast8_t;
-typedef unsigned long int gl_uint_fast8_t;
-typedef long int gl_int_fast16_t;
-typedef unsigned long int gl_uint_fast16_t;
-typedef long int gl_int_fast32_t;
-typedef unsigned long int gl_uint_fast32_t;
-#define int_fast8_t gl_int_fast8_t
-#define uint_fast8_t gl_uint_fast8_t
-#define int_fast16_t gl_int_fast16_t
-#define uint_fast16_t gl_uint_fast16_t
-#define int_fast32_t gl_int_fast32_t
-#define uint_fast32_t gl_uint_fast32_t
-#ifdef GL_INT64_T
-# define int_fast64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_fast64_t uint64_t
-#endif
-
-/* 7.18.1.4. Integer types capable of holding object pointers */
-
-#undef intptr_t
-#undef uintptr_t
-typedef long int gl_intptr_t;
-typedef unsigned long int gl_uintptr_t;
-#define intptr_t gl_intptr_t
-#define uintptr_t gl_uintptr_t
-
-/* 7.18.1.5. Greatest-width integer types */
-
-/* Note: These types are compiler dependent. It may be unwise to use them in
- public header files. */
-
-#undef intmax_t
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-typedef long long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-#elif defined GL_INT64_T
-# define intmax_t int64_t
-#else
-typedef long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-#endif
-
-#undef uintmax_t
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-typedef unsigned long long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-#elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-#else
-typedef unsigned long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-#endif
-
-/* Verify that intmax_t and uintmax_t have the same size. Too much code
- breaks if this is not the case. If this check fails, the reason is likely
- to be found in the autoconf macros. */
-typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
-
-/* 7.18.2. Limits of specified-width integer types */
-
-#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
-
-/* 7.18.2.1. Limits of exact-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. */
-
-#undef INT8_MIN
-#undef INT8_MAX
-#undef UINT8_MAX
-#define INT8_MIN (~ INT8_MAX)
-#define INT8_MAX 127
-#define UINT8_MAX 255
-
-#undef INT16_MIN
-#undef INT16_MAX
-#undef UINT16_MAX
-#define INT16_MIN (~ INT16_MAX)
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-
-#undef INT32_MIN
-#undef INT32_MAX
-#undef UINT32_MAX
-#define INT32_MIN (~ INT32_MAX)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
-
-#undef INT64_MIN
-#undef INT64_MAX
-#ifdef GL_INT64_T
-/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
- evaluates the latter incorrectly in preprocessor expressions. */
-# define INT64_MIN (- INTMAX_C (1) << 63)
-# define INT64_MAX INTMAX_C (9223372036854775807)
-#endif
-
-#undef UINT64_MAX
-#ifdef GL_UINT64_T
-# define UINT64_MAX UINTMAX_C (18446744073709551615)
-#endif
-
-/* 7.18.2.2. Limits of minimum-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
- are the same as the corresponding N_t types. */
-
-#undef INT_LEAST8_MIN
-#undef INT_LEAST8_MAX
-#undef UINT_LEAST8_MAX
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-
-#undef INT_LEAST16_MIN
-#undef INT_LEAST16_MAX
-#undef UINT_LEAST16_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-
-#undef INT_LEAST32_MIN
-#undef INT_LEAST32_MAX
-#undef UINT_LEAST32_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-
-#undef INT_LEAST64_MIN
-#undef INT_LEAST64_MAX
-#ifdef GL_INT64_T
-# define INT_LEAST64_MIN INT64_MIN
-# define INT_LEAST64_MAX INT64_MAX
-#endif
-
-#undef UINT_LEAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_LEAST64_MAX UINT64_MAX
-#endif
-
-/* 7.18.2.3. Limits of fastest minimum-width integer types */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
- are taken from the same list of types. */
-
-#undef INT_FAST8_MIN
-#undef INT_FAST8_MAX
-#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN LONG_MIN
-#define INT_FAST8_MAX LONG_MAX
-#define UINT_FAST8_MAX ULONG_MAX
-
-#undef INT_FAST16_MIN
-#undef INT_FAST16_MAX
-#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN LONG_MIN
-#define INT_FAST16_MAX LONG_MAX
-#define UINT_FAST16_MAX ULONG_MAX
-
-#undef INT_FAST32_MIN
-#undef INT_FAST32_MAX
-#undef UINT_FAST32_MAX
-#define INT_FAST32_MIN LONG_MIN
-#define INT_FAST32_MAX LONG_MAX
-#define UINT_FAST32_MAX ULONG_MAX
-
-#undef INT_FAST64_MIN
-#undef INT_FAST64_MAX
-#ifdef GL_INT64_T
-# define INT_FAST64_MIN INT64_MIN
-# define INT_FAST64_MAX INT64_MAX
-#endif
-
-#undef UINT_FAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_FAST64_MAX UINT64_MAX
-#endif
-
-/* 7.18.2.4. Limits of integer types capable of holding object pointers */
-
-#undef INTPTR_MIN
-#undef INTPTR_MAX
-#undef UINTPTR_MAX
-#define INTPTR_MIN LONG_MIN
-#define INTPTR_MAX LONG_MAX
-#define UINTPTR_MAX ULONG_MAX
-
-/* 7.18.2.5. Limits of greatest-width integer types */
-
-#undef INTMAX_MIN
-#undef INTMAX_MAX
-#ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-#else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
-#endif
-
-#undef UINTMAX_MAX
-#ifdef UINT64_MAX
-# define UINTMAX_MAX UINT64_MAX
-#else
-# define UINTMAX_MAX UINT32_MAX
-#endif
-
-/* 7.18.3. Limits of other integer types */
-
-/* ptrdiff_t limits */
-#undef PTRDIFF_MIN
-#undef PTRDIFF_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
-# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
-# else
-# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
-# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
-# endif
-#else
-# define PTRDIFF_MIN \
- _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-# define PTRDIFF_MAX \
- _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-#endif
-
-/* sig_atomic_t limits */
-#undef SIG_ATOMIC_MIN
-#undef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MIN \
- _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
- 0@SIG_ATOMIC_T_SUFFIX@)
-#define SIG_ATOMIC_MAX \
- _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
- 0@SIG_ATOMIC_T_SUFFIX@)
-
-
-/* size_t limit */
-#undef SIZE_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
-# else
-# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
-# endif
-#else
-# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
-#endif
-
-/* wchar_t limits */
-/* Get WCHAR_MIN, WCHAR_MAX.
- This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
- includes -> -> -> , and the latter includes
- and assumes its types are already defined. */
-#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
-# define _gl_GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-# include
-# undef _gl_GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-#endif
-#undef WCHAR_MIN
-#undef WCHAR_MAX
-#define WCHAR_MIN \
- _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-#define WCHAR_MAX \
- _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-
-/* wint_t limits */
-#undef WINT_MIN
-#undef WINT_MAX
-#define WINT_MIN \
- _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#define WINT_MAX \
- _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-
-#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
-
-/* 7.18.4. Macros for integer constants */
-
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
-/* 7.18.4.1. Macros for minimum-width integer constants */
-/* According to ISO C 99 Technical Corrigendum 1 */
-
-/* Here we assume a standard architecture where the hardware integer
- types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
-
-#undef INT8_C
-#undef UINT8_C
-#define INT8_C(x) x
-#define UINT8_C(x) x
-
-#undef INT16_C
-#undef UINT16_C
-#define INT16_C(x) x
-#define UINT16_C(x) x
-
-#undef INT32_C
-#undef UINT32_C
-#define INT32_C(x) x
-#define UINT32_C(x) x ## U
-
-#undef INT64_C
-#undef UINT64_C
-#if LONG_MAX >> 31 >> 31 == 1
-# define INT64_C(x) x##L
-#elif defined _MSC_VER
-# define INT64_C(x) x##i64
-#elif @HAVE_LONG_LONG_INT@
-# define INT64_C(x) x##LL
-#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# define UINT64_C(x) x##UL
-#elif defined _MSC_VER
-# define UINT64_C(x) x##ui64
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# define UINT64_C(x) x##ULL
-#endif
-
-/* 7.18.4.2. Macros for greatest-width integer constants */
-
-#undef INTMAX_C
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-#elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-#else
-# define INTMAX_C(x) x##L
-#endif
-
-#undef UINTMAX_C
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-#elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-#else
-# define UINTMAX_C(x) x##UL
-#endif
-
-#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
-#endif /* _gl_GL_STDINT_H */
-#endif /* !defined _gl_GL_STDINT_H && !defined _gl_GL_JUST_INCLUDE_SYSTEM_STDINT_H */
+#include_next
================================================
FILE: disabled-packages/clisp/src-makefile.in.patch
================================================
diff -u -r ../clisp-2.49/src/makemake.in ./src/makemake.in
--- ../clisp-2.49/src/makemake.in 2010-07-07 11:15:35.000000000 -0400
+++ ./src/makemake.in 2016-02-17 15:27:00.420198622 -0500
@@ -651,9 +651,6 @@
# We can cross-compile only with GCC
XCC=${COMPILER} # ${TSYS}-gcc
XCPP="${XCC} -E"
- XCPPFLAGS=''
- XCFLAGS=''
- XLDFLAGS=''
XCC_GCC=true
XCC_NEED_DEEMA=false
else
================================================
FILE: disabled-packages/crawl/build.sh
================================================
# Currently fails at:
# Makefile:101: recipe for target 'tiledef-dngn.h' failed
# make[1]: *** [tiledef-dngn.h] Segmentation fault (core dumped)
TERMUX_PKG_HOMEPAGE=https://crawl.develz.org/
TERMUX_PKG_DESCRIPTION="Roguelike adventure through dungeons filled with dangerous monsters"
TERMUX_PKG_VERSION=0.17.1
TERMUX_PKG_SRCURL=https://crawl.develz.org/release/stone_soup-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_EXTRA_MAKE_ARGS="V=1"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
export CROSSHOST=$TERMUX_HOST_PLATFORM
TERMUX_PKG_BUILDDIR=$TERMUX_PKG_SRCDIR/source
}
================================================
FILE: disabled-packages/cups/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://www.cups.org
TERMUX_PKG_VERSION=2.2.4
TERMUX_PKG_DEPENDS=krb5
TERMUX_PKG_SRCURL=https://github.com/apple/cups/releases/download/v$TERMUX_PKG_VERSION/cups-$TERMUX_PKG_VERSION-source.tar.gz
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
TERMUX_PKG_SHA256=596d4db72651c335469ae5f37b0da72ac9f97d73e30838d787065f559dea98cc
TERMUX_PKG_DEPENDS="libandroid-support, libcrypt"
TERMUX_PKG_FOLDERNAME=cups-$TERMUX_PKG_VERSION
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-option-checking
--disable-gssapi
--with-components=core
"
termux_step_pre_configure() {
LDFLAGS="$LDFLAGS -llog -lcrypt"
}
termux_step_post_make_install() {
mv "$TERMUX_PREFIX"/lib64/libcups.so* "$TERMUX_PREFIX"/lib/
}
================================================
FILE: disabled-packages/cups/cups-thread.c.patch
================================================
--- ./cups/thread.c 2017-06-30 21:14:38.000000000 +0530
+++ ../thread.c 2017-09-24 10:12:11.169628258 +0530
@@ -18,6 +18,7 @@
#include "cups-private.h"
#include "thread-private.h"
+#include
#if defined(HAVE_PTHREAD_H)
@@ -150,7 +151,7 @@
void
_cupsThreadCancel(_cups_thread_t thread)/* I - Thread ID */
{
- pthread_cancel(thread);
+ pthread_kill(thread, SIGTERM);
}
================================================
FILE: disabled-packages/cups/file.c.patch
================================================
--- ./cups/file.c 2016-10-04 01:25:40.000000000 +0530
+++ ../file.c 2016-12-11 09:51:21.994431659 +0530
@@ -39,6 +39,9 @@
static ssize_t cups_read(cups_file_t *fp, char *buf, size_t bytes);
static ssize_t cups_write(cups_file_t *fp, const char *buf, size_t bytes);
+#ifdef __ANDROID__
+#include "lockf.cpp"
+#endif
#ifndef WIN32
/*
================================================
FILE: disabled-packages/cups/lockf.cpp.patch
================================================
--- /dev/null 2016-12-11 08:33:21.825618476 +0530
+++ ./cups/lockf.cpp 2016-12-11 09:44:20.050966252 +0530
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include
+#include
+#include
+#include
+
+#ifndef _BITS_LOCKF_H_
+#define _BITS_LOCKF_H_
+
+#include
+
+#define F_ULOCK 0
+#define F_LOCK 1
+#define F_TLOCK 2
+#define F_TEST 3
+
+__BEGIN_DECLS
+
+#if defined(__USE_FILE_OFFSET64)
+int lockf(int, int, off_t) __RENAME(lockf64);
+#else
+int lockf(int, int, off_t);
+#endif
+int lockf64(int, int, off64_t);
+
+__END_DECLS
+
+#endif
+
+
+int lockf64(int fd, int cmd, off64_t length) {
+ // Translate POSIX lockf into fcntl.
+ struct flock fl;
+ memset(&fl, 0, sizeof(fl));
+ fl.l_whence = SEEK_CUR;
+ fl.l_start = 0;
+ fl.l_len = length;
+ if (cmd == F_ULOCK) {
+ fl.l_type = F_UNLCK;
+ cmd = F_SETLK64;
+ return fcntl(fd, F_SETLK64, &fl);
+ }
+ if (cmd == F_LOCK) {
+ fl.l_type = F_WRLCK;
+ return fcntl(fd, F_SETLKW64, &fl);
+ }
+ if (cmd == F_TLOCK) {
+ fl.l_type = F_WRLCK;
+ return fcntl(fd, F_SETLK64, &fl);
+ }
+ if (cmd == F_TEST) {
+ fl.l_type = F_RDLCK;
+ if (fcntl(fd, F_GETLK64, &fl) == -1) return -1;
+ if (fl.l_type == F_UNLCK || fl.l_pid == getpid()) return 0;
+ errno = EACCES;
+ return -1;
+ }
+ errno = EINVAL;
+ return -1;
+}
+int lockf(int fd, int cmd, off_t length) {
+ return lockf64(fd, cmd, length);
+}
================================================
FILE: disabled-packages/d8/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://r8.googlesource.com/r8
TERMUX_PKG_DESCRIPTION="Dexer that converts java byte code to dex code"
TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install() {
# Rewrite packages to avoid using com.android.* classes which may clash with
# classes in the Android runtime on devices (see #1801):
local JARJAR=$TERMUX_PKG_CACHEDIR/jarjar.jar
local RULEFILE=$TERMUX_PKG_TMPDIR/jarjar-rule.txt
local REWRITTEN_DX=$TERMUX_PKG_TMPDIR/d8-rewritten.jar
termux_download \
http://repo.bodar.com/com/googlecode/jarjar/jarjar/1.4.1/jarjar-1.4.1.jar \
$JARJAR \
c16b1cee296526baae432c382f83d540d4b648dc21923428a66a69ba43b7df9e
echo 'rule com.android.** d8.@1' > $RULEFILE
java -jar $JARJAR process $RULEFILE \
$ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/d8.jar \
$REWRITTEN_DX
# Dex the rewritten jar file:
mkdir -p $TERMUX_PREFIX/share/dex
$TERMUX_D8 \
--classpath $ANDROID_HOME/platforms/android-$TERMUX_PKG_API_LEVEL/android.jar \
--release \
--min-api 21 \
--output $TERMUX_PREFIX/share/dex/d8.jar \
$REWRITTEN_DX
install $TERMUX_PKG_BUILDER_DIR/d8 $TERMUX_PREFIX/bin/d8
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/d8
}
================================================
FILE: disabled-packages/d8/d8
================================================
#!/bin/sh
exec dalvikvm \
-Xmx256m \
-cp @TERMUX_PREFIX@/share/dex/d8.jar \
d8.tools.r8.D8 \
--classpath $PREFIX/share/java/android.jar \
$@
================================================
FILE: disabled-packages/deborphan/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/source/sid/deborphan
TERMUX_PKG_DESCRIPTION="Program that can find unused packages"
TERMUX_PKG_VERSION=1.7.28.8-0.3
TERMUX_PKG_SRCURL=http://http.debian.net/debian/pool/main/d/deborphan/deborphan_$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_MAINTAINER="Pierre Rudloff @Rudloff"
================================================
FILE: disabled-packages/deborphan/configure.patch
================================================
diff -u -r ../deborphan/configure ./configure
--- ../deborphan/configure 2016-02-21 09:05:27.000000000 -0500
+++ ./configure 2016-08-11 05:52:10.144221407 -0400
@@ -2957,7 +2957,7 @@
-$as_echo "#define STATUS_FILE \"/var/lib/dpkg/status\"" >>confdefs.h
+$as_echo "#define STATUS_FILE \"@TERMUX_PREFIX@/var/lib/dpkg/status\"" >>confdefs.h
$as_echo "#define REG_FLAGS REG_ICASE" >>confdefs.h
================================================
FILE: disabled-packages/deborphan/errno.patch
================================================
diff --git a/src/exit.c b/src/exit.c
index e76a75e..99cfbdd 100644
--- a/src/exit.c
+++ b/src/exit.c
@@ -21,7 +21,6 @@
#ifdef HAVE_ERRNO_H
# include
-extern int errno;
#endif
#ifdef ENABLE_NLS
diff --git a/src/xalloc.c b/src/xalloc.c
index 8c830e7..43cfb64 100644
--- a/src/xalloc.c
+++ b/src/xalloc.c
@@ -22,7 +22,6 @@
#ifdef HAVE_ERRNO_H
# include
-extern int errno;
#endif
#ifdef STDC_HEADERS
================================================
FILE: disabled-packages/deborphan/src-Makefile.in.patch
================================================
diff -u -r ../deborphan/src/Makefile.in ./src/Makefile.in
--- ../deborphan/src/Makefile.in 2016-02-21 09:05:27.000000000 -0500
+++ ./src/Makefile.in 2016-08-11 06:13:53.452865872 -0400
@@ -213,7 +213,7 @@
target_alias = @target_alias@
deborphan_SOURCES = deborphan.c exit.c libdeps.c pkginfo.c xalloc.c string.c keep.c file.c set.c
KEEPNAME = keep
-STATEDIR = /var/lib/deborphan
+STATEDIR = @TERMUX_PREFIX@/var/lib/deborphan
KEEPFILE = $(STATEDIR)/$(KEEPNAME)
INCLUDES = -I../include
all: all-am
================================================
FILE: disabled-packages/deborphan/src-deborphan.c.patch
================================================
diff -u -r ../deborphan/src/deborphan.c ./src/deborphan.c
--- ../deborphan/src/deborphan.c 2016-02-21 09:05:27.000000000 -0500
+++ ./src/deborphan.c 2016-08-11 06:20:43.718666170 -0400
@@ -562,8 +562,6 @@
if (this->install)
check_lib_deps(package, this, print_arch_suffixes);
- free_pkg_regex();
-
fflush(stdout);
for (i = 0; options[SEARCH] && search_for[i].name; i++) {
================================================
FILE: disabled-packages/deborphan/src-pkginfo.c.patch
================================================
diff -u -r ../deborphan/src/pkginfo.c ./src/pkginfo.c
--- ../deborphan/src/pkginfo.c 2016-02-21 09:05:27.000000000 -0500
+++ ./src/pkginfo.c 2016-08-11 06:10:28.211955162 -0400
@@ -106,10 +106,16 @@
regfree(&re_statushold);
regfree(&re_statusconfig);
regfree(&re_status);
- regfree(&re_namedev);
- regfree(&re_gnugrepv);
- regfree(&re_descdummy);
- regfree(&re_desctransit);
+ if (options[GUESS]) {
+ if (!guess_unique(GUESS_SECTION))
+ regfree(&re_namedev);
+ if (guess_chk(GUESS_SECTION))
+ regfree(&re_gnugrepv);
+ if (guess_chk(GUESS_DUMMY)) {
+ regfree(&re_descdummy);
+ regfree(&re_desctransit);
+ }
+ }
}
/* A similar "hack" was created by Paul Martin a while ago. It was not
================================================
FILE: disabled-packages/dovecot/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://www.dovecot.org
TERMUX_PKG_DESCRIPTION="Secure IMAP and POP3 email server"
TERMUX_PKG_VERSION=2.2.31
TERMUX_PKG_SRCURL=https://www.dovecot.org/releases/2.2/dovecot-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=034be40907748128d65088a4f59789b2f99ae7b33a88974eae0b6a68ece376a1
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
TERMUX_PKG_DEPENDS="openssl, libcrypt"
# turning on icu gives undefined reference to __cxa_call_unexpected
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-zlib
--with-ssl=openssl
--with-ssldir=$TERMUX_PREFIX/etc/tls
--without-icu
--without-shadow
i_cv_epoll_works=yes
i_cv_posix_fallocate_works=yes
i_cv_signed_size_t=no
i_cv_gmtime_max_time_t=40
i_cv_signed_time_t=yes
i_cv_mmap_plays_with_write=yes
i_cv_fd_passing=yes
i_cv_c99_vsnprintf=yes
lib_cv_va_copy=yes
lib_cv___va_copy=yes
"
termux_step_pre_configure() {
LDFLAGS="$LDFLAGS -llog"
for i in $(find $TERMUX_PKG_SRCDIR/src/director -type f); do sed 's|\bstruct user\b|struct usertest|g' -i $i; done
if [ "$TERMUX_ARCH" == "aarch64" ]; then
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="lib_cv_va_val_copy=yes"
else
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="lib_cv_va_val_copy=no"
fi
}
termux_step_post_make_install() {
for binary in doveadm doveconf; do
mv $TERMUX_PREFIX/bin/$binary $TERMUX_PREFIX/libexec/dovecot/$binary
cat > $TERMUX_PREFIX/bin/$binary <>confdefs.h
-
- have_rquota=yes
-fi
if test "$have_rquota" = "yes"; then
HAVE_RQUOTA_TRUE=
HAVE_RQUOTA_FALSE='#'
================================================
FILE: disabled-packages/dovecot/src-lib-connection.h.patch
================================================
--- ./src/lib/connection.h 2016-12-03 22:43:21.000000000 +0530
+++ ../connection.h 2017-06-09 22:47:48.138342901 +0530
@@ -2,6 +2,7 @@
#define CONNECTION_H
#include "net.h"
+#include
struct connection;
================================================
FILE: disabled-packages/easy-rsa/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://openvpn.net/easyrsa.html
TERMUX_PKG_VERSION=3.0.1
TERMUX_PKG_DEPENDS="openssl-tool"
TERMUX_PKG_SRCURL=https://github.com/OpenVPN/easy-rsa/releases/download/$TERMUX_PKG_VERSION/EasyRSA-$TERMUX_PKG_VERSION.tgz
TERMUX_PKG_SHA256=dbdaf5b9444b99e0c5221fd4bcf15384c62380c1b63cea23d42239414d7b2d4e
TERMUX_PKG_CONFFILES="etc/easy-rsa/openssl-1.0.cnf, etc/easy-rsa/vars"
TERMUX_PKG_MAINTAINER='Vishal Biswas @vishalbiswas'
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -D -m0755 easyrsa "${TERMUX_PREFIX}"/bin/easyrsa
install -D -m0644 openssl-1.0.cnf "${TERMUX_PREFIX}"/etc/easy-rsa/openssl-1.0.cnf
install -D -m0644 vars.example "${TERMUX_PREFIX}"/etc/easy-rsa/vars
install -d -m0755 "${TERMUX_PREFIX}"/etc/easy-rsa/x509-types/
install -m0644 x509-types/* "${TERMUX_PREFIX}"/etc/easy-rsa/x509-types/
}
================================================
FILE: disabled-packages/ghc/bitcast.patch
================================================
From
https://github.com/erikd/ghc-llvm-next/blob/llvm-3.8/patches/01-bitcast.patch
diff -u -r ../ghc-8.0.1/compiler/llvmGen/Llvm/PpLlvm.hs ./compiler/llvmGen/Llvm/PpLlvm.hs
--- ../ghc-8.0.1/compiler/llvmGen/Llvm/PpLlvm.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/llvmGen/Llvm/PpLlvm.hs 2016-06-23 16:59:36.113778783 -0400
@@ -73,7 +73,7 @@
Nothing -> empty
rhs = case dat of
- Just stat -> ppr stat
+ Just stat -> pprSpecialStatic stat
Nothing -> ppr (pLower $ getVarType var)
-- Position of linkage is different for aliases.
diff -u -r ../ghc-8.0.1/compiler/llvmGen/Llvm/Types.hs ./compiler/llvmGen/Llvm/Types.hs
--- ../ghc-8.0.1/compiler/llvmGen/Llvm/Types.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/llvmGen/Llvm/Types.hs 2016-06-23 17:00:14.569166114 -0400
@@ -175,6 +175,11 @@
ppr (LMSub s1 s2)
= pprStaticArith s1 s2 (sLit "sub") (sLit "fsub") "LMSub"
+pprSpecialStatic :: LlvmStatic -> SDoc
+pprSpecialStatic (LMBitc v t) =
+ ppr (pLower t) <> text ", bitcast (" <> ppr v <> text " to " <> ppr t <> char ')'
+pprSpecialStatic stat = ppr stat
+
pprStaticArith :: LlvmStatic -> LlvmStatic -> LitString -> LitString -> String -> SDoc
pprStaticArith s1 s2 int_op float_op op_name =
let ty1 = getStatType s1
================================================
FILE: disabled-packages/ghc/build.sh
================================================
# See https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling
# https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux
# and
# https://github.com/neurocyte/ghc-android
TERMUX_PKG_HOMEPAGE=https://www.haskell.org/ghc/
TERMUX_PKG_DESCRIPTION="The Glasgow Haskell Compilation system"
TERMUX_PKG_VERSION=8.0.1
TERMUX_PKG_SRCURL=http://downloads.haskell.org/~ghc/${TERMUX_PKG_VERSION}/ghc-${TERMUX_PKG_VERSION}-src.tar.xz
TERMUX_PKG_BUILD_IN_SRC=true
# Depend on clang for now until llvm is split into separate package:
TERMUX_PKG_DEPENDS="clang, ncurses"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-iconv-includes=$TERMUX_PREFIX/include -with-iconv-libraries=$TERMUX_PREFIX/lib"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-curses-includes=$TERMUX_PREFIX/include/ncursesw -with-curses-libraries=$TERMUX_PREFIX/lib"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --host=x86_64-unknown-linux --build=x86_64-unknown-linux"
termux_step_post_extract_package() {
ORIG_CFLAGS="$CFLAGS"
ORIG_CPPFLAGS="$CPPFLAGS"
ORIG_LDFLAGS="$LDFLAGS"
unset AR
unset AS
unset CC
export CFLAGS=""
unset CPP
export CPPFLAGS=""
unset CXXFLAGS
unset CXX
export LDFLAGS=""
unset LD
unset PKG_CONFIG
unset RANLIB
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --target=${TERMUX_HOST_PLATFORM}"
}
termux_step_pre_configure() {
echo "INTEGER_LIBRARY = integer-simple" > mk/build.mk
#echo "GhcStage2HcOpts = $ORIG_CFLAGS $ORIG_CPPFLAGS $ORIG_LDFLAGS" >> mk/build.mk
# Avoid "Can't use -fPIC or -dynamic on this platform":
echo "DYNAMIC_GHC_PROGRAMS = NO" >> mk/build.mk
echo "GhcLibWays = v" >> mk/build.mk
# "Can not build haddock docs when CrossCompiling or Stage1Only".
echo "HADDOCK_DOCS=NO" >> mk/build.mk
}
================================================
FILE: disabled-packages/ghc/compiler-llvmGen-LlvmCodeGen-Ppr.hs.patch
================================================
diff -u -r ../ghc-8.0.1/compiler/llvmGen/LlvmCodeGen/Ppr.hs ./compiler/llvmGen/LlvmCodeGen/Ppr.hs
--- ../ghc-8.0.1/compiler/llvmGen/LlvmCodeGen/Ppr.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/llvmGen/LlvmCodeGen/Ppr.hs 2016-06-23 17:54:27.073877144 -0400
@@ -44,12 +44,18 @@
Platform { platformArch = ArchX86, platformOS = OSLinux } ->
text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32\""
$+$ text "target triple = \"i386-pc-linux-gnu\""
+ Platform { platformArch = ArchX86, platformOS = OSAndroid } ->
+ text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32\""
+ $+$ text "target triple = \"i386-pc-linux-android\""
Platform { platformArch = ArchX86_64, platformOS = OSDarwin } ->
text "target datalayout = \"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64\""
$+$ text "target triple = \"x86_64-apple-darwin10.0.0\""
Platform { platformArch = ArchX86_64, platformOS = OSLinux } ->
text "target datalayout = \"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64\""
$+$ text "target triple = \"x86_64-linux-gnu\""
+ Platform { platformArch = ArchX86_64, platformOS = OSAndroid } ->
+ text "target datalayout = \"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64\""
+ $+$ text "target triple = \"x86_64-linux-android\""
Platform { platformArch = ArchARM {}, platformOS = OSLinux } ->
text "target datalayout = \"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32\""
$+$ text "target triple = \"armv6-unknown-linux-gnueabihf\""
@@ -71,6 +77,9 @@
Platform { platformArch = ArchARM64, platformOS = OSLinux } ->
text "target datalayout = \"e-m:e-i64:64-i128:128-n32:64-S128\""
$+$ text "target triple = \"aarch64-unknown-linux-gnu\""
+ Platform { platformArch = ArchARM64, platformOS = OSAndroid } ->
+ text "target datalayout = \"e-m:e-i64:64-i128:128-n32:64-S128\""
+ $+$ text "target triple = \"aarch64-unknown-linux-android\""
_ ->
if platformIsCrossCompiling platform
then panic "LlvmCodeGen.Ppr: Cross compiling without valid target info."
================================================
FILE: disabled-packages/ghc/compiler-main-DriverPipeline.hs.patch
================================================
diff -u -r ../ghc-8.0.1/compiler/main/DriverPipeline.hs ./compiler/main/DriverPipeline.hs
--- ../ghc-8.0.1/compiler/main/DriverPipeline.hs 2016-05-16 13:08:53.000000000 -0400
+++ ./compiler/main/DriverPipeline.hs 2016-09-07 03:37:48.321941122 -0400
@@ -1831,10 +1831,7 @@
| WayThreaded `elem` ways dflags =
let os = platformOS (targetPlatform dflags)
in if os == OSOsf3 then ["-lpthread", "-lexc"]
- else if os `elem` [OSMinGW32, OSFreeBSD, OSOpenBSD,
- OSNetBSD, OSHaiku, OSQNXNTO, OSiOS, OSDarwin]
- then []
- else ["-lpthread"]
+ else []
| otherwise = []
rc_objs <- maybeCreateManifest dflags output_fn
================================================
FILE: disabled-packages/ghc/configure.patch
================================================
diff -u -r ../ghc-8.0.1/configure ./configure
--- ../ghc-8.0.1/configure 2016-05-17 12:36:51.000000000 -0400
+++ ./configure 2016-06-23 16:46:28.690875698 -0400
@@ -7126,7 +7126,7 @@
# tools we are looking for. In the past, GHC supported a number of
# versions of LLVM simultaneously, but that stopped working around
# 3.5/3.6 release of LLVM.
-LlvmVersion=3.7
+LlvmVersion=3.9
sUPPORTED_LLVM_VERSION=$(echo \($LlvmVersion\) | sed 's/\./,/')
================================================
FILE: disabled-packages/groff/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/groff/
TERMUX_PKG_DESCRIPTION="GNU troff text-formatting program"
TERMUX_PKG_VERSION=1.22.3
TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/groff/groff-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-doc=no --without-gs --without-x"
================================================
FILE: disabled-packages/gst-libav/build.sh
================================================
# NOTE: Disabled due to not being ffmpeg 4 compatible.
TERMUX_PKG_HOMEPAGE=https://gstreamer.freedesktop.org/
TERMUX_PKG_DESCRIPTION="GStreamer libav/ffmpeg wrapper"
TERMUX_PKG_VERSION=1.14.1
TERMUX_PKG_SHA256=eff80a02d2f2fb9f34b67e9a26e9954d3218c7aa18e863f2a47805fa7066029d
TERMUX_PKG_SRCURL=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="gst-plugins-base,ffmpeg"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-android_media
--disable-examples
--disable-tests
--with-system-libav
"
================================================
FILE: disabled-packages/gst123/build.sh
================================================
# Broken - requires gtk
TERMUX_PKG_HOMEPAGE=http://space.twc.de/~stefan/gst123.php
TERMUX_PKG_DESCRIPTION="GStreamer based command line media player"
TERMUX_PKG_VERSION=0.3.4
TERMUX_PKG_SRCURL=http://space.twc.de/~stefan/gst123/gst123-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_DEPENDS="gst-plugins-bad, ncurses"
================================================
FILE: disabled-packages/guile/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/guile/
TERMUX_PKG_DESCRIPTION="GNU extension language and Scheme interpreter"
TERMUX_PKG_VERSION=2.0.11
TERMUX_PKG_SRCURL=ftp://ftp.gnu.org/gnu/guile/guile-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="libgmp, libunistring, libffi, libgc"
================================================
FILE: disabled-packages/javac/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html
TERMUX_PKG_DESCRIPTION="Java programming language compiler from (openjdk)"
TERMUX_PKG_VERSION=8u45
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_extract_package() {
mkdir $TERMUX_PKG_SRCDIR
}
termux_step_make() {
RAW_JAR=/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar
mkdir -p $TERMUX_PREFIX/share/dex
$TERMUX_DX \
--dex \
--output=$TERMUX_PREFIX/share/dex/tools.jar \
$RAW_JAR
install $TERMUX_PKG_BUILDER_DIR/javac $TERMUX_PREFIX/bin/javac
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/javac
}
================================================
FILE: disabled-packages/javac/javac
================================================
#!/system/bin/sh
# There needs to be a folder at $ANDROID_DATA/dalvik-cache
export ANDROID_DATA=@TERMUX_PREFIX@/var/android/
mkdir -p $ANDROID_DATA/dalvik-cache
jarpath=@TERMUX_PREFIX@/share/dex/tools.jar
# -proc:none to disable annotation processing/compiling
# -7 for java 1.7 compatibility
dalvikvm -Xmx256m -cp $jarpath com.sun.tools.javac.Main -proc:none -7 -cp @TERMUX_PREFIX@/share/java/android.jar $@
================================================
FILE: disabled-packages/libfakechroot/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://github.com/dex4er/fakechroot/wiki
TERMUX_PKG_DESCRIPTION="Library for creating fake chroots"
TERMUX_PKG_VERSION=2.17.2
TERMUX_PKG_SRCURL=https://github.com/dex4er/fakechroot/archive/${TERMUX_PKG_VERSION}.tar.gz
================================================
FILE: disabled-packages/libffi-updated/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://sourceware.org/libffi/
TERMUX_PKG_DESCRIPTION="Library providing a portable, high level programming interface to various calling conventions"
local _COMMIT=716bfd83177689e2244c4707bd513003cff92c68
local _DATE=20171105
TERMUX_PKG_VERSION=3.2.1.$_DATE
TERMUX_PKG_SHA256=454577ab2d046dbdf5697f71598247fb8d8bf2d378817d5d5b8bc5dceaf822ac
TERMUX_PKG_SRCURL=https://github.com/libffi/libffi/archive/${_COMMIT}.zip
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-multi-os-directory --enable-symvers=no"
TERMUX_PKG_RM_AFTER_INSTALL="lib/libffi-${TERMUX_PKG_VERSION}/include"
termux_step_pre_configure() {
cd $TERMUX_PKG_SRCDIR
./autogen.sh
}
================================================
FILE: disabled-packages/libjemalloc/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.canonware.com/jemalloc/
TERMUX_PKG_DESCRIPTION="General-purpose scalable concurrent malloc(3) implementation"
TERMUX_PKG_VERSION=4.0.0
TERMUX_PKG_SRCURL=https://github.com/jemalloc/jemalloc/releases/download/${TERMUX_PKG_VERSION}/jemalloc-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_BUILD_IN_SRC=true
CPPFLAGS+=" -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1"
================================================
FILE: disabled-packages/libressl/build.sh
================================================
# Status: Termux currently uses openssl. Transitioning to libressl
# is tempting, but on hold for now to see how widespread
# the adoption of libressl in Linux distributions is.
TERMUX_PKG_HOMEPAGE=http://www.libressl.org/
TERMUX_PKG_DESCRIPTION="Library implementing the TLS protocol as well as general purpose cryptography functions"
TERMUX_PKG_DEPENDS="ca-certificates"
TERMUX_PKG_VERSION=2.5.5
TERMUX_PKG_SHA256=e57f5e3d5842a81fe9351b6e817fcaf0a749ca4ef35a91465edba9e071dce7c4
TERMUX_PKG_SRCURL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-openssldir=$TERMUX_PREFIX/etc/tls"
TERMUX_PKG_CONFLICTS="openssl"
# etc/tls/cert.pem is provided by ca-certificates:
TERMUX_PKG_RM_AFTER_INSTALL="etc/tls/cert.pem"
termux_step_pre_configure() {
CPPFLAGS+=" -DNO_SYSLOG"
}
================================================
FILE: disabled-packages/lrzsz/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://ohse.de/uwe/software/lrzsz.html
TERMUX_PKG_DESCRIPTION="Tools for zmodem/xmodem/ymodem file transfer"
TERMUX_PKG_VERSION=0.12.20
TERMUX_PKG_SRCURL=https://ohse.de/uwe/releases/lrzsz-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-syslog --mandir=$TERMUX_PREFIX/share/man"
================================================
FILE: disabled-packages/lrzsz/src-Makefile.in.patch
================================================
Hard links are not supported on Android 6.0+
diff -u -r ../lrzsz-0.12.20/src/Makefile.in ./src/Makefile.in
--- ../lrzsz-0.12.20/src/Makefile.in 1998-12-30 17:31:46.000000000 +0100
+++ ./src/Makefile.in 2017-01-25 01:17:46.135033894 +0100
@@ -370,16 +370,16 @@
install-exec-local:
rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'`
- ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
+ ln -s $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
$(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
rm -f $(bindir)/`echo lsx | sed -e '$(transform)'`
- ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
+ ln -s $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
$(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'`
rm -f $(bindir)/`echo lrb | sed -e '$(transform)'`
- ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
+ ln -s $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
$(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'`
rm -f $(bindir)/`echo lrx | sed -e '$(transform)'`
- ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
+ ln -s $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
$(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'`
# rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'`
# ln $(bindir)/`echo lrzszbug |sed -e '$(transform)'` \
================================================
FILE: disabled-packages/man-db/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.nongnu.org/man-db/
TERMUX_PKG_DESCRIPTION="Utilities for examining on-line help files (manual pages)"
TERMUX_PKG_VERSION=2.7.5
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://mirror.csclub.uwaterloo.ca/nongnu/man-db/man-db-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-db=gdbm --with-pager=less --with-config-file=/data/data/com.termux/files/usr/etc/man_db.conf --disable-setuid --with-browser=lynx --with-gzip=gzip --with-systemdtmpfilesdir=/data/data/com.termux/files/usr/lib/tmpfiles.d"
TERMUX_PKG_DEPENDS="flex, gdbm, groff, less, libandroid-support, libpipeline, lynx"
export GROFF_TMAC_PATH="/data/data/com.termux/files/usr/lib/groff/site-tmac:/data/data/com.termux/files/usr/share/groff/site-tmac:/data/data/com.termux/files/usr/share/groff/current/tmac"
================================================
FILE: disabled-packages/mono/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.mono-project.com/
TERMUX_PKG_MAINTAINER='Vishal Biswas @vishalbiswas'
_MONO_VERSION=5.0.0
_MONO_PATCH=100
TERMUX_PKG_VERSION=$_MONO_VERSION.$_MONO_PATCH
# official package is missing support/libm/math_private.h
#TERMUX_PKG_SRCURL=https://github.com/mono/mono/archive/mono-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SRCURL=https://download.mono-project.com/sources/mono/mono-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=368da3ff9f42592920cd8cf6fa15c6c16558e967144c4d3df873352e5d2bb6df
TERMUX_PKG_FOLDERNAME=mono-$_MONO_VERSION
#TERMUX_PKG_EXTRA_CONFIGURE_ARGS='--disable-mcs-build --disable-boehm --with-sigaltstack=no'
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="--disable-btls --disable-dynamic-btls" #--with-btls-android-ndk=$ANDROID_NDK"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
# export CFLAGS="$CFLAGS -mthumb"
cd "$TERMUX_PKG_SRCDIR"
# NOCONFIGURE=1 ./autogen.sh
# cp $TERMUX_PKG_BUILDER_DIR/{complex,math_private}.h $TERMUX_PKG_SRCDIR/support/libm/
export ANDROID_STANDALONE_TOOLCHAIN=$TERMUX_STANDALONE_TOOLCHAIN
}
================================================
FILE: disabled-packages/mono/complex.h
================================================
/*-
* Copyright (c) 2001-2011 The FreeBSD Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _COMPLEX_H
#define _COMPLEX_H
#include
#ifdef __GNUC__
#if __STDC_VERSION__ < 199901
#define _Complex __complex__
#endif
#define _Complex_I ((float _Complex)1.0i)
#endif
#ifdef __generic
_Static_assert(__generic(_Complex_I, float _Complex, 1, 0),
"_Complex_I must be of type float _Complex");
#endif
#define complex _Complex
#define I _Complex_I
#if __ISO_C_VISIBLE >= 2011
#ifdef __clang__
#define CMPLX(x, y) ((double complex){ x, y })
#define CMPLXF(x, y) ((float complex){ x, y })
#define CMPLXL(x, y) ((long double complex){ x, y })
#elif __GNUC_PREREQ__(4, 7)
#define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
#define CMPLXF(x, y) __builtin_complex((float)(x), (float)(y))
#define CMPLXL(x, y) __builtin_complex((long double)(x), (long double)(y))
#endif
#endif /* __ISO_C_VISIBLE >= 2011 */
__BEGIN_DECLS
#pragma GCC visibility push(default)
double cabs(double complex);
float cabsf(float complex);
long double cabsl(long double complex);
double complex cacos(double complex);
float complex cacosf(float complex);
double complex cacosh(double complex);
float complex cacoshf(float complex);
double carg(double complex);
float cargf(float complex);
long double cargl(long double complex);
double complex casin(double complex);
float complex casinf(float complex);
double complex casinh(double complex);
float complex casinhf(float complex);
double complex catan(double complex);
float complex catanf(float complex);
double complex catanh(double complex);
float complex catanhf(float complex);
double complex ccos(double complex);
float complex ccosf(float complex);
double complex ccosh(double complex);
float complex ccoshf(float complex);
double complex cexp(double complex);
float complex cexpf(float complex);
double cimag(double complex) __pure2;
float cimagf(float complex) __pure2;
long double cimagl(long double complex) __pure2;
double complex conj(double complex) __pure2;
float complex conjf(float complex) __pure2;
long double complex
conjl(long double complex) __pure2;
float complex cprojf(float complex) __pure2;
double complex cproj(double complex) __pure2;
long double complex
cprojl(long double complex) __pure2;
double creal(double complex) __pure2;
float crealf(float complex) __pure2;
long double creall(long double complex) __pure2;
double complex csin(double complex);
float complex csinf(float complex);
double complex csinh(double complex);
float complex csinhf(float complex);
double complex csqrt(double complex);
float complex csqrtf(float complex);
long double complex
csqrtl(long double complex);
double complex ctan(double complex);
float complex ctanf(float complex);
double complex ctanh(double complex);
float complex ctanhf(float complex);
#pragma GCC visibility pop
__END_DECLS
#endif /* _COMPLEX_H */
================================================
FILE: disabled-packages/mono/math_private.h
================================================
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/*
* from: @(#)fdlibm.h 5.1 93/09/24
* $FreeBSD$
*/
#ifndef _MATH_PRIVATE_H_
#define _MATH_PRIVATE_H_
#include
#include
/*
* The original fdlibm code used statements like:
* n0 = ((*(int*)&one)>>29)^1; * index of high word *
* ix0 = *(n0+(int*)&x); * high word of x *
* ix1 = *((1-n0)+(int*)&x); * low word of x *
* to dig two 32 bit words out of the 64 bit IEEE floating point
* value. That is non-ANSI, and, moreover, the gcc instruction
* scheduler gets it wrong. We instead use the following macros.
* Unlike the original code, we determine the endianness at compile
* time, not at run time; I don't see much benefit to selecting
* endianness at run time.
*/
/*
* A union which permits us to convert between a double and two 32 bit
* ints.
*/
#ifdef __arm__
#if defined(__VFP_FP__) || defined(__ARM_EABI__)
#define IEEE_WORD_ORDER BYTE_ORDER
#else
#define IEEE_WORD_ORDER BIG_ENDIAN
#endif
#else /* __arm__ */
#define IEEE_WORD_ORDER BYTE_ORDER
#endif
#if IEEE_WORD_ORDER == BIG_ENDIAN
typedef union
{
double value;
struct
{
u_int32_t msw;
u_int32_t lsw;
} parts;
struct
{
u_int64_t w;
} xparts;
} ieee_double_shape_type;
#endif
#if IEEE_WORD_ORDER == LITTLE_ENDIAN
typedef union
{
double value;
struct
{
u_int32_t lsw;
u_int32_t msw;
} parts;
struct
{
u_int64_t w;
} xparts;
} ieee_double_shape_type;
#endif
/* Get two 32 bit ints from a double. */
#define EXTRACT_WORDS(ix0,ix1,d) \
do { \
ieee_double_shape_type ew_u; \
ew_u.value = (d); \
(ix0) = ew_u.parts.msw; \
(ix1) = ew_u.parts.lsw; \
} while (0)
/* Get a 64-bit int from a double. */
#define EXTRACT_WORD64(ix,d) \
do { \
ieee_double_shape_type ew_u; \
ew_u.value = (d); \
(ix) = ew_u.xparts.w; \
} while (0)
/* Get the more significant 32 bit int from a double. */
#define GET_HIGH_WORD(i,d) \
do { \
ieee_double_shape_type gh_u; \
gh_u.value = (d); \
(i) = gh_u.parts.msw; \
} while (0)
/* Get the less significant 32 bit int from a double. */
#define GET_LOW_WORD(i,d) \
do { \
ieee_double_shape_type gl_u; \
gl_u.value = (d); \
(i) = gl_u.parts.lsw; \
} while (0)
/* Set a double from two 32 bit ints. */
#define INSERT_WORDS(d,ix0,ix1) \
do { \
ieee_double_shape_type iw_u; \
iw_u.parts.msw = (ix0); \
iw_u.parts.lsw = (ix1); \
(d) = iw_u.value; \
} while (0)
/* Set a double from a 64-bit int. */
#define INSERT_WORD64(d,ix) \
do { \
ieee_double_shape_type iw_u; \
iw_u.xparts.w = (ix); \
(d) = iw_u.value; \
} while (0)
/* Set the more significant 32 bits of a double from an int. */
#define SET_HIGH_WORD(d,v) \
do { \
ieee_double_shape_type sh_u; \
sh_u.value = (d); \
sh_u.parts.msw = (v); \
(d) = sh_u.value; \
} while (0)
/* Set the less significant 32 bits of a double from an int. */
#define SET_LOW_WORD(d,v) \
do { \
ieee_double_shape_type sl_u; \
sl_u.value = (d); \
sl_u.parts.lsw = (v); \
(d) = sl_u.value; \
} while (0)
/*
* A union which permits us to convert between a float and a 32 bit
* int.
*/
typedef union
{
float value;
/* FIXME: Assumes 32 bit int. */
unsigned int word;
} ieee_float_shape_type;
/* Get a 32 bit int from a float. */
#define GET_FLOAT_WORD(i,d) \
do { \
ieee_float_shape_type gf_u; \
gf_u.value = (d); \
(i) = gf_u.word; \
} while (0)
/* Set a float from a 32 bit int. */
#define SET_FLOAT_WORD(d,i) \
do { \
ieee_float_shape_type sf_u; \
sf_u.word = (i); \
(d) = sf_u.value; \
} while (0)
/*
* Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
* double.
*/
#define EXTRACT_LDBL80_WORDS(ix0,ix1,d) \
do { \
union IEEEl2bits ew_u; \
ew_u.e = (d); \
(ix0) = ew_u.xbits.expsign; \
(ix1) = ew_u.xbits.man; \
} while (0)
/*
* Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
* long double.
*/
#define EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d) \
do { \
union IEEEl2bits ew_u; \
ew_u.e = (d); \
(ix0) = ew_u.xbits.expsign; \
(ix1) = ew_u.xbits.manh; \
(ix2) = ew_u.xbits.manl; \
} while (0)
/* Get expsign as a 16 bit int from a long double. */
#define GET_LDBL_EXPSIGN(i,d) \
do { \
union IEEEl2bits ge_u; \
ge_u.e = (d); \
(i) = ge_u.xbits.expsign; \
} while (0)
/*
* Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
* mantissa.
*/
#define INSERT_LDBL80_WORDS(d,ix0,ix1) \
do { \
union IEEEl2bits iw_u; \
iw_u.xbits.expsign = (ix0); \
iw_u.xbits.man = (ix1); \
(d) = iw_u.e; \
} while (0)
/*
* Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
* comprising the mantissa.
*/
#define INSERT_LDBL128_WORDS(d,ix0,ix1,ix2) \
do { \
union IEEEl2bits iw_u; \
iw_u.xbits.expsign = (ix0); \
iw_u.xbits.manh = (ix1); \
iw_u.xbits.manl = (ix2); \
(d) = iw_u.e; \
} while (0)
/* Set expsign of a long double from a 16 bit int. */
#define SET_LDBL_EXPSIGN(d,v) \
do { \
union IEEEl2bits se_u; \
se_u.e = (d); \
se_u.xbits.expsign = (v); \
(d) = se_u.e; \
} while (0)
#ifdef __i386__
/* Long double constants are broken on i386. */
#define LD80C(m, ex, v) { \
.xbits.man = __CONCAT(m, ULL), \
.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0), \
}
#else
/* The above works on non-i386 too, but we use this to check v. */
#define LD80C(m, ex, v) { .e = (v), }
#endif
#ifdef FLT_EVAL_METHOD
/*
* Attempt to get strict C99 semantics for assignment with non-C99 compilers.
*/
#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval))
#else
#define STRICT_ASSIGN(type, lval, rval) do { \
volatile type __lval; \
\
if (sizeof(type) >= sizeof(long double)) \
(lval) = (rval); \
else { \
__lval = (rval); \
(lval) = __lval; \
} \
} while (0)
#endif
#endif /* FLT_EVAL_METHOD */
/* Support switching the mode to FP_PE if necessary. */
#if defined(__i386__) && !defined(NO_FPSETPREC)
#define ENTERI() \
long double __retval; \
fp_prec_t __oprec; \
\
if ((__oprec = fpgetprec()) != FP_PE) \
fpsetprec(FP_PE)
#define RETURNI(x) do { \
__retval = (x); \
if (__oprec != FP_PE) \
fpsetprec(__oprec); \
RETURNF(__retval); \
} while (0)
#else
#define ENTERI(x)
#define RETURNI(x) RETURNF(x)
#endif
/* Default return statement if hack*_t() is not used. */
#define RETURNF(v) return (v)
/*
* 2sum gives the same result as 2sumF without requiring |a| >= |b| or
* a == 0, but is slower.
*/
#define _2sum(a, b) do { \
__typeof(a) __s, __w; \
\
__w = (a) + (b); \
__s = __w - (a); \
(b) = ((a) - (__w - __s)) + ((b) - __s); \
(a) = __w; \
} while (0)
/*
* 2sumF algorithm.
*
* "Normalize" the terms in the infinite-precision expression a + b for
* the sum of 2 floating point values so that b is as small as possible
* relative to 'a'. (The resulting 'a' is the value of the expression in
* the same precision as 'a' and the resulting b is the rounding error.)
* |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
* exponent overflow or underflow must not occur. This uses a Theorem of
* Dekker (1971). See Knuth (1981) 4.2.2 Theorem C. The name "TwoSum"
* is apparently due to Skewchuk (1997).
*
* For this to always work, assignment of a + b to 'a' must not retain any
* extra precision in a + b. This is required by C standards but broken
* in many compilers. The brokenness cannot be worked around using
* STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
* algorithm would be destroyed by non-null strict assignments. (The
* compilers are correct to be broken -- the efficiency of all floating
* point code calculations would be destroyed similarly if they forced the
* conversions.)
*
* Fortunately, a case that works well can usually be arranged by building
* any extra precision into the type of 'a' -- 'a' should have type float_t,
* double_t or long double. b's type should be no larger than 'a's type.
* Callers should use these types with scopes as large as possible, to
* reduce their own extra-precision and efficiciency problems. In
* particular, they shouldn't convert back and forth just to call here.
*/
#ifdef DEBUG
#define _2sumF(a, b) do { \
__typeof(a) __w; \
volatile __typeof(a) __ia, __ib, __r, __vw; \
\
__ia = (a); \
__ib = (b); \
assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib)); \
\
__w = (a) + (b); \
(b) = ((a) - __w) + (b); \
(a) = __w; \
\
/* The next 2 assertions are weak if (a) is already long double. */ \
assert((long double)__ia + __ib == (long double)(a) + (b)); \
__vw = __ia + __ib; \
__r = __ia - __vw; \
__r += __ib; \
assert(__vw == (a) && __r == (b)); \
} while (0)
#else /* !DEBUG */
#define _2sumF(a, b) do { \
__typeof(a) __w; \
\
__w = (a) + (b); \
(b) = ((a) - __w) + (b); \
(a) = __w; \
} while (0)
#endif /* DEBUG */
/*
* Set x += c, where x is represented in extra precision as a + b.
* x must be sufficiently normalized and sufficiently larger than c,
* and the result is then sufficiently normalized.
*
* The details of ordering are that |a| must be >= |c| (so that (a, c)
* can be normalized without extra work to swap 'a' with c). The details of
* the normalization are that b must be small relative to the normalized 'a'.
* Normalization of (a, c) makes the normalized c tiny relative to the
* normalized a, so b remains small relative to 'a' in the result. However,
* b need not ever be tiny relative to 'a'. For example, b might be about
* 2**20 times smaller than 'a' to give about 20 extra bits of precision.
* That is usually enough, and adding c (which by normalization is about
* 2**53 times smaller than a) cannot change b significantly. However,
* cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
* significantly relative to b. The caller must ensure that significant
* cancellation doesn't occur, either by having c of the same sign as 'a',
* or by having |c| a few percent smaller than |a|. Pre-normalization of
* (a, b) may help.
*
* This is is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
* exercise 19). We gain considerable efficiency by requiring the terms to
* be sufficiently normalized and sufficiently increasing.
*/
#define _3sumF(a, b, c) do { \
__typeof(a) __tmp; \
\
__tmp = (c); \
_2sumF(__tmp, (a)); \
(b) += (a); \
(a) = __tmp; \
} while (0)
/*
* Common routine to process the arguments to nan(), nanf(), and nanl().
*/
void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
#ifdef _COMPLEX_H
/*
* C99 specifies that complex numbers have the same representation as
* an array of two elements, where the first element is the real part
* and the second element is the imaginary part.
*/
typedef union {
float complex f;
float a[2];
} float_complex;
typedef union {
double complex f;
double a[2];
} double_complex;
typedef union {
long double complex f;
long double a[2];
} long_double_complex;
#define REALPART(z) ((z).a[0])
#define IMAGPART(z) ((z).a[1])
/*
* Inline functions that can be used to construct complex values.
*
* The C99 standard intends x+I*y to be used for this, but x+I*y is
* currently unusable in general since gcc introduces many overflow,
* underflow, sign and efficiency bugs by rewriting I*y as
* (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
* In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
* to -0.0+I*0.0.
*/
static __inline float complex
cpackf(float x, float y)
{
float_complex z;
REALPART(z) = x;
IMAGPART(z) = y;
return (z.f);
}
static __inline double complex
cpack(double x, double y)
{
double_complex z;
REALPART(z) = x;
IMAGPART(z) = y;
return (z.f);
}
static __inline long double complex
cpackl(long double x, long double y)
{
long_double_complex z;
REALPART(z) = x;
IMAGPART(z) = y;
return (z.f);
}
#endif /* _COMPLEX_H */
#ifdef __GNUCLIKE_ASM
/* Asm versions of some functions. */
#ifdef __amd64__
static __inline int
irint(double x)
{
int n;
asm("cvtsd2si %1,%0" : "=r" (n) : "x" (x));
return (n);
}
#define HAVE_EFFICIENT_IRINT
#endif
#ifdef __i386__
static __inline int
irint(double x)
{
int n;
asm("fistl %0" : "=m" (n) : "t" (x));
return (n);
}
#define HAVE_EFFICIENT_IRINT
#endif
#if defined(__amd64__) || defined(__i386__)
static __inline int
irintl(long double x)
{
int n;
asm("fistl %0" : "=m" (n) : "t" (x));
return (n);
}
#define HAVE_EFFICIENT_IRINTL
#endif
#endif /* __GNUCLIKE_ASM */
#ifdef DEBUG
#if defined(__amd64__) || defined(__i386__)
#define breakpoint() asm("int $3")
#else
#include
#define breakpoint() raise(SIGTRAP)
#endif
#endif
/* Write a pari script to test things externally. */
#ifdef DOPRINT
#include
#ifndef DOPRINT_SWIZZLE
#define DOPRINT_SWIZZLE 0
#endif
#ifdef DOPRINT_LD80
#define DOPRINT_START(xp) do { \
uint64_t __lx; \
uint16_t __hx; \
\
/* Hack to give more-problematic args. */ \
EXTRACT_LDBL80_WORDS(__hx, __lx, *xp); \
__lx ^= DOPRINT_SWIZZLE; \
INSERT_LDBL80_WORDS(*xp, __hx, __lx); \
printf("x = %.21Lg; ", (long double)*xp); \
} while (0)
#define DOPRINT_END1(v) \
printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
#define DOPRINT_END2(hi, lo) \
printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n", \
(long double)(hi), (long double)(lo))
#elif defined(DOPRINT_D64)
#define DOPRINT_START(xp) do { \
uint32_t __hx, __lx; \
\
EXTRACT_WORDS(__hx, __lx, *xp); \
__lx ^= DOPRINT_SWIZZLE; \
INSERT_WORDS(*xp, __hx, __lx); \
printf("x = %.21Lg; ", (long double)*xp); \
} while (0)
#define DOPRINT_END1(v) \
printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
#define DOPRINT_END2(hi, lo) \
printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n", \
(long double)(hi), (long double)(lo))
#elif defined(DOPRINT_F32)
#define DOPRINT_START(xp) do { \
uint32_t __hx; \
\
GET_FLOAT_WORD(__hx, *xp); \
__hx ^= DOPRINT_SWIZZLE; \
SET_FLOAT_WORD(*xp, __hx); \
printf("x = %.21Lg; ", (long double)*xp); \
} while (0)
#define DOPRINT_END1(v) \
printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
#define DOPRINT_END2(hi, lo) \
printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n", \
(long double)(hi), (long double)(lo))
#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
#ifndef DOPRINT_SWIZZLE_HIGH
#define DOPRINT_SWIZZLE_HIGH 0
#endif
#define DOPRINT_START(xp) do { \
uint64_t __lx, __llx; \
uint16_t __hx; \
\
EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp); \
__llx ^= DOPRINT_SWIZZLE; \
__lx ^= DOPRINT_SWIZZLE_HIGH; \
INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx); \
printf("x = %.36Lg; ", (long double)*xp); \
} while (0)
#define DOPRINT_END1(v) \
printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
#define DOPRINT_END2(hi, lo) \
printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n", \
(long double)(hi), (long double)(lo))
#endif /* DOPRINT_LD80 */
#else /* !DOPRINT */
#define DOPRINT_START(xp)
#define DOPRINT_END1(v)
#define DOPRINT_END2(hi, lo)
#endif /* DOPRINT */
#define RETURNP(x) do { \
DOPRINT_END1(x); \
RETURNF(x); \
} while (0)
#define RETURNPI(x) do { \
DOPRINT_END1(x); \
RETURNI(x); \
} while (0)
#define RETURN2P(x, y) do { \
DOPRINT_END2((x), (y)); \
RETURNF((x) + (y)); \
} while (0)
#define RETURN2PI(x, y) do { \
DOPRINT_END2((x), (y)); \
RETURNI((x) + (y)); \
} while (0)
#ifdef STRUCT_RETURN
#define RETURNSP(rp) do { \
if (!(rp)->lo_set) \
RETURNP((rp)->hi); \
RETURN2P((rp)->hi, (rp)->lo); \
} while (0)
#define RETURNSPI(rp) do { \
if (!(rp)->lo_set) \
RETURNPI((rp)->hi); \
RETURN2PI((rp)->hi, (rp)->lo); \
} while (0)
#endif
#define SUM2P(x, y) ({ \
const __typeof (x) __x = (x); \
const __typeof (y) __y = (y); \
\
DOPRINT_END2(__x, __y); \
__x + __y; \
})
/*
* ieee style elementary functions
*
* We rename functions here to improve other sources' diffability
* against fdlibm.
*/
#define __ieee754_sqrt sqrt
#define __ieee754_acos acos
#define __ieee754_acosh acosh
#define __ieee754_log log
#define __ieee754_log2 log2
#define __ieee754_atanh atanh
#define __ieee754_asin asin
#define __ieee754_atan2 atan2
#define __ieee754_exp exp
#define __ieee754_cosh cosh
#define __ieee754_fmod fmod
#define __ieee754_pow pow
#define __ieee754_lgamma lgamma
#define __ieee754_gamma gamma
#define __ieee754_lgamma_r lgamma_r
#define __ieee754_gamma_r gamma_r
#define __ieee754_log10 log10
#define __ieee754_sinh sinh
#define __ieee754_hypot hypot
#define __ieee754_j0 j0
#define __ieee754_j1 j1
#define __ieee754_y0 y0
#define __ieee754_y1 y1
#define __ieee754_jn jn
#define __ieee754_yn yn
#define __ieee754_remainder remainder
#define __ieee754_scalb scalb
#define __ieee754_sqrtf sqrtf
#define __ieee754_acosf acosf
#define __ieee754_acoshf acoshf
#define __ieee754_logf logf
#define __ieee754_atanhf atanhf
#define __ieee754_asinf asinf
#define __ieee754_atan2f atan2f
#define __ieee754_expf expf
#define __ieee754_coshf coshf
#define __ieee754_fmodf fmodf
#define __ieee754_powf powf
#define __ieee754_lgammaf lgammaf
#define __ieee754_gammaf gammaf
#define __ieee754_lgammaf_r lgammaf_r
#define __ieee754_gammaf_r gammaf_r
#define __ieee754_log10f log10f
#define __ieee754_log2f log2f
#define __ieee754_sinhf sinhf
#define __ieee754_hypotf hypotf
#define __ieee754_j0f j0f
#define __ieee754_j1f j1f
#define __ieee754_y0f y0f
#define __ieee754_y1f y1f
#define __ieee754_jnf jnf
#define __ieee754_ynf ynf
#define __ieee754_remainderf remainderf
#define __ieee754_scalbf scalbf
/* fdlibm kernel function */
int __kernel_rem_pio2(double*,double*,int,int,int);
/* double precision kernel functions */
#ifndef INLINE_REM_PIO2
int __ieee754_rem_pio2(double,double*);
#endif
double __kernel_sin(double,double,int);
double __kernel_cos(double,double);
double __kernel_tan(double,double,int);
double __ldexp_exp(double,int);
#ifdef _COMPLEX_H
double complex __ldexp_cexp(double complex,int);
#endif
/* float precision kernel functions */
#ifndef INLINE_REM_PIO2F
int __ieee754_rem_pio2f(float,double*);
#endif
#ifndef INLINE_KERNEL_SINDF
float __kernel_sindf(double);
#endif
#ifndef INLINE_KERNEL_COSDF
float __kernel_cosdf(double);
#endif
#ifndef INLINE_KERNEL_TANDF
float __kernel_tandf(double,int);
#endif
float __ldexp_expf(float,int);
#ifdef _COMPLEX_H
float complex __ldexp_cexpf(float complex,int);
#endif
/* long double precision kernel functions */
long double __kernel_sinl(long double, long double, int);
long double __kernel_cosl(long double, long double);
long double __kernel_tanl(long double, long double, int);
#endif /* !_MATH_PRIVATE_H_ */
================================================
FILE: disabled-packages/mono/tkill.patch
================================================
--- ./libgc/pthread_stop_world.c 2017-01-03 15:49:34.000000000 +0530
+++ ../pthread_stop_world.c 2017-01-05 18:54:28.314868754 +0530
@@ -379,11 +379,7 @@
GC_printf1("Sending suspend signal to 0x%lx\n", p -> id);
#endif
-#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_SUSPEND);
-#else
- result = android_thread_kill(p -> kernel_id, SIG_SUSPEND);
-#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
--- ./mono/utils/mono-threads-posix.c 2017-01-03 15:49:38.000000000 +0530
+++ ../mono-threads-posix.c 2017-01-05 18:57:48.313245586 +0530
@@ -21,10 +21,6 @@
#include
-#if defined(PLATFORM_ANDROID) && !defined(TARGET_ARM64) && !defined(TARGET_AMD64)
-#define USE_TKILL_ON_ANDROID 1
-#endif
-
#ifdef USE_TKILL_ON_ANDROID
extern int tkill (pid_t tid, int signal);
#endif
================================================
FILE: disabled-packages/ocaml/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://ocaml.org
TERMUX_PKG_DESCRIPTION="Programming language supporting functional, imperative and object-oriented styles"
TERMUX_PKG_VERSION=4.02.3
TERMUX_PKG_SRCURL=http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.3.tar.xz
TERMUX_PKG_DEPENDS="pcre, openssl, libuuid"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_configure() {
./configure -prefix $TERMUX_PREFIX -mandir $TERMUX_PREFIX/share/man/man1 -cc "$CC $CFLAGS $CPPFLAGS $LDFLAGS" \
-host $TERMUX_HOST_PLATFORM
}
================================================
FILE: disabled-packages/openjdk-9-jre-headless/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://openjdk.java.net
TERMUX_PKG_DESCRIPTION="OpenJDK 9 Java Runtime Environment (prerelease)"
_jbuild=181
_hg_tag="jdk-9+${_jbuild}"
_jvm_dir="lib/jvm/openjdk-9"
TERMUX_PKG_VERSION="9.2017.8.20"
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
TERMUX_PKG_HOMEPAGE=http://openjdk.java.net/projects/jdk9
TERMUX_PKG_DEPENDS="freetype, libpng, ca-certificates-java"
TERMUX_PKG_CONFFILES="$_jvm_dir/lib/jvm.cfg"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-aot
--disable-hotspot-gtest
--disable-option-checking
--disable-warnings-as-errors
--enable-headless-only
--with-freetype=$TERMUX_PREFIX
--with-libpng=system
--with-zlib=system
--with-jdk-variant=normal
--with-jvm-variants=server
"
TERMUX_PKG_RM_AFTER_INSTALL="$_jvm_dir/demo $_jvm_dir/sample"
_cups_ver=2.2.4
changesets=('e5455438db96'
'5666eba44ac6'
'8076a7391ba0'
'17bb8a98d5e3'
'a1d64f45f9d5'
'364631d8ff2e'
'65bfdabaab9c'
'17cc754c8936')
sha256sums=('c759faa5bff4b3d7bcf87dce57e9d1a39600ef67ec68f96d6d12d07b1bf773ce'
'34518bf8b27aa893f834f8f81293ac0e04a210ee4f2e11bb2c89331f87912d96'
'3b649e34e2a1c8758c6311931d201a38432088ccb86a720afb1cb99fe193537f'
'bb330b8b516178304dc11c755994db20eccc696ae5c2a16b04a4a67b20b33b79'
'a213ebc4bf896c55855761891932a19f42ad5276d3fd155cfb604b27f4866d9d'
'0bc1953e9f23d59dafc415a7a37ff2da23cf8782e0532e253a6d7d63aa0ea954'
'739a5d275db4a2a81cf3c3ca17a78212b8c47092e5c10888b79e9599dd9dcc2d'
'fbc9b49a7f0fa1723e369d91068d51a11de40e931f281a3ed9650484b437cc7f'
'596d4db72651c335469ae5f37b0da72ac9f97d73e30838d787065f559dea98cc')
reponames=(dev corba hotspot jdk jaxws jaxp langtools nashorn cups)
_url_src=http://hg.openjdk.java.net/mobile/dev
TERMUX_PKG_SRCURL=$_url_src/archive/${changesets[0]}.tar.bz2
TERMUX_PKG_SHA256=${sha256sums[0]}
termux_step_post_extract_package() {
cd "$TERMUX_PKG_TMPDIR"
# download and extract repo archives
for index in {1..7}; do
local sum=${sha256sums[index]}
local repo=${reponames[index]}
local change=${changesets[index]}
local file=$TERMUX_PKG_CACHEDIR/$repo-$change.tar.bz2
local url=${_url_src}/$repo/archive/$change.tar.bz2
termux_download $url $file $sum
tar xf $file -C $TERMUX_PKG_SRCDIR
mv $TERMUX_PKG_SRCDIR/$repo-$change $TERMUX_PKG_SRCDIR/$repo
done
# setup cups source dir
file=$TERMUX_PKG_CACHEDIR/cups-$_cups_ver-source.tar.gz
url="https://github.com/apple/cups/releases/download/v$_cups_ver/$(basename $file)"
termux_download $url $file ${sha256sums[8]}
tar xf $file -C $TERMUX_PKG_SRCDIR
}
# override this step to since openjdk provides its own customized guess scripts
termux_step_replace_guess_scripts() {
return
}
termux_step_pre_configure() {
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-cups-include=$TERMUX_PKG_SRCDIR/cups-$_cups_ver"
ln -sf $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/libc.so $TERMUX_PKG_TMPDIR/libpthread.so
cat > "$TERMUX_STANDALONE_TOOLCHAIN/devkit.info" < $TERMUX_PREFIX/bin/$binary
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$JAVA_HOME/lib:\$JAVA_HOME/lib/jli" >> $TERMUX_PREFIX/bin/$binary
echo "exec \$JAVA_HOME/bin/$binary \"\$@\"" >> $TERMUX_PREFIX/bin/$binary
chmod u+x $TERMUX_PREFIX/bin/$binary
done
# use cacerts provided by ca-certificates-java
ln -sf "$TERMUX_PREFIX/$_jvm_dir/lib/security/jssecacerts" "$TERMUX_PREFIX/$_jvm_dir/lib/security/cacerts"
}
================================================
FILE: disabled-packages/openjdk-9-jre-headless/build_ldflags.patch
================================================
--- ./common/autoconf/generated-configure.sh 2017-05-14 10:01:38.475911076 +0530
+++ ../generated-configure.sh 2017-05-14 10:08:25.204273780 +0530
@@ -47809,8 +47809,8 @@
# Assume the C compiler is the assembler
BUILD_AS="$BUILD_CC -c"
# Just like for the target compiler, use the compiler as linker
- BUILD_LD="$BUILD_CC"
- BUILD_LDCXX="$BUILD_CXX"
+ BUILD_LD="$BUILD_CC -ldl -lpthread"
+ BUILD_LDCXX="$BUILD_CXX -ldl -lpthread"
PATH="$OLDPATH"
--- ./common/autoconf/generated-configure.sh 2017-05-14 10:50:10.292197720 +0530
+++ ../generated-configure.sh 2017-05-14 10:53:21.857704488 +0530
@@ -37441,8 +37441,8 @@
LDCXX="$LD"
else
# All other toolchains use the compiler to link.
- LD="$CC"
- LDCXX="$CXX"
+ LD="$CC -llog"
+ LDCXX="$CXX -llog"
fi
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)
================================================
FILE: disabled-packages/openjdk-9-jre-headless/elfFile.hpp.patch
================================================
--- ./hotspot/src/share/vm/utilities/elfFile.hpp 2017-05-12 23:47:58.000000000 +0530
+++ ../elfFile.hpp 2017-05-14 12:27:21.069572447 +0530
@@ -50,7 +50,7 @@
typedef Elf64_Phdr Elf_Phdr;
typedef Elf64_Sym Elf_Sym;
-#if !defined(_ALLBSD_SOURCE) || defined(__APPLE__)
+#if (!defined(_ALLBSD_SOURCE) || defined(__APPLE__)) && !defined(__ANDROID__)
#define ELF_ST_TYPE ELF64_ST_TYPE
#endif
================================================
FILE: disabled-packages/openjdk-9-jre-headless/generated-configure.sh.patch
================================================
--- ./common/autoconf/generated-configure.sh 2017-04-01 23:19:09.508381398 +0530
+++ ../generated-configure.sh 2017-04-02 17:35:37.210373866 +0530
@@ -53412,14 +53412,7 @@
# Check if X11 is needed
- if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xios || test "x$OPENJDK_TARGET_OS" = xandroid; then
- # No X11 support on windows or macosx
NEEDS_LIB_X11=false
- else
- # All other instances need X11, even if building headless only, libawt still
- # needs X11 headers.
- NEEDS_LIB_X11=true
- fi
# Check if cups is needed
if test "x$OPENJDK_TARGET_OS" = xwindows; then
@@ -53435,11 +53428,7 @@
fi
# Check if alsa is needed
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
- NEEDS_LIB_ALSA=true
- else
NEEDS_LIB_ALSA=false
- fi
# Check if ffi is needed
if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
================================================
FILE: disabled-packages/openjdk-9-jre-headless/getgr_r.patch
================================================
--- ./jdk/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c 2017-03-02 21:55:47.000000000 +0530
+++ ../UnixNativeDispatcher.c 2017-03-03 21:37:02.370375158 +0530
@@ -168,40 +168,6 @@
#endif
static fdopendir_func* my_fdopendir_func = NULL;
-#ifdef __ANDROID__
-/*
- * TODO: Android lacks support for the methods listed below. In it's place are
- * alternatives that use existing Android functionality, but lack reentrant
- * support. Determine if the following are the most suitable alternatives.
- *
- */
-int getgrgid_r(gid_t gid, struct group* grp, char* buf, size_t buflen, struct group** result)
-{
- *result = NULL;
- errno = 0;
- grp = getgrgid(gid);
- if (grp == NULL) {
- return errno;
- }
- // buf not used by caller (see below)
- *result = grp;
- return 0;
-}
-
-int getgrnam_r(const char *name, struct group* grp, char* buf, size_t buflen, struct group** result)
-{
- *result = NULL;
- errno = 0;
- grp = getgrnam(name);
- if (grp == NULL) {
- return errno;
- }
- // buf not used by caller (see below)
- *result = grp;
- return 0;
-}
-#endif
-
/**
* fstatat missing from glibc on Linux. Temporary workaround
* for x86/x64.
================================================
FILE: disabled-packages/openjdk-9-jre-headless/hotspot-jvm_home.patch
================================================
shoutout to @its-pointless (live_the_dream)
--- ./hotspot/src/share/vm/runtime/os.cpp 2017-03-30 20:45:45.000000000 +0530
+++ ../os.cpp 2017-03-31 11:04:17.097618021 +0530
@@ -74,7 +74,7 @@
int os::_processor_count = 0;
int os::_initial_active_processor_count = 0;
size_t os::_page_sizes[os::page_sizes_max];
-const char * os::_java_home = NULL;
+const char * os::_java_home = "@TERMUX_PREFIX@/lib/jvm/openjdk-9";
#ifndef PRODUCT
julong os::num_mallocs = 0; // # of calls to malloc/realloc
================================================
FILE: disabled-packages/openjdk-9-jre-headless/jdk-java_home.patch
================================================
--- ./jdk/src/java.base/unix/native/libjli/java_md_solinux.c 2017-03-30 20:45:48.000000000 +0530
+++ ../java_md_solinux.c 2017-03-31 09:15:07.979651293 +0530
@@ -163,7 +163,7 @@
*/
#ifdef __ANDROID__
-static char * __java_home = NULL;
+static char * __java_home = "@TERMUX_PREFIX@/lib/jvm/openjdk-9";
#endif
void SetJavaHome(char *arg) {
================================================
FILE: disabled-packages/openjdk-9-jre-headless/libpthread.patch
================================================
--- ./jdk/make/lib/Awt2dLibraries.gmk 2017-03-30 20:45:48.000000000 +0530
+++ ../Awt2dLibraries.gmk 2017-04-02 18:36:12.582240305 +0530
@@ -145,7 +145,7 @@
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/utility
endif
-ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )
+ifneq ($(filter $(OPENJDK_TARGET_OS), solaris macosx aix), )
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
endif
@@ -212,7 +212,7 @@
LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
endif
-ifeq ($(OPENJDK_TARGET_OS), android)
+ifeq ($(OPENJDK_TARGET_OS), linux)
LIBAWT_EXFILES += \
java2d/loops/TransformHelper.c \
java2d/loops/ScaledBlit.c \
@@ -347,10 +347,10 @@
endif
endif
- LIBAWT_XAWT_LIBS := $(LIBM) -lawt -lXext -lX11 -lXrender $(LIBDL) -lXtst -lXi -ljava -ljvm -lc
+ LIBAWT_XAWT_LIBS := $(LIBM) $(LIBDL) -ljava -ljvm -lc
ifeq ($(OPENJDK_TARGET_OS), linux)
- LIBAWT_XAWT_LIBS += -lpthread
+ LIBAWT_XAWT_LIBS += -lc
endif
ifeq ($(TOOLCHAIN_TYPE), gcc)
@@ -669,7 +669,7 @@
X11TextRenderer.c \
fontpath.c \
lcdglyph.c
-else ifeq ($(OPENJDK_TARGET_OS), android)
+else ifeq ($(OPENJDK_TARGET_OS), linux)
LIBFONTMANAGER_EXCLUDE_FILES += X11TextRenderer.c
else
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
@@ -939,7 +939,7 @@
LIBSPLASHSCREEN_LDFLAGS := -delayload:user32.dll
LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
else
- LIBSPLASHSCREEN_LIBS += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread -ldl
+ LIBSPLASHSCREEN_LIBS += $(LIBM) -lc -ldl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSPLASHSCREEN, \
--- ./jdk/make/lib/Lib-java.desktop.gmk 2017-03-30 20:45:48.000000000 +0530
+++ ../Lib-java.desktop.gmk 2017-04-02 19:01:58.000696690 +0530
@@ -31,7 +31,7 @@
include LibosxLibraries.gmk
include PlatformLibraries.gmk
-ifeq (,$(filter $(OPENJDK_TARGET_OS), android ios))
+ifeq (,$(filter $(OPENJDK_TARGET_OS), android ios linux))
include Awt2dLibraries.gmk
endif
include SoundLibraries.gmk
--- ./jdk/make/lib/SoundLibraries.gmk 2017-03-30 20:45:48.000000000 +0530
+++ ../SoundLibraries.gmk 2017-04-02 19:14:25.382032835 +0530
@@ -69,16 +69,11 @@
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES)
endif # OPENJDK_TARGET_OS windows
-ifeq ($(OPENJDK_TARGET_OS), linux)
- EXTRA_SOUND_JNI_LIBS += jsoundalsa
- LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
-endif # OPENJDK_TARGET_OS linux
-
ifeq ($(OPENJDK_TARGET_OS), aix)
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
endif # OPENJDK_TARGET_OS aix
-ifeq ($(OPENJDK_TARGET_OS), android)
+ifeq ($(OPENJDK_TARGET_OS), linux)
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
endif
================================================
FILE: disabled-packages/openjdk-9-jre-headless/openjdk-9-jdk-headless.subpackage.sh
================================================
TERMUX_SUBPKG_INCLUDE="$_jvm_dir/bin/idlj bin/idlj
$_jvm_dir/bin/jar bin/jar
$_jvm_dir/bin/jarsigner bin/jarsigner
$_jvm_dir/bin/javac bin/javac
$_jvm_dir/bin/javadoc bin/javadoc
$_jvm_dir/bin/javah bin/javah
$_jvm_dir/bin/javap bin/javap
$_jvm_dir/bin/jcmd bin/jcmd
$_jvm_dir/bin/jdb bin/jdb
$_jvm_dir/bin/jdeprscan bin/jdeprscan
$_jvm_dir/bin/jdeps bin/jdeps
$_jvm_dir/bin/jhsdb bin/jhsdb
$_jvm_dir/bin/jimage bin/jimage
$_jvm_dir/bin/jinfo bin/jinfo
$_jvm_dir/bin/jlink bin/jlink
$_jvm_dir/bin/jmap bin/jmap
$_jvm_dir/bin/jmod bin/jmod
$_jvm_dir/bin/jps bin/jps
$_jvm_dir/bin/jrunscript bin/jrunscript
$_jvm_dir/bin/jshell bin/jshell
$_jvm_dir/bin/jstack bin/jstack
$_jvm_dir/bin/jstat bin/jstat
$_jvm_dir/bin/jstatd bin/jstatd
$_jvm_dir/bin/policytool bin/policytool
$_jvm_dir/bin/rmic bin/rmic
$_jvm_dir/bin/schemagen bin/schemagen
$_jvm_dir/bin/serialver bin/serialver
$_jvm_dir/bin/wsgen bin/wsgen
$_jvm_dir/bin/wsimport bin/wsimport
$_jvm_dir/bin/xjc bin/xjc
$_jvm_dir/include"
TERMUX_SUBPKG_DEPENDS="openjdk-9-jre-headless"
TERMUX_SUBPKG_DESCRIPTION="OpenJDK Development Kit (JDK) (headless)"
================================================
FILE: disabled-packages/openjdk-9-jre-headless/openjdk-9-source.subpackage.sh
================================================
TERMUX_SUBPKG_INCLUDE="$_jvm_dir/src.zip"
TERMUX_SUBPKG_DEPENDS="openjdk-9-jre-headless"
TERMUX_SUBPKG_DESCRIPTION="OpenJDK Development Kit (JDK) source files"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
================================================
FILE: disabled-packages/openjdk-9-jre-headless/osName.patch
================================================
thanks @fornwall for finding this
--- ./jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java 2017-03-30 20:45:48.000000000 +0530
+++ ../ProcessImpl.java 2017-04-01 23:04:39.565293249 +0530
@@ -157,7 +157,7 @@
static Platform get() {
String osName = GetPropertyAction.privilegedGetProperty("os.name");
- if (osName.equals("Linux")) { return LINUX; }
+ if (osName.equals("Linux") || osName.equals("Android")) { return LINUX; }
if (osName.contains("OS X")) { return BSD; }
if (osName.equals("SunOS")) { return SOLARIS; }
if (osName.equals("AIX")) { return AIX; }
================================================
FILE: disabled-packages/openjdk-9-jre-headless/os_linux_aarch64.cpp.patch
================================================
--- ./hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp 2017-05-12 23:47:58.000000000 +0530
+++ ../os_linux_aarch64.cpp 2017-05-14 21:36:49.672414253 +0530
@@ -77,7 +77,9 @@
# include
# include
# include
+# ifndef __ANDROID__
# include
+# endif
#ifdef BUILTIN_SIM
#define REG_SP REG_RSP
================================================
FILE: disabled-packages/openjdk-9-jre-headless/sendfile64.patch
================================================
--- ./jdk/src/java.base/unix/native/libnio/ch/FileChannelImpl.c 2017-05-12 23:48:01.000000000 +0530
+++ ../FileChannelImpl.c 2017-05-14 22:51:02.292589382 +0530
@@ -41,8 +41,6 @@
#include
#ifdef __ANDROID__
#define mmap64 mmap
-#include
-#define sendfile64(a,b,c,d) syscall(__NR_sendfile64, a, b, c, d);
#endif
#elif defined(_AIX)
#include
================================================
FILE: disabled-packages/openvpn/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://openvpn.net
TERMUX_PKG_DESCRIPTION="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
TERMUX_PKG_VERSION=2.4.2
TERMUX_PKG_DEPENDS="openssl, liblzo, net-tools"
TERMUX_PKG_SRCURL=https://swupdate.openvpn.net/community/releases/openvpn-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=df5c4f384b7df6b08a2f6fa8a84b9fd382baf59c2cef1836f82e2a7f62f1bff9
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-plugin-auth-pam
--disable-systemd
--disable-debug
--enable-iproute2
--enable-small
--enable-x509-alt-username
ac_cv_func_getpwnam=yes
ac_cv_func_getpass=yes
IFCONFIG=$TERMUX_PREFIX/bin/ifconfig
ROUTE=$TERMUX_PREFIX/bin/route
IPROUTE=$TERMUX_PREFIX/bin/ip
NETSTAT=$TERMUX_PREFIX/bin/netstat"
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
termux_step_pre_configure() {
# need to provide getpass, else you "can't get console input"
cp "$TERMUX_PKG_BUILDER_DIR/netbsd_getpass.c" "$TERMUX_PKG_SRCDIR/src/openvpn/"
# CFLAGS="$CFLAGS -DTARGET_ANDROID"
LDFLAGS="$LDFLAGS -llog "
}
termux_step_post_make_install() {
# helper script
install -m700 "$TERMUX_PKG_BUILDER_DIR/termux-openvpn" "$TERMUX_PREFIX/bin/"
# Install examples
install -d -m755 "$TERMUX_PREFIX/share/openvpn/examples"
cp "$TERMUX_PKG_SRCDIR"/sample/sample-config-files/* "$TERMUX_PREFIX/share/openvpn/examples"
}
================================================
FILE: disabled-packages/openvpn/configure.ac.patch.old
================================================
--- ./configure.ac 2016-12-26 11:51:00.000000000 +0000
+++ ../configure.ac 2016-12-28 04:59:50.936948102 +0000
@@ -311,6 +311,10 @@
AC_DEFINE_UNQUOTED([TARGET_ALIAS], ["${host}"], [A string representing our host])
case "$host" in
+ *-*-android*)
+ AC_DEFINE([TARGET_ANDROID], [1], [Are we running on Android?])
+ AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["G"], [Target prefix])
+ ;;
*-*-linux*)
AC_DEFINE([TARGET_LINUX], [1], [Are we running on Linux?])
AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix])
================================================
FILE: disabled-packages/openvpn/netbsd_getpass.c
================================================
/* $NetBSD: getpass.c,v 1.15 2003/08/07 16:42:50 agc Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if 0
#include
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)getpass.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: getpass.c,v 1.15 2003/08/07 16:42:50 agc Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
#endif
#include
#include
#include
#include
#include
#include
#include
#if 0
#ifdef __weak_alias
__weak_alias(getpass,_getpass)
#endif
#endif
char *
getpass(prompt)
const char *prompt;
{
struct termios term;
int ch;
char *p;
FILE *fp, *outfp;
int echo;
static char buf[_PASSWORD_LEN + 1];
sigset_t oset, nset;
#if 0
_DIAGASSERT(prompt != NULL);
#endif
/*
* read and write to /dev/tty if possible; else read from
* stdin and write to stderr.
*/
if ((outfp = fp = fopen(_PATH_TTY, "w+")) == NULL) {
outfp = stderr;
fp = stdin;
}
/*
* note - blocking signals isn't necessarily the
* right thing, but we leave it for now.
*/
sigemptyset(&nset);
sigaddset(&nset, SIGINT);
sigaddset(&nset, SIGTSTP);
(void)sigprocmask(SIG_BLOCK, &nset, &oset);
(void)tcgetattr(fileno(fp), &term);
if ((echo = (term.c_lflag & ECHO)) != 0) {
term.c_lflag &= ~ECHO;
(void)tcsetattr(fileno(fp), TCSAFLUSH /*|TCSASOFT*/, &term);
}
if (prompt != NULL)
(void)fputs(prompt, outfp);
rewind(outfp); /* implied flush */
for (p = buf; (ch = getc(fp)) != EOF && ch != '\n';)
if (p < buf + _PASSWORD_LEN)
*p++ = ch;
*p = '\0';
(void)write(fileno(outfp), "\n", 1);
if (echo) {
term.c_lflag |= ECHO;
(void)tcsetattr(fileno(fp), TCSAFLUSH/*|TCSASOFT*/, &term);
}
(void)sigprocmask(SIG_SETMASK, &oset, NULL);
if (fp != stdin)
(void)fclose(fp);
return(buf);
}
================================================
FILE: disabled-packages/openvpn/src-openvpn-console_builtin.c.patch
================================================
--- ./src/openvpn/console_builtin.c 2016-12-26 11:51:00.000000000 +0000
+++ ../console_builtin.c 2016-12-28 04:05:41.310830107 +0000
@@ -140,6 +140,7 @@
#ifdef HAVE_GETPASS
+#include "netbsd_getpass.c"
/**
* Open the current console TTY for read/write operations
================================================
FILE: disabled-packages/openvpn/src-openvpn-tun.c.patch
================================================
--- ./src/openvpn/tun.c 2016-12-26 11:51:00.000000000 +0000
+++ ../tun.c 2016-12-28 04:11:52.786734486 +0000
@@ -1939,7 +1939,7 @@
const char *node = dev_node;
if (!node)
{
- node = "/dev/net/tun";
+ node = "/dev/tun";
}
/*
================================================
FILE: disabled-packages/openvpn/termux-openvpn
================================================
#!/data/data/com.termux/files/usr/bin/sh
su -c "export LD_LIBRARY_PATH=$PREFIX/lib; export TMPDIR=$PREFIX/tmp; $PREFIX/bin/openvpn $@"
================================================
FILE: disabled-packages/pacman/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://www.archlinux.org/pacman/
TERMUX_PKG_DESCRIPTION="A library-based package manager with dependency support"
TERMUX_PKG_MAINTAINER="Francisco Demartino @franciscod"
# HEAVILY adapted from archlinux PKGBUILD
pkgname=pacman
pkgver=4.2.1
TERMUX_PKG_VERSION=$pkgver
#FIXME: asciidoc, fakechroot/fakeroot
TERMUX_PKG_DEPENDS="bash, glib, libarchive, curl, gpgme, python2, libandroid-glob, libandroid-support"
TERMUX_PKG_SRCURL="https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--prefix=$TERMUX_PREFIX --sysconfdir=$TERMUX_PREFIX/etc"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --localstatedir=$TERMUX_PREFIX/var --enable-doc "
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-scriptlet-shell=/usr/bin/bash"
termux_step_pre_configure() {
LDFLAGS+="$LDFLAGS -llog -landroid-glob"
}
termux_step_make() {
make
make -C contrib
# make -C "$pkgname-$pkgver" check
}
termux_step_make_install() {
make install
make -C contrib install
# install Arch specific stuff
install -dm755 "$TERMUX_PREFIX/etc"
install -m644 "$TERMUX_PKG_BUILDER_DIR/pacman.conf" "$TERMUX_PREFIX/etc/pacman.conf"
case $TERMUX_ARCH in
i686)
mycarch="i686"
mychost="i686-pc-linux-gnu"
myflags="-march=i686"
;;
arm)
mycarch="arm"
mychost="arm-unknown-linux-gnu"
myflags="-march=arm"
;;
esac
# set things correctly in the default conf file
install -m644 "$TERMUX_PKG_BUILDER_DIR/makepkg.conf" "$TERMUX_PREFIX/etc"
sed -i "$TERMUX_PREFIX/etc/makepkg.conf" \
-e "s|@CARCH[@]|$mycarch|g" \
-e "s|@CHOST[@]|$mychost|g" \
-e "s|@CARCHFLAGS[@]|$myflags|g"
# FIXME bash_completion
# # put bash_completion in the right location
# install -dm755 "$TERMUX_PREFIX/share/bash-completion/completions"
# mv "$TERMUX_PREFIX/etc/bash_completion.d/pacman" "$TERMUX_PREFIX/share/bash-completion/completions"
# rmdir "$TERMUX_PREFIX/etc/bash_completion.d"
# for f in makepkg pacman-key; do
# ln -s pacman "$TERMUX_PREFIX/share/bash-completion/completions/$f"
# done
install -Dm644 contrib/PKGBUILD.vim "$TERMUX_PREFIX/share/vim/vimfiles/syntax/PKGBUILD.vim"
}
================================================
FILE: disabled-packages/pacman/ensure-matching-database-and-package-version.patch
================================================
From deac9731884a83ad91eab9f27b288f406f56c87b Mon Sep 17 00:00:00 2001
From: Levente Polyak
Date: Sat, 18 Jul 2015 17:58:23 +0200
Subject: [PATCH] ensure matching database and package version
While loading each package ensure that the internal version matches the
expected database version to avoid the possibility to circumvent the
version check.
This issue can be used by an attacker to trick the software into
installing an older version. The behavior can be exploited by a
man-in-the-middle attack through specially crafted database tarball
containing a higher version, yet actually delivering an older and
vulnerable version, which was previously shipped.
Signed-off-by: Levente Polyak
Signed-off-by: Remi Gacogne
Signed-off-by: Allan McRae
---
lib/libalpm/sync.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 888ae15..e843b07 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -1212,6 +1212,7 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
EVENT(handle, &event);
for(i = handle->trans->add; i; i = i->next, current++) {
+ int error = 0;
alpm_pkg_t *spkg = i->data;
char *filepath;
int percent = (int)(((double)current_bytes / total_bytes) * 100);
@@ -1232,6 +1233,23 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
spkg->name);
alpm_pkg_t *pkgfile =_alpm_pkg_load_internal(handle, filepath, 1);
if(!pkgfile) {
+ _alpm_log(handle, ALPM_LOG_DEBUG, "failed to load pkgfile internal\n");
+ error = 1;
+ } else {
+ if(strcmp(spkg->name, pkgfile->name) != 0) {
+ _alpm_log(handle, ALPM_LOG_DEBUG,
+ "internal package name mismatch, expected: '%s', actual: '%s'\n",
+ spkg->name, pkgfile->name);
+ error = 1;
+ }
+ if(strcmp(spkg->version, pkgfile->version) != 0) {
+ _alpm_log(handle, ALPM_LOG_DEBUG,
+ "internal package version mismatch, expected: '%s', actual: '%s'\n",
+ spkg->version, pkgfile->version);
+ error = 1;
+ }
+ }
+ if(error != 0) {
errors++;
*data = alpm_list_add(*data, strdup(spkg->filename));
free(filepath);
--
2.4.6
================================================
FILE: disabled-packages/pacman/makepkg.conf
================================================
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'git::git'
'hg::mercurial'
'svn::subversion')
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="@CARCH@"
CHOST="@CHOST@"
#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong"
CXXFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!distcc color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- upx: Compress binary executable files using UPX
#-- debug: Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe "
#-- Specify a key to use for package signing
#GPGKEY=""
#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
# doing.
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'
# vim: set ft=sh ts=2 sw=2 et:
================================================
FILE: disabled-packages/pacman/pacman.conf
================================================
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
================================================
FILE: disabled-packages/pacman/pacman.patch
================================================
--- ./src/pacman/pacman.c 2015-12-23 19:50:37.093132801 -0300
+++ ./src/pacman/pacman.c 2015-12-23 23:30:17.986469980 -0300
@@ -1128,7 +1128,8 @@
} while(c != EOF);
free(line);
- if(!freopen(ctermid(NULL), "r", stdin)) {
+ //if(!freopen(ctermid(NULL), "r", stdin)) {
+ if(!freopen("/dev/tty", "r", stdin)) { // HACK termux doesn't have ctermid()
pm_printf(ALPM_LOG_ERROR, _("failed to reopen stdin for reading: (%s)\n"),
strerror(errno));
}
================================================
FILE: disabled-packages/pkgconf/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://pkgconf.org
TERMUX_PKG_DESCRIPTION="Program which helps to configure compiler and linker flags for development frameworks"
TERMUX_PKG_VERSION=1.5.3
TERMUX_PKG_SHA256=45b76f5037379b1e24b788379c74f31fc4f060b272a08bdda9e558c120e9f3b6
TERMUX_PKG_SRCURL=https://github.com/pkgconf/pkgconf/archive/pkgconf-$TERMUX_PKG_VERSION.tar.gz
termux_step_pre_configure() {
./autogen.sh
}
================================================
FILE: disabled-packages/premake/build-gmake.unix-Premake4.make.patch
================================================
diff -u -r ../premake-4.4-beta5/build/gmake.unix/Premake4.make ./build/gmake.unix/Premake4.make
--- ../premake-4.4-beta5/build/gmake.unix/Premake4.make 2013-11-26 10:41:34.000000000 -0500
+++ ./build/gmake.unix/Premake4.make 2015-11-03 09:39:25.024912553 -0500
@@ -7,10 +7,6 @@
SILENT = @
endif
-CC = gcc
-CXX = g++
-AR = ar
-
ifndef RESCOMP
ifdef WINDRES
RESCOMP = $(WINDRES)
================================================
FILE: disabled-packages/premake/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://premake.github.io/
TERMUX_PKG_DESCRIPTION="Build script generator"
TERMUX_PKG_VERSION=4.4-beta5
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/premake/Premake/4.4/premake-${TERMUX_PKG_VERSION}-src.zip
# TERMUX_PKG_DEPENDS="pcre, openssl, libuuid"
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ssl=openssl"
termux_step_pre_configure() {
TERMUX_PKG_BUILDDIR=$TERMUX_PKG_SRCDIR/build/gmake.unix
}
================================================
FILE: disabled-packages/sbcl/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.sbcl.org/
TERMUX_PKG_DESCRIPTION="Steel Bank Common Lisp"
TERMUX_PKG_VERSION=1.3.9
TERMUX_PKG_SRCURL=http://prdownloads.sourceforge.net/sbcl/sbcl-${TERMUX_PKG_VERSION}-source.tar.bz2
termux_step_pre_configure() {
local SBCL_HOST_TARFILE=$TERMUX_PKG_CACHEDIR/sbcl-host-${TERMUX_PKG_VERSION}.tar.bz2
if [ ! -f $SBCL_HOST_TARFILE ]; then
curl -o $SBCL_HOST_TARFILE -L http://downloads.sourceforge.net/project/sbcl/sbcl/${TERMUX_PKG_VERSION}/sbcl-${TERMUX_PKG_VERSION}-x86-64-linux-binary.tar.bz2
cd $TERMUX_PKG_TMPDIR
tar xf $SBCL_HOST_TARFILE
cd sbcl-${TERMUX_PKG_VERSION}-x86-64-linux
INSTALL_ROOT=$TERMUX_PKG_CACHEDIR/sbcl-host sh install.sh
fi
export PATH=$PATH:$TERMUX_PKG_CACHEDIR/sbcl-host/bin
export SBCL_HOME=$TERMUX_PKG_CACHEDIR/sbcl-host/lib/sbcl
}
termux_step_make_install() {
cd $TERMUX_PKG_SRCDIR
sh make.sh --prefix=$TERMUX_PREFIX
}
================================================
FILE: disabled-packages/sbcl/make-config.sh.patch
================================================
diff -u -r ../sbcl-1.3.4/make-config.sh ./make-config.sh
--- ../sbcl-1.3.4/make-config.sh 2016-03-31 03:28:36.000000000 -0400
+++ ./make-config.sh 2016-04-10 16:43:40.651905145 -0400
@@ -754,8 +754,9 @@
# cross-compilers!
#
# FIXME: integrate to grovel-features, mayhaps
-$GNUMAKE -C tools-for-build determine-endianness -I ../src/runtime
-tools-for-build/determine-endianness >> $ltf
+# $GNUMAKE -C tools-for-build determine-endianness -I ../src/runtime
+# tools-for-build/determine-endianness >> $ltf
+echo " :little-endian" >> $ltf # Termux patch.
export sbcl_os sbcl_arch
sh tools-for-build/grovel-features.sh >> $ltf
================================================
FILE: disabled-packages/sslscan/Makefile.patch
================================================
diff --git a/Makefile b/Makefile
index 24e6a36..74c2647 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,5 @@
# set gcc as default if CC is not set
-ifndef $(CC)
- CC=gcc
-endif
+CC?=gcc
GIT_VERSION = $(shell git describe --tags --always --dirty=-wip)
@@ -14,7 +12,7 @@ endif
OS := $(shell uname)
SRCS = sslscan.c
-PREFIX = /usr
+PREFIX ?= /usr
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
MAN1DIR = $(MANDIR)/man1
================================================
FILE: disabled-packages/sslscan/build.sh
================================================
# Status: Does not work with openssl 1.1 or later.
TERMUX_PKG_HOMEPAGE=https://github.com/rbsec/sslscan
TERMUX_PKG_DESCRIPTION="Fast SSL scanner"
TERMUX_PKG_VERSION=1.11.11
TERMUX_PKG_SRCURL=https://github.com/rbsec/sslscan/archive/${TERMUX_PKG_VERSION}-rbsec.tar.gz
TERMUX_PKG_SHA256=93fbe1570073dfb2898a546759836ea4df5054e3a8f6d2e3da468eddac8b1764
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="openssl"
TERMUX_PKG_MAINTAINER="Pierre Rudloff @Rudloff"
termux_step_pre_configure() {
CPPFLAGS+=" -D__USE_GNU=1"
}
================================================
FILE: disabled-packages/sslscan/sslscan.c.patch
================================================
diff -u -r ../sslscan-1.11.7-rbsec/sslscan.c ./sslscan.c
--- ../sslscan-1.11.7-rbsec/sslscan.c 2016-06-13 08:42:11.000000000 -0400
+++ ./sslscan.c 2016-09-05 16:51:08.751161131 -0400
@@ -65,6 +65,7 @@
#endif
#else
#include
+ #include
#include
#include
#endif
@@ -794,11 +795,11 @@
}
}
else
-#endif
{
printf("%sOpenSSL version does not support compression%s\n", COL_RED, RESET);
printf("%sRebuild with zlib1g-dev package for zlib support%s\n\n", COL_RED, RESET);
}
+#endif
// Disconnect SSL over socket
SSL_shutdown(ssl);
@@ -3762,10 +3763,6 @@
case mode_multiple:
printf("Version: %s%s%s\n%s\n%s\n", COL_GREEN, VERSION, RESET,
SSLeay_version(SSLEAY_VERSION), RESET);
-#ifdef OPENSSL_NO_SSL2
- printf("%sOpenSSL version does not support SSLv2%s\n", COL_RED, RESET);
- printf("%sSSLv2 ciphers will not be detected%s\n\n", COL_RED, RESET);
-#endif
#ifdef OPENSSL_NO_SSL3
printf("%sOpenSSL version does not support SSLv3%s\n", COL_RED, RESET);
printf("%sSSLv3 ciphers will not be detected%s\n", COL_RED, RESET);
================================================
FILE: disabled-packages/tf/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://tinyfugue.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Flexible, screen-oriented MUD client"
TERMUX_PKG_VERSION=5.0~beta8
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/tinyfugue/tinyfugue/5.0%20beta%208/tf-50b8.tar.gz
TERMUX_PKG_BUILD_IN_SRC=true
# TERMUX_PKG_DEPENDS="pcre, openssl, libuuid"
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ssl=openssl --disable-iri"
================================================
FILE: disabled-packages/toybox/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://landley.net/toybox/
TERMUX_PKG_DESCRIPTION="Common Linux command line utilities"
TERMUX_PKG_VERSION=0.7.3
TERMUX_PKG_SRCURL=http://landley.net/toybox/downloads/toybox-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=e6469b508224e0d2e4564dda05c4bb47aef5c28bf29d6c983bcdc6e3a0cd29d6
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_configure() {
make defconfig
}
================================================
FILE: disabled-packages/unnethack/build.sh
================================================
# Crashes with "Dungeon description not valid"
TERMUX_PKG_HOMEPAGE=http://sourceforge.net/apps/trac/unnethack
TERMUX_PKG_DESCRIPTION="Dungeon crawling game, fork of NetHack"
TERMUX_PKG_VERSION=5.1.0
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/unnethack/unnethack/${TERMUX_PKG_VERSION}/unnethack-${TERMUX_PKG_VERSION}-20131208.tar.gz
# --with-owner=$USER to avoid unnethack trying to use a "games" user, --with-groups to avoid "bin" group
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-owner=$USER --with-group=$(groups | cut -d ' ' -f 1)"
TERMUX_PKG_DEPENDS="gsl, ncurses"
# unnethack builds util/{makedefs,lev_comp,dgn_comp} binaries which are later used during the build.
# we first build these host tools in $TERMUX_PKG_TMPDIR/host-build and copy them into the ordinary
# cross compile tree after configure, bumping their modification time so that they do not get rebuilt.
CFLAGS="$CFLAGS $CPPFLAGS $LDFLAGS"
export LFLAGS="$LDFLAGS"
LD="$CC"
termux_step_pre_configure() {
# Create a host build for the makedefs binary
mkdir $TERMUX_PKG_TMPDIR/host-build
cd $TERMUX_PKG_TMPDIR/host-build
ORIG_CC=$CC; export CC=gcc
ORIG_CFLAGS=$CFLAGS; export CFLAGS=""
ORIG_CPPFLAGS=$CPPFLAGS; export CPPFLAGS=""
ORIG_CXXFLAGS=$CXXFLAGS; export CXXFLAGS=""
ORIG_LDFLAGS=$LDFLAGS; export LDFLAGS=""
ORIG_LFLAGS=$LFLAGS; export LFLAGS=""
$TERMUX_PKG_SRCDIR/configure --with-owner=$USER
make
make spec_levs
make dungeon
set +e
make dlb
set -e
export CC=$ORIG_CC
export CFLAGS=$ORIG_CFLAGS
export CPPFLAGS=$ORIG_CPPFLAGS
export CXXFLAGS=$ORIG_CXXFLAGS
export LDFLAGS=$ORIG_LDFLAGS
export LFLAGS=$ORIG_LFLAGS
}
termux_step_post_configure() {
# Use the host built makedefs
cp $TERMUX_PKG_TMPDIR/host-build/util/makedefs $TERMUX_PKG_BUILDDIR/util/makedefs
cp $TERMUX_PKG_TMPDIR/host-build/util/lev_comp $TERMUX_PKG_BUILDDIR/util/lev_comp
cp $TERMUX_PKG_TMPDIR/host-build/util/dgn_comp $TERMUX_PKG_BUILDDIR/util/dgn_comp
cp $TERMUX_PKG_TMPDIR/host-build/util/dlb $TERMUX_PKG_BUILDDIR/util/dlb
# Update timestamp so the binary does not get rebuilt
touch -d "next hour" $TERMUX_PKG_BUILDDIR/util/makedefs $TERMUX_PKG_BUILDDIR/util/lev_comp $TERMUX_PKG_BUILDDIR/util/dgn_comp $TERMUX_PKG_BUILDDIR/util/dlb
}
termux_step_post_make_install() {
# Add directory which must exist:
mkdir -p $TERMUX_PREFIX/var/unnethack/level
echo "This directory stores locks" > $TERMUX_PREFIX/var/unnethack/level/README
}
================================================
FILE: disabled-packages/unnethack/dat_town_wildcard.patch
================================================
diff -u -r ../unnethack-5.1.0-20131208/sys/autoconf/Makefile.dat ./sys/autoconf/Makefile.dat
--- ../unnethack-5.1.0-20131208/sys/autoconf/Makefile.dat 2013-12-08 16:00:26.000000000 +0100
+++ ./sys/autoconf/Makefile.dat 2014-02-14 16:29:56.000000000 +0100
@@ -293,7 +293,7 @@
advcal.des moria.des \
bigroom.des blkmar.des castle.des \
dragons.des \
- endgame.des gehennom.des heck.des knox.des town-?.des \
+ endgame.des gehennom.des heck.des knox.des town-1.des town-2.des \
medusa.des \
mines.des nymph.des oracle.des \
sheol.des \
@@ -312,7 +312,8 @@
../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/knox.des
../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/medusa.des
../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/nymph.des
- ../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/town-?.des
+ ../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/town-1.des
+ ../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/town-2.des
../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/moria.des
../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/mines.des
../util/lev_comp $(LEVCOMP_FLAGS) $(srcdir)/oracle.des
================================================
FILE: disabled-packages/unnethack/dont_delete_makedefs.patch
================================================
The build machine makedefs binary is built before cross compiling, and must not be removed afterwards.
diff -u -r ../unnethack-5.1.0-20131208/sys/autoconf/Makefile.src ./sys/autoconf/Makefile.src
--- ../unnethack-5.1.0-20131208/sys/autoconf/Makefile.src 2013-12-08 16:00:26.000000000 +0100
+++ ./sys/autoconf/Makefile.src 2014-02-14 16:22:56.000000000 +0100
@@ -358,11 +358,9 @@
# below in the 'make depend' output.
monst.o:
$(CC) $(CFLAGS) -c $(srcdir)/monst.c
- @rm -f $(MAKEDEFS)
objects.o:
$(CC) $(CFLAGS) -c $(srcdir)/objects.c
- @rm -f $(MAKEDEFS)
# Qt windowport meta-object-compiler output
qt_kde0.moc: ../include/qt_kde0.h
================================================
FILE: generate-bootstraps.sh
================================================
#!/bin/bash
##
## Script for generating bootstrap archives.
##
set -e
BOOTSTRAP_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/bootstrap-tmp.XXXXXXXX")
trap 'rm -rf $BOOTSTRAP_TMPDIR' EXIT
# By default, bootstrap archives will be built for all architectures
# supported by Termux application.
# Override with option '--architectures'.
TERMUX_ARCHITECTURES=("aarch64" "arm" "i686" "x86_64")
# Can be changed by using '--repository' option.
REPO_BASE_URL="https://dl.bintray.com/termux/termux-packages-24"
# Can be changed by using '--prefix' option.
TERMUX_PREFIX="/data/data/com.termux/files/usr"
# A list of non-essential packages. By default it is empty, but can
# be filled with option '--add'.
declare -a ADDITIONAL_PACKAGES
# Check for some important utilities that may not be available for
# some reason.
for cmd in ar awk curl grep gzip find sed tar xargs xz zip; do
if [ -z "$(command -v $cmd)" ]; then
echo "[!] Utility '$cmd' is not available in PATH."
exit 1
fi
done
# Download package lists from remote repository.
# Actually, there 2 lists are downloaded: one architecture-independent and one
# for architecture specified as '$1' argument.
read_package_list() {
local architecture
for architecture in all "$1"; do
if [ ! -e "${BOOTSTRAP_TMPDIR}/packages.${architecture}" ]; then
echo "[*] Downloading package list for architecture '${architecture}'..."
curl \
--fail \
--location \
--output "${BOOTSTRAP_TMPDIR}/packages.${architecture}" \
"${REPO_BASE_URL}/dists/stable/main/binary-${architecture}/Packages"
echo >> "${BOOTSTRAP_TMPDIR}/packages.${architecture}"
fi
echo "[*] Reading package list for '${architecture}'..."
while read -r -d $'\xFF' package; do
if [ -n "$package" ]; then
local package_name
package_name=$(echo "$package" | grep -i "^Package:" | awk '{ print $2 }')
if [ -z "${PACKAGE_METADATA["$package_name"]}" ]; then
PACKAGE_METADATA["$package_name"]="$package"
else
local prev_package_ver cur_package_ver
cur_package_ver=$(echo "$package" | grep -i "^Version:" | awk '{ print $2 }')
prev_package_ver=$(echo "${PACKAGE_METADATA["$package_name"]}" | grep -i "^Version:" | awk '{ print $2 }')
# If package has multiple versions, make sure that our metadata
# contains the latest one.
if [ "$(echo -e "${prev_package_ver}\n${cur_package_ver}" | sort -rV | head -n1)" = "${cur_package_ver}" ]; then
PACKAGE_METADATA["$package_name"]="$package"
fi
fi
fi
done < <(sed -e "s/^$/\xFF/g" "${BOOTSTRAP_TMPDIR}/packages.${architecture}")
done
}
# Download specified package, its depenencies and then extract *.deb files to
# the bootstrap root.
pull_package() {
local package_name=$1
local package_tmpdir="${BOOTSTRAP_PKGDIR}/${package_name}"
mkdir -p "$package_tmpdir"
local package_url
package_url="$REPO_BASE_URL/$(echo "${PACKAGE_METADATA[${package_name}]}" | grep -i "^Filename:" | awk '{ print $2 }')"
if [ "${package_url}" = "$REPO_BASE_URL" ] || [ "${package_url}" = "${REPO_BASE_URL}/" ]; then
echo "[!] Failed to determine URL for package '$package_name'."
exit 1
fi
local package_dependencies
package_dependencies=$(
while read -r token; do
echo "$token" | cut -d'|' -f1 | sed -E 's@\(.*\)@@'
done < <(echo "${PACKAGE_METADATA[${package_name}]}" | grep -i "^Depends:" | sed -E 's@^[Dd]epends:@@' | tr ',' '\n')
)
# Recursively handle dependencies.
if [ -n "$package_dependencies" ]; then
local dep
for dep in $package_dependencies; do
if [ ! -e "${BOOTSTRAP_PKGDIR}/${dep}" ]; then
pull_package "$dep"
fi
done
unset dep
fi
if [ ! -e "$package_tmpdir/package.deb" ]; then
echo "[*] Downloading '$package_name'..."
curl --fail --location --output "$package_tmpdir/package.deb" "$package_url"
echo "[*] Extracting '$package_name'..."
(cd "$package_tmpdir"
ar x package.deb
# data.tar may have extension different from .xz
if [ -f "./data.tar.xz" ]; then
data_archive="data.tar.xz"
elif [ -f "./data.tar.gz" ]; then
data_archive="data.tar.gz"
else
echo "No data.tar.* found in '$package_name'."
exit 1
fi
# Do same for control.tar.
if [ -f "./control.tar.xz" ]; then
control_archive="control.tar.xz"
elif [ -f "./control.tar.gz" ]; then
control_archive="control.tar.gz"
else
echo "No control.tar.* found in '$package_name'."
exit 1
fi
# Extract files.
tar xf "$data_archive" -C "$BOOTSTRAP_ROOTFS"
tar tf "$data_archive" > "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/info/${package_name}.list"
# Generate checksums (md5).
tar xf "$data_archive"
find data -type f -print0 | xargs -0 -r md5sum | sed 's@^\.$@@g' > "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/info/${package_name}.md5sums"
# Extract metadata.
tar xf "$control_archive"
{
cat control
echo "Status: install ok installed"
echo
} >> "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/status"
# Additional data: conffiles & scripts
for file in conffiles postinst postrm preinst prerm; do
if [ -f "${PWD}/${file}" ]; then
cp "$file" "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/info/${package_name}.${file}"
fi
done
)
fi
}
# Final stage: generate bootstrap archive and place it to current
# working directory.
# Information about symlinks is stored in file SYMLINKS.txt.
create_bootstrap_archive() {
echo "[*] Creating 'bootstrap-${1}.zip'..."
(cd "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}"
# Do not store symlinks in bootstrap archive.
# Instead, put all information to SYMLINKS.txt
while read -r -d '' link; do
echo "$(readlink "$link")←${link}" >> SYMLINKS.txt
rm -f "$link"
done < <(find . -type l -print0)
zip -r9 "${BOOTSTRAP_TMPDIR}/bootstrap-${1}.zip" ./*
)
mv -f "${BOOTSTRAP_TMPDIR}/bootstrap-${1}.zip" ./
echo "[*] Finished successfully (${1})."
}
show_usage() {
echo
echo "Usage: generate-bootstraps.sh [options]"
echo
echo "Generate bootstrap archives for Termux application."
echo
echo "Options:"
echo
echo " -h, --help Show this help."
echo
echo " -a, --add PKG_LIST Specify one or more additional packages"
echo " to include into bootstrap archive."
echo " Multiple packages should be passed as"
echo " comma-separated list."
echo
echo " --architectures ARCH_LIST Override default list of architectures"
echo " for which bootstrap archives will be"
echo " created."
echo " Multiple architectures should be passed"
echo " as comma-separated list."
echo
echo " -p, --prefix PATH Specify rootfs prefix absolute path."
echo " Should be exactly same as in packages"
echo " in the remote repository."
echo
echo " -r, --repository URL Specify URL for APT repository from"
echo " which packages will be downloaded."
echo
echo "Architectures: ${TERMUX_ARCHITECTURES[*]}"
echo "Repository URL: ${REPO_BASE_URL}"
echo "Prefix: ${TERMUX_PREFIX}"
echo
}
while (($# > 0)); do
case "$1" in
-h|--help)
show_usage
exit 0
;;
-a|--add)
if [ $# -gt 1 ] && [ -n "$2" ] && [[ $2 != -* ]]; then
for pkg in $(echo "$2" | tr ',' ' '); do
ADDITIONAL_PACKAGES+=("$pkg")
done
unset pkg
shift 1
else
echo "[!] Option '--add' requires an argument."
show_usage
exit 1
fi
;;
--architectures)
if [ $# -gt 1 ] && [ -n "$2" ] && [[ $2 != -* ]]; then
TERMUX_ARCHITECTURES=()
for arch in $(echo "$2" | tr ',' ' '); do
TERMUX_ARCHITECTURES+=("$arch")
done
unset arch
shift 1
else
echo "[!] Option '--architectures' requires an argument."
show_usage
exit 1
fi
;;
-p|--prefix)
if [ $# -gt 1 ] && [ -n "$2" ] && [[ $2 != -* ]]; then
TERMUX_PREFIX="$2"
shift 1
else
echo "[!] Option '--prefix' requires an argument."
show_usage
exit 1
fi
;;
-r|--repository)
if [ $# -gt 1 ] && [ -n "$2" ] && [[ $2 != -* ]]; then
REPO_BASE_URL="$2"
shift 1
else
echo "[!] Option '--repository' requires an argument."
show_usage
exit 1
fi
;;
*)
echo "[!] Got unknown option '$1'"
show_usage
exit 1
;;
esac
shift 1
done
for package_arch in "${TERMUX_ARCHITECTURES[@]}"; do
BOOTSTRAP_ROOTFS="$BOOTSTRAP_TMPDIR/rootfs-${package_arch}"
BOOTSTRAP_PKGDIR="$BOOTSTRAP_TMPDIR/packages-${package_arch}"
# Create initial directories for $TERMUX_PREFIX
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/etc/apt/apt.conf.d"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/etc/apt/preferences.d"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/tmp"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/cache/apt/archives/partial"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/info"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/triggers"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/updates"
mkdir -p "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/log/apt"
touch "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/available"
touch "${BOOTSTRAP_ROOTFS}/${TERMUX_PREFIX}/var/lib/dpkg/status"
# Read package metadata.
unset PACKAGE_METADATA
declare -A PACKAGE_METADATA
read_package_list "$package_arch"
# Package manager.
pull_package apt
pull_package game-repo
pull_package science-repo
# Core utilities.
pull_package bash
pull_package bzip2
pull_package command-not-found
pull_package coreutils
pull_package curl
pull_package dash
pull_package diffutils
pull_package findutils
pull_package gawk
pull_package grep
pull_package gzip
pull_package less
pull_package procps
pull_package psmisc
pull_package sed
pull_package tar
pull_package termux-exec
pull_package termux-tools
pull_package xz-utils
# Additional.
pull_package busybox
pull_package ed
pull_package dos2unix
pull_package inetutils
pull_package net-tools
pull_package patch
pull_package unzip
pull_package util-linux
# Handle additional packages.
for add_pkg in "${ADDITIONAL_PACKAGES[@]}"; do
pull_package "$add_pkg"
done
unset add_pkg
# Create bootstrap archive.
create_bootstrap_archive "$package_arch"
done
================================================
FILE: ndk-patches/asm-generic-termbits.h.patch
================================================
diff -u -r /home/builder/lib/android-ndk/sysroot/usr/include/asm-generic/termbits.h ./usr/include/asm-generic/termbits.h
--- /home/builder/lib/android-ndk/sysroot/usr/include/asm-generic/termbits.h 2018-09-10 17:37:50.000000000 +0000
+++ ./usr/include/asm-generic/termbits.h 2019-01-16 04:54:01.117253378 +0000
@@ -190,5 +190,6 @@
#define TCIOFLUSH 2
#define TCSANOW 0
#define TCSADRAIN 1
-#define TCSAFLUSH 2
+/* TCSAFLUSH is patched to be TCSANOW in Termux to work around Android SELinux rule */
+#define TCSAFLUSH 0
#endif
================================================
FILE: ndk-patches/bits-struct_file.h.patch
================================================
--- ./usr/include/bits/struct_file.h.orig 2019-06-10 09:40:35.872857650 +1000
+++ ./usr/include/bits/struct_file.h 2019-06-10 09:55:10.890308649 +1000
@@ -31,14 +31,79 @@
#include
__BEGIN_DECLS
+#if defined(__LP64__)
+struct __sbuf {
+ unsigned char* _base;
+ size_t _size;
+};
+#else
+struct __sbuf {
+ unsigned char *_base;
+ int _size;
+};
+#endif
+#if defined(__LP64__)
+typedef int64_t _struct_file_off_t;
+#else
+typedef __kernel_off_t _struct_file_off_t;
+#endif
+
/** The opaque structure implementing `FILE`. Do not make any assumptions about its content. */
struct __sFILE {
+ unsigned char *_p; /* current position in (some) buffer */
+ int _r; /* read space left for getc() */
+ int _w; /* write space left for putc() */
#if defined(__LP64__)
- char __private[152];
+ int _flags; /* flags, below; this FILE is free if 0 */
+ int _file; /* fileno, if Unix descriptor, else -1 */
#else
- char __private[84];
+ short _flags; /* flags, below; this FILE is free if 0 */
+ short _file; /* fileno, if Unix descriptor, else -1 */
#endif
-} __attribute__((aligned(sizeof(void*))));
+ struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
+ int _lbfsize; /* 0 or -_bf._size, for inline putc */
+
+ /* operations */
+ void *_cookie; /* cookie passed to io functions */
+ int (*_close)(void *);
+ int (*_read)(void *, char *, int);
+ _struct_file_off_t (*_seek)(void *, _struct_file_off_t, int);
+ int (*_write)(void *, const char *, int);
+
+ /* extension data, to avoid further ABI breakage */
+ struct __sbuf _ext;
+ /* data for long sequences of ungetc() */
+ unsigned char *_up; /* saved _p when _p is doing ungetc data */
+ int _ur; /* saved _r when _r is counting ungetc data */
+
+ /* tricks to meet minimum requirements even when malloc() fails */
+ unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
+ unsigned char _nbuf[1]; /* guarantee a getc() buffer */
+
+ /* separate buffer for fgetln() when line crosses buffer boundary */
+ struct __sbuf _lb; /* buffer for fgetln() */
+
+ /* Unix stdio files get aligned to block boundaries on fseek() */
+ int _blksize; /* stat.st_blksize (may be != _bf._size) */
+ _struct_file_off_t _offset; /* current lseek offset */
+};
+#define __SLBF 0x0001 /* line buffered */
+#define __SNBF 0x0002 /* unbuffered */
+#define __SRD 0x0004 /* OK to read */
+#define __SWR 0x0008 /* OK to write */
+ /* RD and WR are never simultaneously asserted */
+#define __SRW 0x0010 /* open for reading & writing */
+#define __SEOF 0x0020 /* found EOF */
+#define __SERR 0x0040 /* found error */
+#define __SMBF 0x0080 /* _buf is from malloc */
+#define __SAPP 0x0100 /* fdopen()ed in append mode */
+#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
+#define __SOPT 0x0400 /* do fseek() optimization */
+#define __SNPT 0x0800 /* do not do fseek() optimization */
+#define __SOFF 0x1000 /* set iff _offset is in fact correct */
+#define __SMOD 0x2000 /* true => fgetln modified _p text */
+#define __SALC 0x4000 /* allocate string space dynamically */
+#define __SIGN 0x8000 /* ignore this file in _fwalk */
__END_DECLS
================================================
FILE: ndk-patches/grp.h.patch
================================================
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h ./usr/include/grp.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h 2017-11-09 09:57:12.000000000 +0100
+++ ./usr/include/grp.h 2017-11-15 11:43:43.065533963 +0100
@@ -52,18 +52,11 @@
/* Note: Android has thousands and thousands of ids to iterate through. */
-#if __ANDROID_API__ >= 26
-struct group* getgrent(void) __INTRODUCED_IN(26);
-
-void setgrent(void) __INTRODUCED_IN(26);
-void endgrent(void) __INTRODUCED_IN(26);
-#endif /* __ANDROID_API__ >= 26 */
-
-
-#if __ANDROID_API__ >= 24
-int getgrgid_r(gid_t __gid, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
-int getgrnam_r(const char* __name, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
-#endif /* __ANDROID_API__ >= 24 */
+static struct group* getgrent(void) { return 0; }
+static void setgrent(void) {}
+static void endgrent(void) {}
+static int getgrgid_r(gid_t gid, struct group * grp, char * buf, size_t buflen, struct group ** result) { *result = 0; return 0; }
+static int getgrnam_r(const char * name, struct group * grp, char * buf, size_t buflen, struct group ** result) { *result = 0; return 0; }
int getgrouplist(const char* __user, gid_t __group, gid_t* __groups, int* __group_count);
int initgroups(const char* __user, gid_t __group);
================================================
FILE: ndk-patches/ifaddrs.h
================================================
/*
* Copyright (c) 1995, 1999
* Berkeley Software Design, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
*/
/*
Copyright (c) 2013, Kenneth MacKay
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _IFADDRS_H_
#define _IFADDRS_H_
struct ifaddrs {
struct ifaddrs *ifa_next;
char *ifa_name;
unsigned int ifa_flags;
struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr;
void *ifa_data;
};
/*
* This may have been defined in . Note that if is
* to be included it must be included before this header file.
*/
#ifndef ifa_broadaddr
#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
#endif
#include
__BEGIN_DECLS
static int getifaddrs(struct ifaddrs **ifap);
static void freeifaddrs(struct ifaddrs *ifa);
__END_DECLS
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
typedef struct NetlinkList {
struct NetlinkList *m_next;
struct nlmsghdr *m_data;
unsigned int m_size;
} NetlinkList;
static int netlink_socket(void)
{
int l_socket = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (l_socket < 0) return -1;
struct sockaddr_nl l_addr;
memset(&l_addr, 0, sizeof(l_addr));
l_addr.nl_family = AF_NETLINK;
if(bind(l_socket, (struct sockaddr *)&l_addr, sizeof(l_addr)) < 0) {
close(l_socket);
return -1;
}
return l_socket;
}
static int netlink_send(int p_socket, int p_request)
{
struct {
struct nlmsghdr m_hdr;
struct rtgenmsg m_msg;
} l_data;
memset(&l_data, 0, sizeof(l_data));
l_data.m_hdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
l_data.m_hdr.nlmsg_type = p_request;
l_data.m_hdr.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
l_data.m_hdr.nlmsg_pid = 0;
l_data.m_hdr.nlmsg_seq = p_socket;
l_data.m_msg.rtgen_family = AF_UNSPEC;
struct sockaddr_nl l_addr;
memset(&l_addr, 0, sizeof(l_addr));
l_addr.nl_family = AF_NETLINK;
return (sendto(p_socket, &l_data.m_hdr, l_data.m_hdr.nlmsg_len, 0, (struct sockaddr *)&l_addr, sizeof(l_addr)));
}
static int netlink_recv(int p_socket, void *p_buffer, size_t p_len)
{
struct msghdr l_msg;
struct iovec l_iov = { p_buffer, p_len };
struct sockaddr_nl l_addr;
for (;;) {
l_msg.msg_name = (void *)&l_addr;
l_msg.msg_namelen = sizeof(l_addr);
l_msg.msg_iov = &l_iov;
l_msg.msg_iovlen = 1;
l_msg.msg_control = NULL;
l_msg.msg_controllen = 0;
l_msg.msg_flags = 0;
int l_result = recvmsg(p_socket, &l_msg, 0);
if (l_result < 0) {
if (errno == EINTR) {
continue;
}
return -2;
}
if (l_msg.msg_flags & MSG_TRUNC) {
/* Buffer was too small. */
return -1;
}
return l_result;
}
}
static struct nlmsghdr *getNetlinkResponse(int p_socket, int *p_size, int *p_done)
{
size_t l_size = 4096;
void *l_buffer = NULL;
for(;;) {
free(l_buffer);
l_buffer = malloc(l_size);
if (l_buffer == NULL) return NULL;
int l_read = netlink_recv(p_socket, l_buffer, l_size);
*p_size = l_read;
if (l_read == -2) {
free(l_buffer);
return NULL;
}
if (l_read >= 0) {
pid_t l_pid = getpid();
struct nlmsghdr *l_hdr;
for(l_hdr = (struct nlmsghdr *)l_buffer; NLMSG_OK(l_hdr, (unsigned int)l_read); l_hdr = (struct nlmsghdr *)NLMSG_NEXT(l_hdr, l_read)) {
if((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket) continue;
if(l_hdr->nlmsg_type == NLMSG_DONE) {
*p_done = 1;
break;
}
if(l_hdr->nlmsg_type == NLMSG_ERROR) {
free(l_buffer);
return NULL;
}
}
return (struct nlmsghdr*)l_buffer;
}
l_size *= 2;
}
}
static NetlinkList *newListItem(struct nlmsghdr *p_data, unsigned int p_size)
{
NetlinkList *l_item = (NetlinkList*)malloc(sizeof(NetlinkList));
if (l_item == NULL) return NULL;
l_item->m_next = NULL;
l_item->m_data = p_data;
l_item->m_size = p_size;
return l_item;
}
static void freeResultList(NetlinkList *p_list)
{
NetlinkList *l_cur;
while (p_list) {
l_cur = p_list;
p_list = p_list->m_next;
free(l_cur->m_data);
free(l_cur);
}
}
static NetlinkList *getResultList(int p_socket, int p_request)
{
if (netlink_send(p_socket, p_request) < 0) return NULL;
NetlinkList *l_list = NULL;
NetlinkList *l_end = NULL;
int l_size;
int l_done = 0;
while (!l_done) {
struct nlmsghdr *l_hdr = getNetlinkResponse(p_socket, &l_size, &l_done);
if (!l_hdr) {
freeResultList(l_list);
return NULL;
}
NetlinkList *l_item = newListItem(l_hdr, l_size);
if (!l_item) {
freeResultList(l_list);
return NULL;
}
if (!l_list) {
l_list = l_item;
} else {
l_end->m_next = l_item;
}
l_end = l_item;
}
return l_list;
}
static size_t maxSize(size_t a, size_t b)
{
return (a > b ? a : b);
}
static size_t calcAddrLen(sa_family_t p_family, int p_dataSize)
{
switch (p_family) {
case AF_INET:
return sizeof(struct sockaddr_in);
case AF_INET6:
return sizeof(struct sockaddr_in6);
case AF_PACKET:
return maxSize(sizeof(struct sockaddr_ll), offsetof(struct sockaddr_ll, sll_addr) + p_dataSize);
default:
return maxSize(sizeof(struct sockaddr), offsetof(struct sockaddr, sa_data) + p_dataSize);
}
}
static void makeSockaddr(sa_family_t p_family, struct sockaddr *p_dest, void *p_data, size_t p_size)
{
switch (p_family) {
case AF_INET:
memcpy(&((struct sockaddr_in*)p_dest)->sin_addr, p_data, p_size);
break;
case AF_INET6:
memcpy(&((struct sockaddr_in6*)p_dest)->sin6_addr, p_data, p_size);
break;
case AF_PACKET:
memcpy(((struct sockaddr_ll*)p_dest)->sll_addr, p_data, p_size);
((struct sockaddr_ll*)p_dest)->sll_halen = p_size;
break;
default:
memcpy(p_dest->sa_data, p_data, p_size);
break;
}
p_dest->sa_family = p_family;
}
static void addToEnd(struct ifaddrs **p_resultList, struct ifaddrs *p_entry)
{
if (!*p_resultList) {
*p_resultList = p_entry;
} else {
struct ifaddrs *l_cur = *p_resultList;
while(l_cur->ifa_next) {
l_cur = l_cur->ifa_next;
}
l_cur->ifa_next = p_entry;
}
}
static int interpretLink(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList)
{
struct ifinfomsg *l_info = (struct ifinfomsg *)NLMSG_DATA(p_hdr);
size_t l_nameSize = 0;
size_t l_addrSize = 0;
size_t l_dataSize = 0;
size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg));
struct rtattr *l_rta;
for (l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) {
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch (l_rta->rta_type) {
case IFLA_ADDRESS:
case IFLA_BROADCAST:
l_addrSize += NLMSG_ALIGN(calcAddrLen(AF_PACKET, l_rtaDataSize));
break;
case IFLA_IFNAME:
l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
break;
case IFLA_STATS:
l_dataSize += NLMSG_ALIGN(l_rtaSize);
break;
default:
break;
}
}
struct ifaddrs *l_entry = (struct ifaddrs*)malloc(sizeof(struct ifaddrs) + sizeof(int) + l_nameSize + l_addrSize + l_dataSize);
if (l_entry == NULL) return -1;
memset(l_entry, 0, sizeof(struct ifaddrs));
l_entry->ifa_name = (char*)"";
char *l_index = ((char *)l_entry) + sizeof(struct ifaddrs);
char *l_name = l_index + sizeof(int);
char *l_addr = l_name + l_nameSize;
char *l_data = l_addr + l_addrSize;
/* Save the interface index so we can look it up when handling the addresses. */
memcpy(l_index, &l_info->ifi_index, sizeof(int));
l_entry->ifa_flags = l_info->ifi_flags;
l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifinfomsg));
for (l_rta = IFLA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) {
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch (l_rta->rta_type) {
case IFLA_ADDRESS:
case IFLA_BROADCAST:
{
size_t l_addrLen = calcAddrLen(AF_PACKET, l_rtaDataSize);
makeSockaddr(AF_PACKET, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize);
((struct sockaddr_ll *)l_addr)->sll_ifindex = l_info->ifi_index;
((struct sockaddr_ll *)l_addr)->sll_hatype = l_info->ifi_type;
if (l_rta->rta_type == IFLA_ADDRESS) {
l_entry->ifa_addr = (struct sockaddr *)l_addr;
} else {
l_entry->ifa_broadaddr = (struct sockaddr *)l_addr;
}
l_addr += NLMSG_ALIGN(l_addrLen);
break;
}
case IFLA_IFNAME:
strncpy(l_name, (char*)l_rtaData, l_rtaDataSize);
l_name[l_rtaDataSize] = '\0';
l_entry->ifa_name = l_name;
break;
case IFLA_STATS:
memcpy(l_data, l_rtaData, l_rtaDataSize);
l_entry->ifa_data = l_data;
break;
default:
break;
}
}
addToEnd(p_resultList, l_entry);
return 0;
}
static struct ifaddrs *findInterface(int p_index, struct ifaddrs **p_links, int p_numLinks)
{
int l_num = 0;
struct ifaddrs *l_cur = *p_links;
while (l_cur && l_num < p_numLinks) {
char *l_indexPtr = ((char *)l_cur) + sizeof(struct ifaddrs);
int l_index;
memcpy(&l_index, l_indexPtr, sizeof(int));
if(l_index == p_index) return l_cur;
l_cur = l_cur->ifa_next;
++l_num;
}
return NULL;
}
static int interpretAddr(struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList, int p_numLinks)
{
struct ifaddrmsg *l_info = (struct ifaddrmsg *)NLMSG_DATA(p_hdr);
struct ifaddrs *l_interface = findInterface(l_info->ifa_index, p_resultList, p_numLinks);
if (l_info->ifa_family == AF_PACKET) return 0;
size_t l_nameSize = 0;
size_t l_addrSize = 0;
int l_addedNetmask = 0;
size_t l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
struct rtattr *l_rta;
for (l_rta = IFA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) {
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch (l_rta->rta_type) {
case IFA_ADDRESS:
case IFA_LOCAL:
if ((l_info->ifa_family == AF_INET || l_info->ifa_family == AF_INET6) && !l_addedNetmask) {
/* Make room for netmask. */
l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
l_addedNetmask = 1;
}
case IFA_BROADCAST:
l_addrSize += NLMSG_ALIGN(calcAddrLen(l_info->ifa_family, l_rtaDataSize));
break;
case IFA_LABEL:
l_nameSize += NLMSG_ALIGN(l_rtaSize + 1);
break;
default:
break;
}
}
struct ifaddrs *l_entry = (struct ifaddrs*)malloc(sizeof(struct ifaddrs) + l_nameSize + l_addrSize);
if (l_entry == NULL) return -1;
memset(l_entry, 0, sizeof(struct ifaddrs));
l_entry->ifa_name = (l_interface ? l_interface->ifa_name : (char*)"");
char *l_name = ((char *)l_entry) + sizeof(struct ifaddrs);
char *l_addr = l_name + l_nameSize;
l_entry->ifa_flags = l_info->ifa_flags;
if (l_interface) {
l_entry->ifa_flags |= l_interface->ifa_flags;
}
l_rtaSize = NLMSG_PAYLOAD(p_hdr, sizeof(struct ifaddrmsg));
for (l_rta = IFA_RTA(l_info); RTA_OK(l_rta, l_rtaSize); l_rta = RTA_NEXT(l_rta, l_rtaSize)) {
void *l_rtaData = RTA_DATA(l_rta);
size_t l_rtaDataSize = RTA_PAYLOAD(l_rta);
switch (l_rta->rta_type) {
case IFA_ADDRESS:
case IFA_BROADCAST:
case IFA_LOCAL:
{
size_t l_addrLen = calcAddrLen(l_info->ifa_family, l_rtaDataSize);
makeSockaddr(l_info->ifa_family, (struct sockaddr *)l_addr, l_rtaData, l_rtaDataSize);
if (l_info->ifa_family == AF_INET6) {
if (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)l_rtaData) || IN6_IS_ADDR_MC_LINKLOCAL((struct in6_addr *)l_rtaData)) {
((struct sockaddr_in6 *)l_addr)->sin6_scope_id = l_info->ifa_index;
}
}
if (l_rta->rta_type == IFA_ADDRESS) {
/* Apparently in a point-to-point network IFA_ADDRESS contains
the dest address and IFA_LOCAL contains the local address. */
if(l_entry->ifa_addr) {
l_entry->ifa_dstaddr = (struct sockaddr *)l_addr;
} else {
l_entry->ifa_addr = (struct sockaddr *)l_addr;
}
} else if (l_rta->rta_type == IFA_LOCAL) {
if(l_entry->ifa_addr) {
l_entry->ifa_dstaddr = l_entry->ifa_addr;
}
l_entry->ifa_addr = (struct sockaddr *)l_addr;
} else {
l_entry->ifa_broadaddr = (struct sockaddr *)l_addr;
}
l_addr += NLMSG_ALIGN(l_addrLen);
break;
}
case IFA_LABEL:
strncpy(l_name, (char*)l_rtaData, l_rtaDataSize);
l_name[l_rtaDataSize] = '\0';
l_entry->ifa_name = l_name;
break;
default:
break;
}
}
if (l_entry->ifa_addr && (l_entry->ifa_addr->sa_family == AF_INET || l_entry->ifa_addr->sa_family == AF_INET6)) {
unsigned l_maxPrefix = (l_entry->ifa_addr->sa_family == AF_INET ? 32 : 128);
unsigned l_prefix = (l_info->ifa_prefixlen > l_maxPrefix ? l_maxPrefix : l_info->ifa_prefixlen);
char l_mask[16] = {0};
unsigned i;
for (i=0; i<(l_prefix/8); ++i) {
l_mask[i] = 0xff;
}
if (l_prefix % 8) {
l_mask[i] = 0xff << (8 - (l_prefix % 8));
}
makeSockaddr(l_entry->ifa_addr->sa_family, (struct sockaddr *)l_addr, l_mask, l_maxPrefix / 8);
l_entry->ifa_netmask = (struct sockaddr *)l_addr;
}
addToEnd(p_resultList, l_entry);
return 0;
}
static int interpretLinks(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList)
{
int l_numLinks = 0;
pid_t l_pid = getpid();
for(; p_netlinkList; p_netlinkList = p_netlinkList->m_next) {
unsigned int l_nlsize = p_netlinkList->m_size;
struct nlmsghdr *l_hdr;
for(l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize))
{
if ((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket) continue;
if (l_hdr->nlmsg_type == NLMSG_DONE) break;
if (l_hdr->nlmsg_type == RTM_NEWLINK) {
if(interpretLink(l_hdr, p_resultList) == -1) return -1;
++l_numLinks;
}
}
}
return l_numLinks;
}
static int interpretAddrs(int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList, int p_numLinks)
{
pid_t l_pid = getpid();
for (; p_netlinkList; p_netlinkList = p_netlinkList->m_next) {
unsigned int l_nlsize = p_netlinkList->m_size;
struct nlmsghdr *l_hdr;
for (l_hdr = p_netlinkList->m_data; NLMSG_OK(l_hdr, l_nlsize); l_hdr = NLMSG_NEXT(l_hdr, l_nlsize)) {
if ((pid_t)l_hdr->nlmsg_pid != l_pid || (int)l_hdr->nlmsg_seq != p_socket) continue;
if (l_hdr->nlmsg_type == NLMSG_DONE) break;
if (l_hdr->nlmsg_type == RTM_NEWADDR) {
if (interpretAddr(l_hdr, p_resultList, p_numLinks) == -1) return -1;
}
}
}
return 0;
}
static int getifaddrs(struct ifaddrs **ifap)
{
if (!ifap) return -1;
*ifap = NULL;
int l_socket = netlink_socket();
if (l_socket < 0) {
return -1;
}
NetlinkList *l_linkResults = getResultList(l_socket, RTM_GETLINK);
if (!l_linkResults) {
close(l_socket);
return -1;
}
NetlinkList *l_addrResults = getResultList(l_socket, RTM_GETADDR);
if (!l_addrResults) {
close(l_socket);
freeResultList(l_linkResults);
return -1;
}
int l_result = 0;
int l_numLinks = interpretLinks(l_socket, l_linkResults, ifap);
if (l_numLinks == -1 || interpretAddrs(l_socket, l_addrResults, ifap, l_numLinks) == -1) {
l_result = -1;
}
freeResultList(l_linkResults);
freeResultList(l_addrResults);
close(l_socket);
return l_result;
}
static void freeifaddrs(struct ifaddrs *ifa)
{
struct ifaddrs *l_cur;
while (ifa) {
l_cur = ifa;
ifa = ifa->ifa_next;
free(l_cur);
}
}
#endif
================================================
FILE: ndk-patches/langinfo.h
================================================
/*
* Copyright (C) 2013 The Android Open Source Project
* Copyright (C) 2016 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _LANGINFO_H
#define _LANGINFO_H
// __LP64__
#include
#include
#include
#define _NL_ITEM(category,index) (((category) << 10) | (index))
#define _NL_ITEM_CATEGORY(nl) ((nl) >> 10)
#define _NL_ITEM_INDEX(nl) ((nl) & 0x3ff)
#define CODESET 1
#define D_T_FMT 2
#define D_FMT 3
#define T_FMT 4
#define T_FMT_AMPM 5
#define AM_STR 6
#define PM_STR 7
#define DAY_1 8
#define DAY_2 9
#define DAY_3 10
#define DAY_4 11
#define DAY_5 12
#define DAY_6 13
#define DAY_7 14
#define ABDAY_1 15
#define ABDAY_2 16
#define ABDAY_3 17
#define ABDAY_4 18
#define ABDAY_5 19
#define ABDAY_6 20
#define ABDAY_7 21
#define MON_1 22
#define MON_2 23
#define MON_3 24
#define MON_4 25
#define MON_5 26
#define MON_6 27
#define MON_7 28
#define MON_8 29
#define MON_9 30
#define MON_10 31
#define MON_11 32
#define MON_12 33
#define ABMON_1 34
#define ABMON_2 35
#define ABMON_3 36
#define ABMON_4 37
#define ABMON_5 38
#define ABMON_6 39
#define ABMON_7 40
#define ABMON_8 41
#define ABMON_9 42
#define ABMON_10 43
#define ABMON_11 44
#define ABMON_12 45
#define ERA 46
#define ERA_D_FMT 47
#define ERA_D_T_FMT 48
#define ERA_T_FMT 49
#define ALT_DIGITS 50
#define RADIXCHAR 51
#define THOUSEP 52
#define YESEXPR 53
#define NOEXPR 54
#define CRNCYSTR 55
#define INT_CURRENCY_SYMBOL 55
#ifdef __cplusplus
extern "C" {
#endif
static char *nl_langinfo_l(nl_item item, locale_t loc)
{
static const char c_time[] =
"Sun\0" "Mon\0" "Tue\0" "Wed\0" "Thu\0" "Fri\0" "Sat\0"
"Sunday\0" "Monday\0" "Tuesday\0" "Wednesday\0"
"Thursday\0" "Friday\0" "Saturday\0"
"Jan\0" "Feb\0" "Mar\0" "Apr\0" "May\0" "Jun\0"
"Jul\0" "Aug\0" "Sep\0" "Oct\0" "Nov\0" "Dec\0"
"January\0" "February\0" "March\0" "April\0"
"May\0" "June\0" "July\0" "August\0"
"September\0" "October\0" "November\0" "December\0"
"AM\0" "PM\0"
"%a %b %e %T %Y\0"
"%m/%d/%y\0"
"%H:%M:%S\0"
"%I:%M:%S %p\0"
"\0"
"%m/%d/%y\0"
"0123456789"
"%a %b %e %T %Y\0"
"%H:%M:%S";
static const char c_messages[] = "^[yY]\0" "^[nN]";
static const char c_numeric[] = ".\0" "";
static const char c_zero[] = "UTF-8\0" "UTF-8\0"
"%F %T %z\0" "%F\0" "%T\0" "%I:%M:%S %p\0"
"AM\0" "PM\0"
"Sunday\0" "Monday\0" "Tuesday\0" "Wednesday\0"
"Thursday\0" "Friday\0" "Saturday\0"
"Sun\0" "Mon\0" "Tue\0" "Wed\0" "Thu\0" "Fri\0" "Sat\0"
"January\0" "February\0" "March\0"
"April\0" "May\0" "June\0"
"July\0" "August\0" "September\0"
"October\0" "November\0" "December\0"
"Jan\0" "Feb\0" "Mar\0" "Apr\0" "May\0" "Jun\0"
"Jul\0" "Aug\0" "Sep\0" "Oct\0" "Nov\0" "Dec\0"
"\0" "\0" "\0" "\0" "\0" ".\0" "\0"
"^[yY]\0" "^[nN]\0" "\0";
int cat = item >> 16;
int idx = item & 65535;
const char *str;
if (item == CODESET) return "UTF-8";
switch (cat) {
case 0:
if (idx > 55) return NULL;
str = c_zero;
break;
case LC_NUMERIC:
if (idx > 1) return NULL;
str = c_numeric;
break;
case LC_TIME:
if (idx > 0x31) return NULL;
str = c_time;
break;
case LC_MONETARY:
if (idx > 0) return NULL;
str = "";
break;
case LC_MESSAGES:
if (idx > 1) return NULL;
str = c_messages;
break;
default:
return NULL;
}
for (; idx; idx--, str++) for (; *str; str++);
return (char *)str;
}
static char *nl_langinfo(nl_item item)
{
return nl_langinfo_l(item, 0);
}
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* _LANGINFO_H */
================================================
FILE: ndk-patches/langinfo.h.patch
================================================
diff -N -a -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/langinfo.h ./usr/include/langinfo.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/langinfo.h 2017-11-09 09:57:12.000000000 +0100
+++ ./usr/include/langinfo.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _LANGINFO_H_
-#define _LANGINFO_H_
-
-#include
-
-#include
-#include
-
-__BEGIN_DECLS
-
-#define CODESET 1
-#define D_T_FMT 2
-#define D_FMT 3
-#define T_FMT 4
-#define T_FMT_AMPM 5
-#define AM_STR 6
-#define PM_STR 7
-#define DAY_1 8
-#define DAY_2 9
-#define DAY_3 10
-#define DAY_4 11
-#define DAY_5 12
-#define DAY_6 13
-#define DAY_7 14
-#define ABDAY_1 15
-#define ABDAY_2 16
-#define ABDAY_3 17
-#define ABDAY_4 18
-#define ABDAY_5 19
-#define ABDAY_6 20
-#define ABDAY_7 21
-#define MON_1 22
-#define MON_2 23
-#define MON_3 24
-#define MON_4 25
-#define MON_5 26
-#define MON_6 27
-#define MON_7 28
-#define MON_8 29
-#define MON_9 30
-#define MON_10 31
-#define MON_11 32
-#define MON_12 33
-#define ABMON_1 34
-#define ABMON_2 35
-#define ABMON_3 36
-#define ABMON_4 37
-#define ABMON_5 38
-#define ABMON_6 39
-#define ABMON_7 40
-#define ABMON_8 41
-#define ABMON_9 42
-#define ABMON_10 43
-#define ABMON_11 44
-#define ABMON_12 45
-#define ERA 46
-#define ERA_D_FMT 47
-#define ERA_D_T_FMT 48
-#define ERA_T_FMT 49
-#define ALT_DIGITS 50
-#define RADIXCHAR 51
-#define THOUSEP 52
-#define YESEXPR 53
-#define NOEXPR 54
-#define CRNCYSTR 55
-
-
-#if __ANDROID_API__ >= 26
-char* nl_langinfo(nl_item __item) __INTRODUCED_IN(26);
-char* nl_langinfo_l(nl_item __item, locale_t __l) __INTRODUCED_IN(26);
-#endif /* __ANDROID_API__ >= 26 */
-
-
-__END_DECLS
-
-#endif
================================================
FILE: ndk-patches/libintl.h
================================================
#ifndef _LIBINTL_H
#define _LIBINTL_H
#include
#include
static __inline__ char* gettext(const char* msgid)
{ return (char*) msgid; }
static __inline__ char* dgettext(const char* domainname, const char* msgid)
{ return (char*) msgid; }
static __inline__ char* dcgettext(const char* domainname, const char* msgid, int category)
{ return (char*) msgid; }
static __inline__ char* ngettext(const char* msgid1, const char* msgid2, unsigned long int n)
{ return (char *) ((n == 1) ? msgid1 : msgid2); }
static __inline__ char* dngettext(const char* domainname, const char* msgid1, const char* msgid2, unsigned long int n)
{ return (char *) ((n == 1) ? msgid1 : msgid2); }
static __inline__ char* dcngettext(const char* domainname, const char* msgid1, const char* msgid2, unsigned long int n, int category)
{ return (char *) ((n == 1) ? msgid1 : msgid2); }
static __inline__ char* textdomain(const char* domainname)
{
static const char default_str[] = "messages";
if (domainname && *domainname && strcmp(domainname, default_str)) {
errno = EINVAL;
return NULL;
}
return (char*) default_str;
}
static __inline__ char* bindtextdomain(const char* domainname, const char* dirname)
{
static const char dir[] = "/";
if (!domainname || !*domainname || (dirname && ((dirname[0] != '/') || dirname[1]))) {
errno = EINVAL;
return NULL;
}
return (char*) dir;
}
static __inline__ char* bind_textdomain_codeset(const char* domainname, const char* codeset)
{
if (!domainname || !*domainname || (codeset && strcasecmp(codeset, "UTF-8"))) {
errno = EINVAL;
}
return NULL;
}
#endif
================================================
FILE: ndk-patches/linux-fcntl.h.patch
================================================
diff -uNr sysroot.orig/usr/include/linux/fcntl.h sysroot/usr/include/linux/fcntl.h
--- sysroot.orig/usr/include/linux/fcntl.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/linux/fcntl.h 2019-03-20 13:22:32.823142545 +0000
@@ -50,6 +50,12 @@
#define DN_ATTRIB 0x00000020
#define DN_MULTISHOT 0x80000000
#define AT_FDCWD - 100
+/* Termux patch: This flag is not supported on Android 6.0+, and should not
+ be needed since there are not setuid binaries. Define AT_EACCESS to 0 to
+ avoid packages defining their own AT_EACCESS (which e.g. coreutil does)
+ since that will only result in errors. See:
+ https://android.googlesource.com/platform/bionic/+/3577825%5E!/ */
+#define AT_EACCESS 0
#define AT_SYMLINK_NOFOLLOW 0x100
#define AT_REMOVEDIR 0x200
#define AT_SYMLINK_FOLLOW 0x400
================================================
FILE: ndk-patches/paths.h.patch
================================================
--- ./usr/include/paths.h.orig 2019-06-10 00:10:55.544212642 +0000
+++ ./usr/include/paths.h 2019-06-10 00:16:51.514412646 +0000
@@ -38,16 +38,14 @@
#include
-#ifndef _PATH_BSHELL
/** Path to the default system shell. Historically the 'B' was to specify the Bourne shell. */
-#define _PATH_BSHELL "/system/bin/sh"
-#endif
+#define _PATH_BSHELL "@TERMUX_PREFIX@/bin/sh"
/** Path to the system console. */
#define _PATH_CONSOLE "/dev/console"
/** Default shell search path. */
-#define _PATH_DEFPATH "/sbin:/system/sbin:/product/bin:/apex/com.android.runtime/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
+#define _PATH_DEFPATH "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets"
/** Path to the directory containing device files. */
#define _PATH_DEV "/dev/"
@@ -63,3 +61,9 @@
/** Path to the calling process' tty. */
#define _PATH_TTY "/dev/tty"
+#define _PATH_STDPATH _PATH_DEFPATH
+#define _PATH_TMP "@TERMUX_PREFIX@/tmp/"
+#define _PATH_VARDB "@TERMUX_PREFIX@/var/db/"
+#define _PATH_VARRUN "@TERMUX_PREFIX@/var/run/"
+#define _PATH_VARTMP "@TERMUX_PREFIX@/var/tmp/"
+
================================================
FILE: ndk-patches/pwd.h.patch
================================================
diff -uNr sysroot.orig/usr/include/pwd.h sysroot/usr/include/pwd.h
--- sysroot.orig/usr/include/pwd.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/pwd.h 2019-03-20 13:26:24.283060011 +0000
@@ -89,13 +89,58 @@
struct passwd* getpwent(void) __INTRODUCED_IN(26);
void setpwent(void) __INTRODUCED_IN(26);
-void endpwent(void) __INTRODUCED_IN(26);
#endif /* __ANDROID_API__ >= 26 */
int getpwnam_r(const char* __name, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
int getpwuid_r(uid_t __uid, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
+int access(const char* __path, int __mode);
+
+static void android_setup_pwd(struct passwd* pw) {
+ char const* result = "@TERMUX_PREFIX@/bin/login";
+ if (result == NULL || access(result, /*X_OK*/1) == -1) {
+ pw->pw_shell = "@TERMUX_PREFIX@/bin/bash";
+ } else {
+ pw->pw_shell = (char*) result;
+ }
+ pw->pw_dir = "@TERMUX_HOME@";
+ pw->pw_passwd = "*";
+#ifdef __LP64__
+ pw->pw_gecos = ""; /* Avoid NULL field. */
+#endif
+}
+
+static struct passwd* android_polyfill_getpwuid(uid_t t) {
+ struct passwd* pw = getpwuid(t);
+ if (pw == NULL) return NULL;
+ android_setup_pwd(pw);
+ return pw;
+}
+
+static struct passwd* android_polyfill_getpwnam(const char* name) {
+ struct passwd* pw = getpwnam(name);
+ if (pw == NULL) return NULL;
+ android_setup_pwd(pw);
+ return pw;
+}
+
+static int android_polyfill_getpwuid_r(uid_t uid,
+ struct passwd *pwd,
+ char *buffer,
+ size_t bufsize,
+ struct passwd **result) {
+ int ret = getpwuid_r(uid, pwd, buffer, bufsize, result);
+ if (ret != 0) return ret;
+ android_setup_pwd(pwd);
+ return 0;
+}
+
+#define getpwnam android_polyfill_getpwnam
+#define getpwuid android_polyfill_getpwuid
+#define getpwuid_r android_polyfill_getpwuid_r
+static void endpwent(void) { /* Do nothing. */ }
+
__END_DECLS
#endif
================================================
FILE: ndk-patches/stdio.h.patch
================================================
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/include/stdio.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h 2017-11-09 09:57:12.000000000 +0100
+++ ./usr/include/stdio.h 2017-11-15 11:57:58.567432093 +0100
@@ -44,11 +44,12 @@
#include
#include
+#include /* For strcpy(3) used by ctermid() */
+#include /* For O_RDWR and other O_* constants */
+
#include
-#if __ANDROID_API__ < __ANDROID_API_N__
#include
-#endif
__BEGIN_DECLS
@@ -165,7 +166,7 @@
__printflike(2, 0) __warnattr_strict("vsprintf is often misused; please use vsnprintf");
char* tmpnam(char* __s)
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
-#define P_tmpdir "/tmp/" /* deprecated */
+#define P_tmpdir "@TERMUX_PREFIX@/tmp/" /* deprecated */
char* tempnam(const char* __dir, const char* __prefix)
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
@@ -241,8 +242,6 @@
FILE* freopen64(const char* __path, const char* __mode, FILE* __fp) __INTRODUCED_IN(24);
#endif /* __ANDROID_API__ >= 24 */
-FILE* tmpfile(void);
-
#if __ANDROID_API__ >= 24
FILE* tmpfile64(void) __INTRODUCED_IN(24);
#endif /* __ANDROID_API__ >= 24 */
@@ -256,10 +255,15 @@
#define L_ctermid 1024 /* size for ctermid() */
-#if __ANDROID_API__ >= 26
-char* ctermid(char* __buf) __INTRODUCED_IN(26);
-#endif /* __ANDROID_API__ >= 26 */
+/* Needed by gnulibs freading(). */
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+/* Used by perl, fish, and others. */
+static __inline__ char* ctermid(char* s) {
+ if (s == 0) return (char*) "/dev/tty";
+ strcpy(s, "/dev/tty");
+ return s;
+}
FILE* fdopen(int __fd, const char* __mode);
int fileno(FILE* __fp);
@@ -328,6 +332,29 @@
#include
#endif
+int open(const char*, int, ...);
+extern pid_t getpid();
+extern int unlink(const char*);
+void free(void* p);
+uint32_t arc4random(void);
+static __inline__ FILE* tmpfile() {
+ int p = getpid();
+ char* path;
+ int i;
+ for (i = 0; i < 100; i++) {
+ unsigned int r = arc4random();
+ if (asprintf(&path, "@TERMUX_PREFIX@/tmp/tmpfile.%d-%u", p, r) == -1) return NULL;
+ int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, 0600);
+ free(path);
+ if (fd >= 0) {
+ FILE* result = fdopen(fd, "w+");
+ unlink(path);
+ return result;
+ }
+ }
+ return NULL;
+}
+
__END_DECLS
#endif
================================================
FILE: ndk-patches/stdlib.h.patch
================================================
diff -uNr sysroot.orig/usr/include/stdlib.h sysroot/usr/include/stdlib.h
--- sysroot.orig/usr/include/stdlib.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/stdlib.h 2019-03-20 13:23:48.870108924 +0000
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
#include
@@ -211,8 +212,7 @@
size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
#if __ANDROID_API__ >= __ANDROID_API_L__
-size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
-#define MB_CUR_MAX __ctype_get_mb_cur_max()
+#define MB_CUR_MAX 4
#else
/*
* Pre-L we didn't have any locale support and so we were always the POSIX
================================================
FILE: ndk-patches/sys-cdefs.h.patch
================================================
diff -uNr sysroot.orig/usr/include/sys/cdefs.h sysroot/usr/include/sys/cdefs.h
--- sysroot.orig/usr/include/sys/cdefs.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/sys/cdefs.h 2019-03-20 13:27:29.977876824 +0000
@@ -206,7 +206,11 @@
* _FILE_OFFSET_BITS 64 support.
* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
*/
-#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
+/* Using _FILE_OFFSET_BITS=64 does not work well on Android
+ * and can cause problems when mixing libraries, which is why
+ * Termux hides away this unless TERMUX_EXPOSE_FILE_OFFSET64
+ * is defined. */
+#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(TERMUX_EXPOSE_FILE_OFFSET64)
# define __USE_FILE_OFFSET64 1
/*
* Note that __RENAME_IF_FILE_OFFSET64 is only valid if the off_t and off64_t
@@ -336,3 +340,6 @@
#include
#include
+
+#define __TERMUX__ 1
+#define __TERMUX_PREFIX__ "@TERMUX_PREFIX@"
================================================
FILE: ndk-patches/sys-wait.h.patch
================================================
diff -uNr sysroot.orig/usr/include/sys/wait.h sysroot/usr/include/sys/wait.h
--- sysroot.orig/usr/include/sys/wait.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/sys/wait.h 2019-03-20 13:28:06.689331544 +0000
@@ -46,6 +46,9 @@
// Implemented as a static inline before 18.
#endif
+/* Termux addition: Add wait3() declaration used by busybox. Available in libc for 32-bit only. */
+static pid_t wait3(int* status, int options, struct rusage* rusage) { return wait4(-1, status, options, rusage); }
+
/* Posix states that idtype_t should be an enumeration type, but
* the kernel headers define P_ALL, P_PID and P_PGID as constant macros
* instead.
================================================
FILE: ndk-patches/syslog.patch
================================================
diff -uNr sysroot.orig/usr/include/syslog.h sysroot/usr/include/syslog.h
--- sysroot.orig/usr/include/syslog.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/syslog.h 2019-03-20 13:19:44.315965728 +0000
@@ -32,6 +32,8 @@
#include
#include
#include
+#include /* for __android_log_vprint() */
+#include /* for getpid() */
__BEGIN_DECLS
@@ -92,6 +94,64 @@
void syslog(int __priority, const char* __fmt, ...) __printflike(2, 3);
void vsyslog(int __priority, const char* __fmt, va_list __args) __printflike(2, 0);
+extern /*const*/ char* __progname;
+static __inline__ void android_polyfill_openlog(const char* a, int b, int c) {
+ (void) a;
+ (void) b;
+ (void) c;
+}
+static __inline__ void android_polyfill_closelog() {}
+
+static __inline__ void android_polyfill_vsyslog(int syslog_priority, char const* format, va_list ap)
+{
+ android_LogPriority a = ANDROID_LOG_ERROR;
+ switch (syslog_priority) {
+ case LOG_WARNING: a = ANDROID_LOG_WARN; break;
+ case LOG_NOTICE : a = ANDROID_LOG_INFO; break;
+ case LOG_INFO: a = ANDROID_LOG_INFO; break;
+ case LOG_DEBUG: a = ANDROID_LOG_DEBUG; break;
+ }
+ char* syslog_text;
+ if (vasprintf(&syslog_text, format, ap) == -1) {
+ __android_log_vprint(a, "syslog", format, ap);
+ return;
+ }
+ __android_log_print(a, "syslog", "%s - %s", __progname, syslog_text);
+ free(syslog_text);
+}
+
+static __inline__ void android_polyfill_syslog(int priority, const char* format, ...)
+{
+ va_list myargs;
+ va_start(myargs, format);
+ android_polyfill_vsyslog(priority, format, myargs);
+ va_end(myargs);
+}
+
+static __inline__ void android_polyfill_syslog_r(int syslog_priority, void* d, const char* format, ...)
+{
+ (void) d;
+ va_list myargs;
+ va_start(myargs, format);
+ android_polyfill_vsyslog(syslog_priority, format, myargs);
+ va_end(myargs);
+}
+
+static __inline__ void android_polyfill_vsyslog_r(int syslog_priority, void* d, const char* fmt, va_list ap)
+{
+ (void) d;
+ android_polyfill_vsyslog(syslog_priority, fmt, ap);
+}
+
+#define openlog android_polyfill_openlog
+#define closelog android_polyfill_closelog
+
+#define syslog android_polyfill_syslog
+#define syslog_r android_polyfill_syslog_r
+
+#define vsyslog android_polyfill_vsyslog
+#define vsyslog_r android_polyfill_vsyslog_r
+
__END_DECLS
#endif /* _SYSLOG_H */
================================================
FILE: ndk-patches/unistd.h.patch
================================================
--- sysroot/usr/include/unistd.h 2018-04-30 19:24:22.000000000 +0000
+++ usr/include/unistd.h 2018-08-16 10:42:51.158596753 +0000
@@ -302,6 +302,74 @@
#include
#endif
+#if !defined GETPASS_H && !defined getpass && !defined HAVE_GETPASS && !defined HAS_GETPASS && !defined NO_INLINE_GETPASS
+#define GETPASS_H 1
+#define HAVE_GETPASS 1
+#define HAS_GETPASS 1
+#define PASSWORDLEN 512
+
+static __inline__ char* getpass(const char* prompt) {
+ // termios struct as in asm-generic/termbits.h
+ struct _termios {
+ unsigned int c_iflag; /* input mode flags */
+ unsigned int c_oflag; /* output mode flags */
+ unsigned int c_cflag; /* control mode flags */
+ unsigned int c_lflag; /* local mode flags */
+ unsigned char c_line; /* line discipline */
+ unsigned char c_cc[19/* NCCS */]; /* control characters */
+ };
+
+ struct _termios term_old, term_new;
+ static char password[513] = { 0 }; /* 512 1-byte charactes and '0' */
+ int len = 0, tty_changed = 0;
+
+ // print prompt
+ while (*prompt) {
+ write(1, prompt, 1);
+ prompt++;
+ }
+
+ // try to disable echoing on terminal
+ if (ioctl(0, 0x5401 /* TCGETS */, &term_old) == 0) {
+ term_new = term_old;
+ term_new.c_lflag &= ~0000010;/* ~ECHO */
+
+ if (ioctl(0, 0x5402+0 /* TCSETS+TCSANOW */, &term_new) == 0) {
+ tty_changed = 1;
+ } else {
+ tty_changed = 0;
+ }
+ }
+
+ // read password
+ char chr;
+ while (read(0, &chr, sizeof(char)) > 0) {
+ if (chr == '\r' || chr == '\n' || chr == 0) {
+ break;
+ }
+
+ if (len == sizeof(password)-1) {
+ // we should consume all entered characters even
+ // if maximal input length reached
+ continue;
+ } else {
+ password[len++] = chr;
+ }
+ }
+ password[len] = 0;
+
+ // restore terminal to previous state if needed
+ if (tty_changed) {
+ ioctl(0, 0x5402+0 /* TCSETS+TCSANOW */, &term_old);
+ }
+
+ // force new line
+ write(1, "\n", 1);
+
+ return password;
+}
+#endif
+
__END_DECLS
#endif
================================================
FILE: packages/aapt/aapt-Main.cpp.patch.txt
================================================
diff -u -r ../../src-pristine/aapt/Main.cpp ./Main.cpp
--- ../../src-pristine/aapt/Main.cpp 2016-10-07 15:12:44.322248606 -0400
+++ ./Main.cpp 2016-10-07 15:18:50.708065085 -0400
@@ -268,6 +268,9 @@
/* default to compression */
bundle.setCompressionMethod(ZipEntry::kCompressDeflated);
+ // Convenience when using aapt in termux.
+ bundle.addPackageInclude("@TERMUX_PREFIX@/share/aapt/android.jar");
+
if (argc < 2) {
wantUsage = true;
goto bail;
================================================
FILE: packages/aapt/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://elinux.org/Android_aapt
TERMUX_PKG_DESCRIPTION="Android Asset Packaging Tool"
TERMUX_PKG_LICENSE="Apache-2.0"
_TAG_VERSION=7.1.2
_TAG_REVISION=33
TERMUX_PKG_VERSION=${_TAG_VERSION}.${_TAG_REVISION}
TERMUX_PKG_REVISION=7
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="libc++, libexpat, libpng, libzopfli, zlib"
termux_step_pre_configure() {
# Certain packages are not safe to build on device because their
# build.sh script deletes specific files in $TERMUX_PREFIX.
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi
}
termux_step_make_install() {
# FIXME: We would like to enable checksums when downloading
# tar files, but they change each time as the tar metadata
# differs: https://github.com/google/gitiles/issues/84
local _TAGNAME=${_TAG_VERSION}_r${_TAG_REVISION}
SYSTEM_CORE_INCLUDE_TARFILE=$TERMUX_PKG_CACHEDIR/system_core_include_${_TAGNAME}.tar.gz
test ! -f $SYSTEM_CORE_INCLUDE_TARFILE && termux_download \
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/include.tar.gz" \
$SYSTEM_CORE_INCLUDE_TARFILE \
SKIP_CHECKSUM
ANDROIDFW_INCLUDE_TARFILE=$TERMUX_PKG_CACHEDIR/androidfw_include_${_TAGNAME}.tar.gz
test ! -f $ANDROIDFW_INCLUDE_TARFILE && termux_download \
"https://android.googlesource.com/platform/frameworks/base/+archive/android-$_TAGNAME/include/androidfw.tar.gz" \
$ANDROIDFW_INCLUDE_TARFILE \
SKIP_CHECKSUM
ANDROID_BASE_INCLUDE_TARFILE=$TERMUX_PKG_CACHEDIR/android_base_include_${_TAGNAME}.tar.gz
test ! -f $ANDROID_BASE_INCLUDE_TARFILE && termux_download \
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/base/include/android-base.tar.gz" \
$ANDROID_BASE_INCLUDE_TARFILE \
SKIP_CHECKSUM
local AOSP_INCLUDE_DIR=$TERMUX_PREFIX/include/aosp
mkdir -p $AOSP_INCLUDE_DIR
cd $AOSP_INCLUDE_DIR
rm -Rf *
tar xf $SYSTEM_CORE_INCLUDE_TARFILE
mkdir -p androidfw
cd androidfw
tar xf $ANDROIDFW_INCLUDE_TARFILE
cd ..
mkdir -p android-base
cd android-base
tar xf $ANDROID_BASE_INCLUDE_TARFILE
cd ../log
patch -p0 < $TERMUX_PKG_BUILDER_DIR/log.h.patch.txt
CXXFLAGS+=" -fPIC"
# Build libcutils:
mkdir -p $TERMUX_PKG_SRCDIR/{libcutils,androidfw}
cd $TERMUX_PKG_SRCDIR/libcutils
LIBCUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libcutils_${_TAGNAME}.tar.gz
test ! -f $LIBCUTILS_TARFILE && termux_download \
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/libcutils.tar.gz" \
$LIBCUTILS_TARFILE \
SKIP_CHECKSUM
tar xf $LIBCUTILS_TARFILE
patch -p0 < $TERMUX_PKG_BUILDER_DIR/libcutils-patch.txt
$CXX $CXXFLAGS -isystem $AOSP_INCLUDE_DIR -c -o sockets.o sockets.cpp
$CXX $CXXFLAGS -isystem $AOSP_INCLUDE_DIR -c -o sockets_unix.o sockets_unix.cpp
sed -i 's%include %include %' properties.c
# From Android.mk:
libcutils_common_sources="\
config_utils.c \
fs_config.c \
canned_fs_config.c \
hashmap.c \
iosched_policy.c \
load_file.c \
native_handle.c \
open_memstream.c \
process_name.c \
record_stream.c \
sched_policy.c \
sockets.o \
strdup16to8.c \
strdup8to16.c \
strlcpy.c \
threads.c"
libcutils_nonwindows_sources="\
fs.c \
multiuser.c \
socket_inaddr_any_server_unix.c \
socket_local_client_unix.c \
socket_local_server_unix.c \
socket_loopback_client_unix.c \
socket_loopback_server_unix.c \
socket_network_client_unix.c \
sockets_unix.o \
str_parms.c"
# -D_FORTIFY_SOURCE=2 makes debug build fail with:
# In file included from process_name.c:29:
# /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:116:45: error: expected identifier
# __errordecl(__property_get_too_small_error, "property_get() called with too small of a buffer");
# ^
# /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:119:5: error: static declaration of 'property_get' follows non-static declaration
# int property_get(const char *key, char *value, const char *default_value) {
# ^
# /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:46:5: note: previous declaration is here
# int property_get(const char *key, char *value, const char *default_value);
$CC ${CFLAGS/-D_FORTIFY_SOURCE=2/} \
$LDFLAGS \
-Dchar16_t=uint16_t \
-std=c11 \
-isystem $AOSP_INCLUDE_DIR \
$libcutils_common_sources \
$libcutils_nonwindows_sources \
trace-host.c \
properties.c \
-llog \
-shared \
-o $TERMUX_PREFIX/lib/libandroid-cutils.so
# Build libutil:
local LIBUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libutils_${_TAGNAME}.tar.gz
test ! -f $LIBUTILS_TARFILE && termux_download \
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/libutils.tar.gz" \
$LIBUTILS_TARFILE \
SKIP_CHECKSUM
local SAFE_IOP_TARFILE=$TERMUX_PKG_CACHEDIR/safe_iop.tar.gz
test ! -f $SAFE_IOP_TARFILE && termux_download \
https://android.googlesource.com/platform/external/safe-iop/+archive/cd76f998688d145235de78ecd5b340d0eac9239d.tar.gz \
$SAFE_IOP_TARFILE \
SKIP_CHECKSUM
local SAFE_IOP_DIR=$TERMUX_PKG_TMPDIR/safe-iop
mkdir -p $SAFE_IOP_DIR
cd $SAFE_IOP_DIR
tar xf $SAFE_IOP_TARFILE
mv src/safe_iop.c src/safe_iop.cpp
mkdir $TERMUX_PKG_SRCDIR/libutils
cd $TERMUX_PKG_SRCDIR/libutils
tar xf $LIBUTILS_TARFILE
# From Android.mk:
#CallStack.cpp \
#SystemClock.cpp \
commonSources="\
FileMap.cpp \
JenkinsHash.cpp \
LinearTransform.cpp \
Log.cpp \
NativeHandle.cpp \
Printer.cpp \
PropertyMap.cpp \
RefBase.cpp \
SharedBuffer.cpp \
Static.cpp \
StopWatch.cpp \
String8.cpp \
String16.cpp \
Threads.cpp \
Timers.cpp \
Tokenizer.cpp \
Unicode.cpp \
VectorImpl.cpp \
misc.cpp"
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS \
-std=c++11 \
'-DALOG_ASSERT(a,...)=' \
-Dtypeof=decltype \
-isystem $TERMUX_PREFIX/include/aosp \
-isystem $SAFE_IOP_DIR/include \
$SAFE_IOP_DIR/src/safe_iop.cpp \
$commonSources \
-landroid-cutils \
-llog \
-shared \
-o $TERMUX_PREFIX/lib/libandroid-utils.so
# Build libbase:
local LIBBASE_TARFILE=$TERMUX_PKG_CACHEDIR/libbase_${_TAGNAME}.tar.gz
test ! -f $LIBBASE_TARFILE && termux_download \
"https://android.googlesource.com/platform/system/core/+archive/android-${_TAGNAME}/base.tar.gz" \
$LIBBASE_TARFILE \
SKIP_CHECKSUM
mkdir -p $TERMUX_PKG_SRCDIR/libbase
cd $TERMUX_PKG_SRCDIR/libbase
tar xf $LIBBASE_TARFILE
rm -Rf $TERMUX_PREFIX/include/aosp/android-base
mv include/android-base $TERMUX_PREFIX/include/aosp
patch -p1 < $TERMUX_PKG_BUILDER_DIR/libbase-patch.txt
#logging.cpp \
libbase_src_files="\
file.cpp \
parsenetaddress.cpp \
stringprintf.cpp \
strings.cpp \
test_utils.cpp"
libbase_linux_src_files="\
errors_unix.cpp"
# __USE_BSD for DEFFILEMODE to be defined by .
$CXX $CXXFLAGS $CPPFLAGS \
$LDFLAGS \
-std=c++11 \
-include memory \
-D__USE_BSD \
-isystem $AOSP_INCLUDE_DIR \
$libbase_src_files $libbase_linux_src_files \
-llog \
-shared \
-o $TERMUX_PREFIX/lib/libandroid-base.so
# Build libziparchive:
LIBZIPARCHIVE_TARFILE=$TERMUX_PKG_CACHEDIR/libziparchive_${_TAGNAME}.tar.gz
test ! -f $LIBZIPARCHIVE_TARFILE && termux_download \
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/libziparchive.tar.gz" \
$LIBZIPARCHIVE_TARFILE \
SKIP_CHECKSUM
mkdir -p $TERMUX_PKG_SRCDIR/libziparchive
cd $TERMUX_PKG_SRCDIR/libziparchive
tar xf $LIBZIPARCHIVE_TARFILE
libziparchive_source_files="\
zip_archive.cc \
zip_archive_stream_entry.cc \
zip_writer.cc"
patch -p0 < $TERMUX_PKG_BUILDER_DIR/libziparchive.patch.txt
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -std=c++11 \
-DZLIB_CONST \
-isystem $AOSP_INCLUDE_DIR \
$libziparchive_source_files \
-landroid-base \
-landroid-utils \
-lz \
-llog \
-shared \
-o $TERMUX_PREFIX/lib/libandroid-ziparchive.so
# Build libandroidfw:
ANDROIDFW_TARFILE=$TERMUX_PKG_CACHEDIR/androidfw_${_TAGNAME}.tar.gz
test ! -f $ANDROIDFW_TARFILE && termux_download \
https://android.googlesource.com/platform/frameworks/base/+archive/android-$_TAGNAME/libs/androidfw.tar.gz \
$ANDROIDFW_TARFILE \
SKIP_CHECKSUM
mkdir -p $TERMUX_PKG_SRCDIR/androidfw
cd $TERMUX_PKG_SRCDIR/androidfw
tar xf $ANDROIDFW_TARFILE
commonSources="\
Asset.cpp \
AssetDir.cpp \
AssetManager.cpp \
LocaleData.cpp \
misc.cpp \
ObbFile.cpp \
ResourceTypes.cpp \
StreamingZipInflater.cpp \
TypeWrappers.cpp \
ZipFileRO.cpp \
ZipUtils.cpp"
sed -i 's%#include %%' ResourceTypes.cpp
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -isystem $AOSP_INCLUDE_DIR \
-std=c++11 \
-include memory \
$commonSources \
-landroid-cutils \
-landroid-utils \
-landroid-ziparchive \
-llog \
-lz \
-shared \
-o $TERMUX_PREFIX/lib/libandroid-fw.so
# Build aapt:
AAPT_TARFILE=$TERMUX_PKG_CACHEDIR/aapt_${_TAGNAME}.tar.gz
test ! -f $AAPT_TARFILE && termux_download \
"https://android.googlesource.com/platform/frameworks/base/+archive/android-$_TAGNAME/tools/aapt.tar.gz" \
$AAPT_TARFILE \
SKIP_CHECKSUM
mkdir $TERMUX_PKG_SRCDIR/aapt
cd $TERMUX_PKG_SRCDIR/aapt
tar xf $AAPT_TARFILE
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PKG_BUILDER_DIR/aapt-Main.cpp.patch.txt | patch -p1
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS \
-std=c++11 \
-include memory \
-DANDROID_SMP=1 \
-DNDEBUG=1 \
-DHAVE_ENDIAN_H=1 -DHAVE_POSIX_FILEMAP=1 -DHAVE_OFF64_T=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_PTHREADS=1 \
-isystem $AOSP_INCLUDE_DIR \
*.cpp \
-landroid-cutils -landroid-utils -landroid-fw -landroid-ziparchive \
-llog \
-lm -lz -lpng -lexpat \
-pie \
-o $TERMUX_PREFIX/bin/aapt
# Build zipalign:
ZIPALIGN_TARFILE=$TERMUX_PKG_CACHEDIR/zipalign_${_TAGNAME}.tar.gz
test ! -f $ZIPALIGN_TARFILE && termux_download \
"https://android.googlesource.com/platform/build.git/+archive/android-$_TAGNAME/tools/zipalign.tar.gz" \
$ZIPALIGN_TARFILE \
SKIP_CHECKSUM
mkdir $TERMUX_PKG_SRCDIR/zipalign
cd $TERMUX_PKG_SRCDIR/zipalign
tar xf $ZIPALIGN_TARFILE
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS \
-isystem $AOSP_INCLUDE_DIR \
-std=c++11 \
ZipAlign.cpp ZipEntry.cpp ZipFile.cpp \
-landroid-cutils -landroid-utils -landroid-fw \
-lm -lz -llog \
-lzopfli \
-pie \
-o $TERMUX_PREFIX/bin/zipalign
# Remove this one for now:
rm -Rf $AOSP_INCLUDE_DIR
# Create an android.jar with AndroidManifest.xml and resources.arsc:
cd $TERMUX_PKG_TMPDIR
rm -rf android-jar
mkdir android-jar
cd android-jar
cp $ANDROID_HOME/platforms/android-28/android.jar .
unzip -q android.jar
mkdir -p $TERMUX_PREFIX/share/aapt
jar cfM $TERMUX_PREFIX/share/aapt/android.jar AndroidManifest.xml resources.arsc
}
================================================
FILE: packages/aapt/libbase-patch.txt
================================================
diff -u -r ../../libbase/logging.cpp ./logging.cpp
--- ../../libbase/logging.cpp 2016-09-01 11:56:01.000000000 -0400
+++ ./logging.cpp 2016-09-01 12:17:04.405086704 -0400
@@ -46,7 +46,6 @@
// Headers for LogMessage::LogLine.
#ifdef __ANDROID__
-#include
#include "cutils/log.h"
#else
#include
@@ -398,9 +397,6 @@
// Abort if necessary.
if (data_->GetSeverity() == FATAL) {
-#ifdef __ANDROID__
- android_set_abort_message(msg.c_str());
-#endif
abort();
}
}
================================================
FILE: packages/aapt/libcutils-patch.txt
================================================
https://android.googlesource.com/platform/system/core/+/84421d8475ca8262a914b3875ed110fc6187ee74
Add ioprio values directly.
The ioprio.h header is not a uapi header, so remove it's use and
add the two values that this code needs to use.
Bug: 30072483
Change-Id: I5c8b6f40bd60a43f50ac26792f96d2fa3f6db020
diff -u -r ../libcutils-orig/iosched_policy.c ./iosched_policy.c
--- ../libcutils-orig/iosched_policy.c 2017-06-28 13:45:36.296011839 +0200
+++ ./iosched_policy.c 2017-06-28 13:45:47.307888245 +0200
@@ -24,7 +24,8 @@
#include
#if defined(__ANDROID__)
-#include
+#define IOPRIO_WHO_PROCESS (1)
+#define IOPRIO_CLASS_SHIFT (13)
#include
#define __android_unused
#else
================================================
FILE: packages/aapt/libziparchive.patch.txt
================================================
Remove reference to __android_log_error_write which does not exist
on Android 5. See:
https://github.com/termux/termux-packages/issues/1306
diff -u -r ../../pristine-src/libziparchive/zip_archive.cc ./zip_archive.cc
--- ../../pristine-src/libziparchive/zip_archive.cc 2017-08-23 21:25:26.492287975 +0200
+++ ./zip_archive.cc 2017-08-23 21:31:15.904280978 +0200
@@ -272,11 +272,6 @@
if (static_cast(eocd->cd_start_offset) + eocd->cd_size > eocd_offset) {
ALOGW("Zip: bad offsets (dir %" PRIu32 ", size %" PRIu32 ", eocd %" PRId64 ")",
eocd->cd_start_offset, eocd->cd_size, static_cast(eocd_offset));
-#if defined(__ANDROID__)
- if (eocd->cd_start_offset + eocd->cd_size <= eocd_offset) {
- android_errorWriteLog(0x534e4554, "31251826");
- }
-#endif
return kInvalidOffset;
}
if (eocd->num_records == 0) {
@@ -388,9 +383,6 @@
for (uint16_t i = 0; i < num_entries; i++) {
if (ptr > cd_end - sizeof(CentralDirectoryRecord)) {
ALOGW("Zip: ran off the end (at %" PRIu16 ")", i);
-#if defined(__ANDROID__)
- android_errorWriteLog(0x534e4554, "36392138");
-#endif
return -1;
}
================================================
FILE: packages/aapt/log.h.patch.txt
================================================
--- log-orig.h 2017-03-04 02:11:04.589477520 +0100
+++ log.h 2017-03-04 02:11:54.556875283 +0100
@@ -217,7 +217,7 @@
*/
#ifndef SLOGV
#define __SLOGV(...) \
- ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
+ ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
#if LOG_NDEBUG
#define SLOGV(...) do { if (0) { __SLOGV(__VA_ARGS__); } } while (0)
#else
@@ -231,7 +231,7 @@
#else
#define SLOGV_IF(cond, ...) \
( (__predict_false(cond)) \
- ? ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
#endif
@@ -241,13 +241,13 @@
*/
#ifndef SLOGD
#define SLOGD(...) \
- ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
+ ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__))
#endif
#ifndef SLOGD_IF
#define SLOGD_IF(cond, ...) \
( (__predict_false(cond)) \
- ? ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -256,13 +256,13 @@
*/
#ifndef SLOGI
#define SLOGI(...) \
- ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__))
+ ((void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__))
#endif
#ifndef SLOGI_IF
#define SLOGI_IF(cond, ...) \
( (__predict_false(cond)) \
- ? ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -271,13 +271,13 @@
*/
#ifndef SLOGW
#define SLOGW(...) \
- ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__))
+ ((void)__android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__))
#endif
#ifndef SLOGW_IF
#define SLOGW_IF(cond, ...) \
( (__predict_false(cond)) \
- ? ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)__android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -286,13 +286,13 @@
*/
#ifndef SLOGE
#define SLOGE(...) \
- ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
+ ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
#endif
#ifndef SLOGE_IF
#define SLOGE_IF(cond, ...) \
( (__predict_false(cond)) \
- ? ((void)__android_log_buf_print(LOG_ID_SYSTEM, ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
================================================
FILE: packages/abduco/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.brain-dump.org/projects/abduco/
TERMUX_PKG_DESCRIPTION="Clean and simple terminal session manager"
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_VERSION=0.6
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://www.brain-dump.org/projects/abduco/abduco-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c90909e13fa95770b5afc3b59f311b3d3d2fdfae23f9569fa4f96a3e192a35f4
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="dvtm"
termux_step_pre_configure() {
CFLAGS+=" $CPPFLAGS"
}
================================================
FILE: packages/abook/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://abook.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Abook is a text-based addressbook program designed to use with mutt mail client"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.6.1
TERMUX_PKG_SHA256=f0a90df8694fb34685ecdd45d97db28b88046c15c95e7b0700596028bd8bc0f9
TERMUX_PKG_SRCURL=http://abook.sourceforge.net/devel/abook-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_DEPENDS="libandroid-support, ncurses, readline"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--mandir=$TERMUX_PREFIX/share/man"
termux_step_pre_configure() {
aclocal
automake --add-missing
autoreconf
}
================================================
FILE: packages/abook/database.h.patch
================================================
diff -u -r ../abook-0.6.0pre2/database.h ./database.h
--- ../abook-0.6.0pre2/database.h 2006-09-04 21:24:18.000000000 +0200
+++ ./database.h 2017-01-15 21:47:00.441932233 +0100
@@ -60,7 +60,7 @@
/*
* Field operations
*/
-inline int field_id(int i);
+int field_id(int i);
abook_field *find_standard_field(char *key, int do_declare);
abook_field *real_find_field(char *key, abook_field_list *list, int *nb);
#define find_field(key, list) real_find_field(key, list, NULL)
================================================
FILE: packages/abook/filter.c.patch
================================================
diff -u -r ../abook-0.6.0pre2/filter.c ./filter.c
--- ../abook-0.6.0pre2/filter.c 2006-09-06 01:26:10.000000000 -0400
+++ ./filter.c 2016-08-09 15:02:24.050415314 -0400
@@ -146,6 +146,9 @@
get_real_name()
{
char *username = getenv("USER");
+#ifdef __ANDROID__
+ return xstrdup(username);
+#else
struct passwd *pwent;
int rtn;
char *tmp;
@@ -161,6 +164,7 @@
return xstrdup(username);
} else
return tmp;
+#endif
}
/*
================================================
FILE: packages/ack-grep/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://beyondgrep.com/
TERMUX_PKG_DESCRIPTION="Tool like grep optimized for programmers"
TERMUX_PKG_LICENSE="Artistic-License-2.0"
TERMUX_PKG_VERSION=3.2.0
TERMUX_PKG_SRCURL=https://beyondgrep.com/ack-v${TERMUX_PKG_VERSION}
TERMUX_PKG_SHA256=dee06c35c2f432ceedf6b0dad6d393c946d49d51af4e1e031be13445a0e6ce55
TERMUX_PKG_DEPENDS="perl"
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install() {
termux_download \
$TERMUX_PKG_SRCURL \
$TERMUX_PREFIX/bin/ack \
$TERMUX_PKG_SHA256
touch $TERMUX_PREFIX/bin/ack
chmod +x $TERMUX_PREFIX/bin/ack
}
================================================
FILE: packages/acr/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://github.com/radare/acr
TERMUX_PKG_DESCRIPTION="A fully compatible autoconf replacement"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Plyushch "
TERMUX_PKG_VERSION=1.7.2
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://github.com/radare/acr/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=93571bc141b53f838fb40f6e53f958c56b6abf7520d151874e8707db7cb9c4c6
TERMUX_PKG_DEPENDS="dash"
TERMUX_PKG_BUILD_IN_SRC=true
================================================
FILE: packages/acr/no_dev-stderr.patch
================================================
diff -uNr acr-1.7.2/doc/developers/string-mode acr-1.7.2.mod/doc/developers/string-mode
--- acr-1.7.2/doc/developers/string-mode 2019-02-19 06:32:31.000000000 +0200
+++ acr-1.7.2.mod/doc/developers/string-mode 2019-10-29 02:54:47.891089384 +0200
@@ -20,7 +20,7 @@
wait_string_mode
# do whatever i want with the string
- echo "My string is: ${STRING}" >/dev/stderr
+ echo "My string is: ${STRING}" >/proc/self/fd/2
leave_string_mode
;;
diff -uNr acr-1.7.2/src/acr acr-1.7.2.mod/src/acr
--- acr-1.7.2/src/acr 2019-02-19 06:32:31.000000000 +0200
+++ acr-1.7.2.mod/src/acr 2019-10-29 02:55:12.247853031 +0200
@@ -93,7 +93,7 @@
break;
;;
"-D"|"--dist")
- echo "[1/4] Parsing configure.acr." >/dev/stderr
+ echo "[1/4] Parsing configure.acr." >/proc/self/fd/2
PBAR=1
MAKEDIST=1
NOPE=1
@@ -140,7 +140,7 @@
done
#if [ "`echo ${ACRFILE}|cut -c 1`" = "-" ]; then
-# echo "error: unknown flag '${ACRFILE}'." > /dev/stderr
+# echo "error: unknown flag '${ACRFILE}'." > /proc/self/fd/2
# exit 1
#fi
@@ -151,7 +151,7 @@
fi
if [ ! -f "${ACRFILE}" ]; then
- echo "error: file ${ACRFILE} not found" > /dev/stderr
+ echo "error: file ${ACRFILE} not found" > /proc/self/fd/2
exit 1
fi
diff -uNr acr-1.7.2/src/acr-cat acr-1.7.2.mod/src/acr-cat
--- acr-1.7.2/src/acr-cat 2019-02-19 06:32:31.000000000 +0200
+++ acr-1.7.2.mod/src/acr-cat 2019-10-29 02:55:54.901355928 +0200
@@ -47,18 +47,18 @@
fi
if [ ! -f "$1" ]; then
- echo "error: target file '$1' does not exist." > /dev/stderr
+ echo "error: target file '$1' does not exist." > /proc/self/fd/2
exit 1
fi
if [ ! -x "$1" ]; then
- echo "error: target file '$1' is not executable." > /dev/stderr
+ echo "error: target file '$1' is not executable." > /proc/self/fd/2
exit 1
fi
VERSION="`./${1} --version 2>/dev/null`"
if [ -z "`echo ${VERSION} | grep ACR`" ]; then
- echo "error: this is not an acr generated configure script." > /dev/stderr
+ echo "error: this is not an acr generated configure script." > /proc/self/fd/2
exit 1
fi
diff -uNr acr-1.7.2/src/amr acr-1.7.2.mod/src/amr
--- acr-1.7.2/src/amr 2019-02-19 06:32:31.000000000 +0200
+++ acr-1.7.2.mod/src/amr 2019-10-29 02:55:36.927951184 +0200
@@ -114,7 +114,7 @@
[ "$A" = "$FILE" ] && return
done
- echo "CInclude ${FILE} not found" > /dev/stderr
+ echo "CInclude ${FILE} not found" > /proc/self/fd/2
exit 1
}
@@ -124,7 +124,7 @@
[ "$A" = "$FILE" ] && return
done
- echo "CSource ${FILE} not found" > /dev/stderr
+ echo "CSource ${FILE} not found" > /proc/self/fd/2
exit 1
}
@@ -212,7 +212,7 @@
parse_configure_amr() {
FILE=$1
-echo "Parsing ${FILE}..." >/dev/stderr
+echo "Parsing ${FILE}..." >/proc/self/fd/2
CONFIGURE_AMR="`cat ${FILE} 2>/dev/null`"
for A in $CONFIGURE_AMR ; do
# TODO: Support for oneline commands and /* */
@@ -268,7 +268,7 @@
eval "${CDEPS_VAR}=\"\$${CDEPS_VAR} ${A}\""
;;
*|0)
- echo "Invalid keyword '$A'" > /dev/stderr
+ echo "Invalid keyword '$A'" > /proc/self/fd/2
exit 1
;;
esac
================================================
FILE: packages/algernon/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://algernon.roboticoverlords.org/
TERMUX_PKG_DESCRIPTION="Small self-contained web server with Lua, Markdown, QUIC, Redis and PostgreSQL support"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch "
TERMUX_PKG_VERSION=1.12.5
TERMUX_PKG_SRCURL=https://github.com/xyproto/algernon/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=b7fe682748e060c404aff5cbcbeca83feb9afb25de15c91a14c1fe78485b423b
termux_step_make() {
termux_setup_golang
export GOPATH=$TERMUX_PKG_BUILDDIR
mkdir -p "$GOPATH"/src/github.com/xyproto
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/xyproto/algernon
cd "$GOPATH"/src/github.com/xyproto/algernon
# Needed to deal with following error on v1.12.5:
# verifying github.com/lucas-clemente/quic-go@v0.12.0: checksum mismatch
rm -f go.sum
go build
}
termux_step_make_install() {
install -Dm700 \
"$GOPATH"/src/github.com/xyproto/algernon/algernon \
"$TERMUX_PREFIX"/bin/
# Offline samples may be useful to get started with Algernon.
rm -rf "$TERMUX_PREFIX"/share/doc/algernon
mkdir -p "$TERMUX_PREFIX"/share/doc/algernon
cp -a "$GOPATH"/src/github.com/xyproto/algernon/samples \
"$TERMUX_PREFIX"/share/doc/algernon/
}
================================================
FILE: packages/algernon/fix-hardcoded-paths.patch
================================================
diff -uNr algernon-1.12.3/engine/config.go algernon-1.12.3.mod/engine/config.go
--- algernon-1.12.3/engine/config.go 2019-02-19 17:14:55.000000000 +0200
+++ algernon-1.12.3.mod/engine/config.go 2019-02-25 19:41:17.564347427 +0200
@@ -273,16 +273,16 @@
defaultLimitString: strconv.Itoa(10),
// Default Bolt database file, for some operating systems
- defaultBoltFilename: "/tmp/algernon.db",
+ defaultBoltFilename: "@TERMUX_PREFIX@/tmp/algernon.db",
// Default log file, for some operating systems
- defaultLogFile: "/tmp/algernon.log",
+ defaultLogFile: "@TERMUX_PREFIX@/var/log/algernon.log",
// Default filename for a Lua script that provides data to a template
defaultLuaDataFilename: "data.lua",
// List of configuration filenames to check
- serverConfigurationFilenames: []string{"/etc/algernon/serverconf.lua", "/etc/algernon/server.lua"},
+ serverConfigurationFilenames: []string{"@TERMUX_PREFIX@/etc/algernon/serverconf.lua", "@TERMUX_PREFIX@/etc/algernon/server.lua"},
// Compression speed over compactness
cacheCompressionSpeed: true,
diff -uNr algernon-1.12.3/engine/flags.go algernon-1.12.3.mod/engine/flags.go
--- algernon-1.12.3/engine/flags.go 2019-02-19 17:14:55.000000000 +0200
+++ algernon-1.12.3.mod/engine/flags.go 2019-02-25 19:42:16.171195391 +0200
@@ -300,9 +300,9 @@
switch {
case ac.productionMode:
// Use system directories
- ac.serverDirOrFilename = "/srv/algernon"
- ac.serverCert = "/etc/algernon/cert.pem"
- ac.serverKey = "/etc/algernon/key.pem"
+ ac.serverDirOrFilename = "@TERMUX_PREFIX@/var/lib/algernon"
+ ac.serverCert = "@TERMUX_PREFIX@/etc/algernon/cert.pem"
+ ac.serverKey = "@TERMUX_PREFIX@/etc/algernon/key.pem"
ac.cacheMode = cachemode.Production
ac.serverMode = true
case ac.devMode:
diff -uNr algernon-1.12.3/engine/mime.go algernon-1.12.3.mod/engine/mime.go
--- algernon-1.12.3/engine/mime.go 2019-02-19 17:14:55.000000000 +0200
+++ algernon-1.12.3.mod/engine/mime.go 2019-02-25 19:42:57.227988150 +0200
@@ -6,5 +6,5 @@
func (ac *Config) initializeMime() {
// Read in the mimetype information from the system. Set UTF-8 when setting Content-Type.
- ac.mimereader = mime.New("/etc/mime.types", true)
+ ac.mimereader = mime.New("@TERMUX_PREFIX@/etc/mime.types", true)
}
diff -uNr algernon-1.12.3/vendor/github.com/go-sql-driver/mysql/dsn.go algernon-1.12.3.mod/vendor/github.com/go-sql-driver/mysql/dsn.go
--- algernon-1.12.3/vendor/github.com/go-sql-driver/mysql/dsn.go 2019-02-19 17:14:55.000000000 +0200
+++ algernon-1.12.3.mod/vendor/github.com/go-sql-driver/mysql/dsn.go 2019-02-25 20:31:01.069051948 +0200
@@ -88,7 +88,7 @@
case "tcp":
cfg.Addr = "127.0.0.1:3306"
case "unix":
- cfg.Addr = "/tmp/mysql.sock"
+ cfg.Addr = "@TERMUX_PREFIX@/tmp/mysql.sock"
default:
return errors.New("default addr for network '" + cfg.Net + "' unknown")
}
diff -uNr algernon-1.12.3/vendor/github.com/xyproto/gopher-lua/utils.go algernon-1.12.3.mod/vendor/github.com/xyproto/gopher-lua/utils.go
--- algernon-1.12.3/vendor/github.com/xyproto/gopher-lua/utils.go 2019-02-19 17:14:55.000000000 +0200
+++ algernon-1.12.3.mod/vendor/github.com/xyproto/gopher-lua/utils.go 2019-02-25 20:30:26.585626361 +0200
@@ -156,7 +156,7 @@
}
func popenArgs(arg string) (string, []string) {
- cmd := "/bin/sh"
+ cmd := "@TERMUX_PREFIX@/bin/sh"
args := []string{"-c"}
if LuaOS == "windows" {
cmd = "C:\\Windows\\system32\\cmd.exe"
================================================
FILE: packages/alpine/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://repo.or.cz/alpine.git
TERMUX_PKG_DESCRIPTION="Fast, easy to use email client"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=2.21.99999
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/alpine-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=229de9f673430190055207f8980205186ed6f73873f1ae6e1467d9d78e0f9dec
TERMUX_PKG_DEPENDS="libcrypt, ncurses, openssl-tool"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-debug
--with-c-client-target=lnx
--without-krb5
--without-ldap
--without-pthread
--without-tcl
--with-system-pinerc=${TERMUX_PREFIX}/etc/pine.conf
--with-passfile=$TERMUX_ANDROID_HOME/.pine-passfile
"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
export TCC=$CC
export TRANLIB=$RANLIB
export SPELLPROG=${TERMUX_PREFIX}/bin/hunspell
export alpine_SSLVERSION=old
export TPATH=$PATH
export LIBS="-lcrypt -llog"
# To get S_IREAD and friends:
CPPFLAGS+=" -D__USE_BSD"
cp $TERMUX_PKG_BUILDER_DIR/pine.conf $TERMUX_PREFIX/etc/pine.conf
touch $TERMUX_PKG_SRCDIR/imap/lnxok
}
termux_step_post_configure() {
cd pith
$CC_FOR_BUILD help_c_gen.c -o help_c_gen
$CC_FOR_BUILD help_h_gen.c -o help_h_gen
touch -d "next hour" help_c_gen help_h_gen
}
termux_step_create_debscripts() {
echo "#!$TERMUX_PREFIX/bin/sh" >> postinst
echo "if [ ! -e $TERMUX_ANDROID_HOME/.alpine-smime/.pwd/MasterPassword.crt ] && [ ! -e $HOME/.alpine-smime/.pwd/MasterPassword.key ]; then" >> postinst
echo "echo 'warning making a passwordless masterpasword file'" >> postinst
echo "mkdir -p \$HOME/.alpine-smime/public \$HOME/.alpine-smime/.pwd \$HOME/.alpine-smime/private \$HOME/.alpine-smime/ca" >> postinst
echo "openssl req -x509 -newkey rsa:2048 -keyout \$HOME/.alpine-smime/.pwd/MasterPassword.key -out \$HOME/.alpine-smime/.pwd/MasterPassword.crt -days 10000 -nodes -subj '/C=US/ST=dont/L=use/O=this Name/OU=for/CN=anything.com.termux'" >> postinst
echo "touch \$HOME/.pine-passfile" >> postinst
echo "fi" >> postinst
}
================================================
FILE: packages/alpine/configure.patch
================================================
diff -u -r ../alpine-2.21/configure ./configure
--- ../alpine-2.21/configure 2017-02-06 00:06:22.491217965 +0000
+++ ./configure 2017-06-14 23:28:28.132302332 +0000
@@ -17646,6 +17646,14 @@
fi
;;
+ *-*-*-android*)
+ alpine_SSLDIR="@TERMUX_PREFIX@/etc/tls"
+ alpine_SSLCERTS="$alpine_SSLDIR/certs"
+ alpine_SSLKEYS="$alpine_SSLDIR/private"
+ alpine_SSLINCLUDE="@TERMUX_PREFIX@/include/openssl"
+ alpine_SSLLIB="@TERMUX_PREFIX@/lib"
+ alpine_path_delim="/"
+ ;;
*-apple-darwin*)
systype="OSX"
alpine_path_delim="/"
================================================
FILE: packages/alpine/env_unix.c.patch
================================================
diff --git a/imap/src/osdep/unix/env_unix.c b/imap/src/osdep/unix/env_unix.c
index 89e5092..f5a734e 100644
--- a/imap/src/osdep/unix/env_unix.c
+++ b/imap/src/osdep/unix/env_unix.c
@@ -123,7 +123,7 @@ static char *lockpgm = LOCKPGM;
* systems.
*/
-static const char *tmpdir = "/tmp";
+static const char *tmpdir = "@TERMUX_PREFIX@/tmp";
/* Do not change shlock_mode. Doing so can cause mailbox corruption and
* denial of service. It also defeats the entire purpose of the shared
================================================
FILE: packages/alpine/fdstring.c.patch
================================================
--- ../fdstring.c 2016-12-10 08:02:12.555352750 +0000
+++ ./imap/src/osdep/unix/fdstring.c 2016-12-10 08:24:29.096929788 +0000
@@ -25,7 +25,7 @@
* Date: 15 April 1997
* Last Edited: 4 April 2007
*/
-
+#define L_SET SEEK_SET
#include "mail.h"
#include "osdep.h"
#include "misc.h"
================================================
FILE: packages/alpine/imap-src-osdep-unix-Makefile.patch
================================================
--- ../cache/alpine-2.20/imap/src/osdep/unix/Makefile 2015-01-12 05:12:25.505178442 +0000
+++ ./imap/src/osdep/unix/Makefile 2016-12-11 07:08:54.821695452 +0000
@@ -131,13 +131,8 @@
# Commands possibly overriden by the individual port
-
-ARRC=ar rc
-CC=cc
LN=ln -s
-RANLIB=ranlib
-
-
+AARC="ar rc"
# Standard distribution build parameters
DEFAULTAUTHENTICATORS=ext md5 pla log
@@ -513,8 +508,10 @@
SPOOLDIR=/var/spool \
ACTIVEFILE=/var/lib/news/active \
RSHPATH=/usr/bin/rsh \
- BASECFLAGS="$(GCCCFLAGS)"
-
+ CC=$(TCC) \
+ BASECFLAGS="$(GCCCFLAGS)" \
+ RANLIB="$(TRANLIB)"
+
lyn: # LynxOS
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
CRXTYPE=nfs \
@@ -869,8 +866,13 @@
all: $(ARCHIVE)
$(ARCHIVE): $(BINARIES)
- sh -c '$(RM) $(ARCHIVE) || true'
+ rm -rf client-a
+ { echo -n 'ar rc '; cat ARCHIVE; } >ARCHIVE.new
+ rm ARCHIVE
+ mv ARCHIVE.new ARCHIVE
+ chmod +x ARCHIVE
@$(CAT) ./ARCHIVE
+
@$(SH) ./ARCHIVE
.c.o:
================================================
FILE: packages/alpine/imapmkf.patch
================================================
--- ../cache/alpine-2.20/imap/Makefile 2015-01-12 05:12:25.521178518 +0000
+++ ./imap/Makefile 2016-12-11 06:43:56.986805502 +0000
@@ -457,7 +457,7 @@
# Linux shadow password support doesn't build on traditional systems, but most
# Linux systems are shadow these days.
-lnx: lnxnul an
+lnx: lnxok an
$(BUILD) BUILDTYPE=$@
lnxnul:
================================================
FILE: packages/alpine/mlockmake.patch
================================================
--- ../cache/alpine-2.21/imap/src/mlock/Makefile 2017-02-06 00:06:22.515218494 +0000
+++ ./imap/src/mlock/Makefile 2017-07-08 09:25:17.637293516 +0000
@@ -36,7 +36,7 @@
all: mlock
mlock: mlock.o
- $(CC) $(CFLAGS) -o mlock mlock.o
+ $(CC) $(CFLAGS) -o mlock mlock.o -llog
install: mlock
chgrp mail mlock
================================================
FILE: packages/alpine/mtest.c.patch
================================================
--- ../cache/alpine-2.21/imap/src/mtest/mtest.c 2017-02-06 00:06:22.499218141 +0000
+++ ./imap/src/mtest/mtest.c 2017-04-25 11:05:20.133809205 +0000
@@ -97,7 +97,7 @@
}
#endif
curusr = cpystr (((s = myusername ()) && *s) ? s : "somebody");
-#if UNIXLIKE
+#if UNIXLIKE && !defined __ANDROID__
{
char *suffix;
struct passwd *pwd = getpwnam (curusr);
================================================
FILE: packages/alpine/os_lnx.c.patch
================================================
diff -uNr alpine-2.21/imap/src/osdep/unix/os_lnx.c alpine-2.21.mod/imap/src/osdep/unix/os_lnx.c
--- alpine-2.21/imap/src/osdep/unix/os_lnx.c 2017-02-06 02:06:22.499218141 +0200
+++ alpine-2.21.mod/imap/src/osdep/unix/os_lnx.c 2018-07-03 21:08:21.624860068 +0300
@@ -35,7 +35,6 @@
#include
#include
#include
-extern int errno; /* just in case */
#include
#include "misc.h"
@@ -50,3 +49,7 @@
#include "tz_sv4.c"
#include "flocklnx.c"
#include "utime.c"
+long gethostid (void)
+{
+return 0xdeadface;
+}
================================================
FILE: packages/alpine/os_lnx.h.patch
================================================
--- ../cache/alpine-2.20/imap/src/osdep/unix/os_lnx.h 2015-01-12 05:12:25.505178442 +0000
+++ ./imap/src/osdep/unix/os_lnx.h 2016-12-10 23:21:20.644163814 +0000
@@ -48,13 +48,13 @@
#include
#include
-
/* Linux gets this wrong */
#define setpgrp setpgid
#define direct dirent
-
+#define L_SET SEEK_SET
+#define FNDELAY O_NDELAY
#define flock safe_flock
#define utime portable_utime
================================================
FILE: packages/alpine/pine.conf
================================================
#
# Alpine configuration file
#
# This file sets the configuration options used by Alpine and PC-Alpine. These
# options are usually set from within Alpine or PC-Alpine. There may be a
# system-wide configuration file which sets the defaults for some of the
# variables. On Unix, run alpine -conf to see how system defaults have been set.
# For variables that accept multiple values, list elements are separated by
# commas. A line beginning with a space or tab is considered to be a
# continuation of the previous line. For a variable to be unset its value must
# be blank. To set a variable to the empty string its value should be "".
# You can override system defaults by setting a variable to the empty string.
# Lines beginning with "#" are comments, and ignored by Alpine.
# Over-rides your full name from Unix password file. Required for PC-Alpine.
personal-name=
# Sets domain part of From: and local addresses in outgoing mail.
user-domain=
# List of SMTP servers for sending mail. If blank: Unix Alpine uses sendmail.
smtp-server=
# NNTP server for posting news. Also sets news-collections for news reading.
nntp-server=
# Path of (local or remote) INBOX, e.g. ={mail.somewhere.edu}inbox
# Normal Unix default is the local INBOX (usually /usr/spool/mail/$USER).
inbox-path=
# List of folder pairs; the first indicates a folder to archive, and the
# second indicates the folder read messages in the first should
# be moved to.
incoming-archive-folders=
# List of folders, assumed to be in first folder collection,
# offered for pruning each month. For example: mumble
pruned-folders=
# Over-rides default path for sent-mail folder, e.g. =old-mail (using first
# folder collection dir) or ={host2}sent-mail or ="" (to suppress saving).
# Default: sent-mail (Unix) or SENTMAIL.MTX (PC) in default folder collection.
default-fcc=
# Over-rides default path for saved-msg folder, e.g. =saved-messages (using 1st
# folder collection dir) or ={host2}saved-mail or ="" (to suppress saving).
# Default: saved-messages (Unix) or SAVEMAIL.MTX (PC) in default collection.
default-saved-msg-folder=
# Over-rides default path for postponed messages folder, e.g. =pm (which uses
# first folder collection dir) or ={host4}pm (using home dir on host4).
# Default: postponed-msgs (Unix) or POSTPOND.MTX (PC) in default fldr coltn.
postponed-folder=
# If set, specifies where already-read messages will be moved upon quitting.
read-message-folder=
# If set, specifies where form letters should be stored.
form-letter-folder=
# If set, specifies where trash is moved to in Web Alpine.
trash-folder=
# Contains the actual signature contents as opposed to the signature filename.
# If defined, this overrides the signature-file. Default is undefined.
literal-signature=
# Over-rides default path for signature file. Default is ~/.signature
signature-file=
# List of features; see Alpine's Setup/options menu for the current set.
# e.g. feature-list= select-without-confirm, signature-at-bottom
# Default condition for all of the features is no-.
feature-list=
# Alpine executes these keys upon startup (e.g. to view msg 13: i,j,1,3,CR,v)
initial-keystroke-list=
# Only show these headers (by default) when composing messages
default-composer-hdrs=
# Add these customized headers (and possible default values) when composing
customized-hdrs=
# When viewing messages, include this list of headers
viewer-hdrs=
# When viewing messages, number of blank spaces between left display edge and text
viewer-margin-left=
# When viewing messages, number of blank spaces between right display edge and text
viewer-margin-right=
# When viewing messages, number of lines of quote displayed before suppressing
quote-suppression-threshold=
# Determines default folder name for Saves...
# Choices: default-folder, by-sender, by-from, by-recipient, last-folder-used.
# Default: "default-folder", i.e. "saved-messages" (Unix) or "SAVEMAIL" (PC).
saved-msg-name-rule=
# Determines default name for Fcc...
# Choices: default-fcc, by-recipient, last-fcc-used.
# Default: "default-fcc" (see also "default-fcc=" variable.)
fcc-name-rule=
# Sets presentation order of messages in Index. Choices:
# Subject, From, Arrival, Date, Size, To, Cc, OrderedSubj, Score, and Thread.
# Order may be reversed by appending /Reverse. Default: "Arrival".
sort-key=
# Sets presentation order of address book entries. Choices: dont-sort,
# fullname-with-lists-last, fullname, nickname-with-lists-last, nickname
# Default: "fullname-with-lists-last".
addrbook-sort-rule=
# Sets presentation order of folder list entries. Choices: alphabetical,
# alpha-with-dirs-last, alpha-with-dirs-first.
# Default: "alpha-with-directories-last".
folder-sort-rule=
# Sets the default folder and collection offered at the Goto Command's prompt.
goto-default-rule=
# Sets message which cursor begins on. Choices: first-unseen, first-recent,
# first-important, first-important-or-unseen, first-important-or-recent,
# first, last. Default: "first-unseen".
incoming-startup-rule=
# Allows a default answer for the prune folder questions. Choices: yes-ask,
# yes-no, no-ask, no-no, ask-ask, ask-no. Default: "ask-ask".
pruning-rule=
# Controls behavior when reopening an already open folder.
folder-reopen-rule=
# Style that MESSAGE INDEX is displayed in when threading.
threading-display-style=
# Style of THREAD INDEX or default MESSAGE INDEX when threading.
threading-index-style=
# When threading, character used to indicate collapsed messages underneath.
threading-indicator-character=
# When threading, character used to indicate expanded messages underneath.
threading-expanded-character=
# When threading, character used to indicate this is the last reply
# to the parent of this message.
threading-lastreply-character=
# Reflects capabilities of the display you have.
# If unset, the default is taken from your locale. That is usually the right
# thing to use. Typical alternatives include UTF-8, ISO-8859-x, and EUC-JP
# (where x is a number between 1 and 9).
display-character-set=
# Reflects capabilities of the keyboard you have.
# If unset, the default is to use the same value
# used for the display-character-set.
keyboard-character-set=
# Defaults to UTF-8. This is used for outgoing messages.
# It is usually correct to leave this unset.
posting-character-set=
# Defaults to nothing, which is equivalent to US-ASCII. This is used for
# unlabeled incoming messages. It is ok to leave this unset but if you receive
# unlabeled mail that is usually in some known character set, set that here.
unknown-character-set=
# Specifies the program invoked by ^_ in the Composer,
# or the "enable-alternate-editor-implicitly" feature.
editor=
# Specifies the program invoked by ^T in the Composer.
speller=
# Specifies the column of the screen where the composer should wrap.
composer-wrap-column=
# Specifies the string to insert when replying to a message.
reply-indent-string=
# Specifies the introduction to insert when replying to a message.
reply-leadin=
# Specifies the string to replace quotes with when viewing a message.
quote-replace-string=
# When these characters appear in the middle of a word in the composer
# the forward word function will stop at the first text following (as happens
# with SPACE characters by default)
composer-word-separators=
# Specifies the string to use when sending a message with no to or cc.
empty-header-message=
# Program to view images (e.g. GIF or TIFF attachments).
image-viewer=
# If "user-domain" not set, strips hostname in FROM address. (Unix only)
use-only-domain-name=
# This variable takes a list of programs that message text is piped into
# after MIME decoding, prior to display.
display-filters=
# This defines a program that message text is piped into before MIME
# encoding, prior to sending
sending-filters=
# A list of alternate addresses the user is known by
alt-addresses=
# A list of keywords for use in categorizing messages
keywords=
# Characters which surround keywords in SUBJKEY token.
# Default is "{" "} "
keyword-surrounding-chars=
# Characters between subject and opening text in SUBJECTTEXT token.
# Default is " - "
opening-text-separator-chars=
# This is a list of formats for address books. Each entry in the list is made
# up of space-delimited tokens telling which fields are displayed and in
# which order. See help text
addressbook-formats=
# This gives a format for displaying the index. It is made
# up of space-delimited tokens telling which fields are displayed and in
# which order. See help text
index-format=
# The number of lines of overlap when scrolling through message text
viewer-overlap=
# Number of lines from top and bottom of screen where single
# line scrolling occurs.
scroll-margin=
# The number of seconds to sleep after writing a status message
status-message-delay=
# Number of times per-second to update busy cue messages
busy-cue-rate=
# UNIX ONLY (except MAC OSX): When an attachment is opened, this variable controls the number
#of seconds to wait between checks if the user has ended viewing the attachment.
#minimun value: 60 seconds, maximum value: 600 seconds (10 minutes). Default: 60 seconds
mailcap-check-interval=
# The approximate number of seconds between checks for new mail
mail-check-interval=
# The approximate number of seconds between checks for new mail in folders
# other than the current folder and inbox.
# Default is same as mail-check-interval
mail-check-interval-noncurrent=
# The minimum number of seconds between checks for new mail in a Mail Drop.
# This is always effectively at least as large as the mail-check-interval
maildrop-check-minimum=
# For newsgroups accessed using NNTP, only messages numbered in the range
# lastmsg-range+1 to lastmsg will be considered
nntp-range=
# Full path and name of NEWSRC file
newsrc-path=
# Path and filename of news configuration's active file.
# The default is typically "/usr/lib/news/active".
news-active-file-path=
# Directory containing system's news data.
# The default is typically "/usr/spool/news"
news-spool-directory=
# Path and filename of the program used to upload text from your terminal
# emulator's into Alpine's composer.
upload-command=
# Text sent to terminal emulator prior to invoking the program defined by
# the upload-command variable.
# Note: _FILE_ will be replaced with the temporary file used in the upload.
upload-command-prefix=
# Path and filename of the program used to download text via your terminal
# emulator from Alpine's export and save commands.
download-command=
# Text sent to terminal emulator prior to invoking the program defined by
# the download-command variable.
# Note: _FILE_ will be replaced with the temporary file used in the download.
download-command-prefix=
# Sets the search path for the mailcap configuration file.
# NOTE: colon delimited under UNIX, semi-colon delimited under DOS/Windows/OS2.
mailcap-search-path=
# Sets the search path for the mimetypes configuration file.
# NOTE: colon delimited under UNIX, semi-colon delimited under DOS/Windows/OS2.
mimetype-search-path=
# List of programs to open Internet URLs (e.g. http or ftp references).
url-viewers=
# The maximum number of non-stayopen remote connections that Alpine will use
max-remote-connections=
# A list of folders that should be left open once opened (INBOX is implicit)
stay-open-folders=
# Sets the time in seconds that Alpine will attempt to open a network
# connection when checking for new unseen messages in an incoming folder.
# The default is 5.
incoming-check-timeout=
# Sets the approximate number of seconds between checks for unseen messages
# in incoming folders. The default is 180.
incoming-check-interval=
# Sets the approximate number of seconds between checks for unseen messages
# for other than local or IMAP folders. The default is 180.
incoming-check-interval-secondary=
# List of incoming folders to check for unseen messages. The default if left
# blank is to check all incoming folders.
incoming-check-list=
# Specifies the number of dead letter files to keep when canceling.
dead-letter-files=
# Sets the filename for the newmail fifo (named pipe). Unix only.
newmail-fifo-path=
# Sets the width for the NewMail screen.
newmail-window-width=
# List of incoming msg folders besides INBOX, e.g. ={host2}inbox, {host3}inbox
# Syntax: optnl-label {optnl-imap-host-name}folder-path
incoming-folders=
# List of directories where saved-message folders may be. First one is
# the default for Saves. Example: Main {host1}mail/[], Desktop mail\[]
# Syntax: optnl-label {optnl-imap-hostname}optnl-directory-path[]
folder-collections=
# List, only needed if nntp-server not set, or news is on a different host
# than used for NNTP posting. Examples: News *[] or News *{host3/nntp}[]
# Syntax: optnl-label *{news-host/protocol}[]
news-collections=
# List of file or path names for personal addressbook(s).
# Default: ~/.addressbook (Unix) or \PINE\ADDRBOOK (PC)
# Syntax: optnl-label path-name
address-book=
# List of file or path names for global/shared addressbook(s).
# Default: none
# Syntax: optnl-label path-name
global-address-book=
# Set by Alpine; controls beginning-of-month sent-mail pruning.
last-time-prune-questioned=117.4
# Set by Alpine; controls display of "new version" message.
last-version-used=6.20
# This names the path to an alternative program, and any necessary arguments,
# to be used in posting mail messages. Example:
# /usr/lib/sendmail -oem -t -oi
# or,
# /usr/local/bin/sendit.sh
# The latter a script found in Alpine distribution's contrib/util directory.
# NOTE: The program MUST read the message to be posted on standard input,
# AND operate in the style of sendmail's "-t" option.
sendmail-path=
# This names the root of the tree to which the user is restricted when reading
# and writing folders and files. For example, on Unix ~/work confines the
# user to the subtree beginning with their work subdirectory.
# (Note: this alone is not sufficient for preventing access. You will also
# need to restrict shell access and so on, see Alpine Technical Notes.)
# Default: not set (so no restriction)
operating-dir=
# If no user input for this many hours, Alpine will exit if in an idle loop
# waiting for a new command. If set to zero (the default), then there will
# be no timeout.
user-input-timeout=
# Sets the time in seconds that Alpine will attempt to open a network
# connection. The default is 30, the minimum is 5, and the maximum is
# system defined (typically 75).
tcp-open-timeout=
# Network read warning timeout. The default is 15, the minimum is 5, and the
# maximum is 1000.
tcp-read-warning-timeout=
# Network write warning timeout. The default is 0 (unset), the minimum
# is 5 (if not 0), and the maximum is 1000.
tcp-write-warning-timeout=
# If this much time has elapsed at the time of a tcp read or write
# timeout, Alpine will ask if you want to break the connection.
# Default is 60 seconds, minimum is 5, maximum is 1000.
tcp-query-timeout=
# Sets the format of the command used to open a UNIX remote
# shell connection. The default is "%s %s -l %s exec /etc/r%sd"
# NOTE: the 4 (four) "%s" entries MUST exist in the provided command
# where the first is for the command's path, the second is for the
# host to connect to, the third is for the user to connect as, and the
# fourth is for the connection method (typically "imap")
rsh-command=
# Sets the name of the command used to open a UNIX remote shell connection.
# The default is typically /usr/ucb/rsh.
rsh-path=
# Sets the time in seconds that Alpine will attempt to open a UNIX remote
# shell connection. The default is 15, min is 5, and max is unlimited.
# Zero disables rsh altogether.
rsh-open-timeout=
# Sets the format of the command used to open a UNIX secure
# shell connection. The default is "%s %s -l %s exec /etc/r%sd"
# NOTE: the 4 (four) "%s" entries MUST exist in the provided command
# where the first is for the command's path, the second is for the
# host to connect to, the third is for the user to connect as, and the
# fourth is for the connection method (typically "imap")
ssh-command=
# Sets the name of the command used to open a UNIX secure shell connection.
# Typically this is /usr/bin/ssh.
ssh-path=
# Sets the time in seconds that Alpine will attempt to open a UNIX secure
# shell connection. The default is 15, min is 5, and max is unlimited.
# Zero disables ssh altogether.
ssh-open-timeout=
# Sets the version number Alpine will use as a threshold for offering
# its new version message on startup.
new-version-threshold=
# List of mail drivers to disable.
disable-these-drivers=
# List of SASL authenticators to disable.
disable-these-authenticators=
# Set by Alpine; contains data for caching remote address books.
remote-abook-metafile=
# How many extra copies of remote address book should be kept. Default: 3
remote-abook-history=
# Minimum number of minutes between checks for remote address book changes.
# 0 means never check except when opening a remote address book.
# -1 means never check. Default: 5
remote-abook-validity=
# Your default printer selection
printer=
# List of special print commands
personal-print-command=
# Which category default print command is in
personal-print-category=
# Patterns and their actions are stored here.
patterns-roles=
# Patterns and their actions are stored here.
patterns-filters2=
# Patterns and their actions are stored here.
patterns-scores2=
# Patterns and their actions are stored here.
patterns-indexcolors=
# Patterns and their actions are stored here.
patterns-other=
# Patterns and their actions are stored here.
patterns-search=
# Controls display of color
color-style=force-xterm-256color
# Controls display of color for current index line
current-indexline-style=flip-colors
# Controls display of color for the titlebar at top of screen
titlebar-color-style=
# Choose: black, blue, green, cyan, red, magenta, yellow, or white.
normal-foreground-color=
normal-background-color=
reverse-foreground-color=
reverse-background-color=
title-foreground-color=
title-background-color=
title-closed-foreground-color=
title-closed-background-color=
folder-foreground-color=
folder-background-color=
directory-foreground-color=
directory-background-color=
folder-list-text-foreground-color=
folder-list-text-background-color=
status-foreground-color=
status-background-color=
keylabel-foreground-color=
keylabel-background-color=
keyname-foreground-color=
keyname-background-color=
selectable-item-foreground-color=
selectable-item-background-color=
meta-message-foreground-color=
meta-message-background-color=
quote1-foreground-color=
quote1-background-color=
quote2-foreground-color=
quote2-background-color=
quote3-foreground-color=
quote3-background-color=
incoming-unseen-foreground-color=
incoming-unseen-background-color=
signature-foreground-color=
signature-background-color=
prompt-foreground-color=
prompt-background-color=
header-general-foreground-color=
header-general-background-color=
index-to-me-foreground-color=
index-to-me-background-color=
index-important-foreground-color=
index-important-background-color=
index-deleted-foreground-color=
index-deleted-background-color=
index-answered-foreground-color=
index-answered-background-color=
index-new-foreground-color=
index-new-background-color=
index-recent-foreground-color=
index-recent-background-color=
index-forward-foreground-color=
index-forward-background-color=
index-unseen-foreground-color=
index-unseen-background-color=
index-highpriority-foreground-color=
index-highpriority-background-color=
index-lowpriority-foreground-color=
index-lowpriority-background-color=
index-arrow-foreground-color=
index-arrow-background-color=
index-subject-foreground-color=
index-subject-background-color=
index-from-foreground-color=
index-from-background-color=
index-opening-foreground-color=
index-opening-background-color=
# Colors in which tokens will be displayed in the index screen
index-token-colors=
# When viewing messages, these are the header colors
viewer-hdr-colors=
# Colors used to display keywords in the index
keyword-colors=
# RSS News feed
rss-news=
# RSS Weather feed
rss-weather=
# Web Alpine index table row height
wp-indexheight=
# Web Alpine number of index lines in table
wp-indexlines=
# Web Alpine aggregate operations tab state
wp-aggstate=
# Web Alpine various aspects of cross-session state
wp-state=
# Web Alpine preferred width for message display in characters
wp-columns=
# Public certificates are kept in files in this directory. The files should
# contain certificates in PEM format. The name of each file should look
# like .crt. The default directory is .alpine-smime/public.
smime-public-cert-directory=
# If this option is set then public certificates are kept in a single container
# "file" similar to a remote configuration file instead of in the
# smime-publiccert-directory. The value can be a remote or local folder
# specification like for a non-standard pinerc value. The default
# is that it is not set.
smime-public-cert-container=
# Private keys are kept in files in this directory. The files are in PEM format.
# The name of a file should look like .key.
# The default directory is .alpine-smime/private.
smime-private-key-directory=
# If this option is set then private keys are kept in a single container
# "file" similar to a remote configuration file instead of in the
# private-key-directory. The value can be a remote or local folder
# specification like for a non-standard pinerc value. The default
# is that it is not set.
smime-private-key-container=
# Certificate Authority certificates (in addition to the normal CACerts for the
# system) are kept in files in this directory. The files are in PEM format.
# Filenames should end with .crt. The default directory is .alpine-smime/ca.
smime-cacert-directory=
# If this option is set then CAcerts are kept in a single container
# "file" similar to a remote configuration file instead of in the
# ca-cert-directory. The value can be a remote or local folder
# specification like for a non-standard pinerc value. The default
# is that it is not set.
smime-cacert-container=
# LDAP servers for looking up addresses.
ldap-servers=
================================================
FILE: packages/alpine/pw_stuff.c.patch
================================================
--- ../cache/alpine-2.20/pith/osdep/pw_stuff.c 2015-01-12 05:12:25.588178837 +0000
+++ ./pith/osdep/pw_stuff.c 2016-12-11 21:24:31.283700286 +0000
@@ -103,12 +103,6 @@
len = strlen(fname_to_utf8(unix_pwd->pw_name));
ui->login = (char *) malloc((len+1) * sizeof(char));
snprintf(ui->login, len+1, "%s", fname_to_utf8(unix_pwd->pw_name));
-
- if((s = gcos_name(unix_pwd->pw_gecos, unix_pwd->pw_name)) != NULL){
- len = strlen(fname_to_utf8(s));
- ui->fullname = (char *) malloc((len+1) * sizeof(char));
- snprintf(ui->fullname, len+1, "%s", fname_to_utf8(s));
- }
}
#else /* _WINDOWS */
@@ -190,12 +184,6 @@
if(pw != NULL){
char *gn, *s = NULL;
size_t l;
-
- if((gn = gcos_name(pw->pw_gecos, name)) != NULL
- && (s = (char *) malloc(l = ((strlen(gn) + 1) * sizeof(char)))) != NULL)
- snprintf(s, l, "%s", gn);
-
- return(s);
}
else
return((char *) NULL);
================================================
FILE: packages/antiword/Makefile.Linux.patch
================================================
diff -uNr antiword-0.37/Makefile.Linux antiword-0.37.mod/Makefile.Linux
--- antiword-0.37/Makefile.Linux 2005-10-29 20:13:15.000000000 +0300
+++ antiword-0.37.mod/Makefile.Linux 2019-02-25 22:05:02.764208927 +0200
@@ -2,8 +2,8 @@
# Makefile for antiword (Linux version)
#
-CC = gcc
-LD = gcc
+CC ?= gcc
+LD = $(CC)
INSTALL = cp -f
INSTALL_PROGRAM = $(INSTALL)
@@ -12,12 +12,11 @@
# must be equal to DEBUG or NDEBUG
DB = NDEBUG
# Optimization: -O or debugging: -g
-OPT = -O2
+OPT =
LDLIBS =
-CFLAGS = -Wall -pedantic $(OPT) -D$(DB)
-LDFLAGS =
+CFLAGS += -Wall -pedantic $(OPT) -D$(DB)
OBJS =\
main_u.o asc85enc.o blocklist.o chartrans.o datalist.o depot.o\
@@ -36,8 +36,8 @@
LOCAL_INSTALL_DIR = $(HOME)/bin
LOCAL_RESOURCES_DIR = $(HOME)/.antiword
-GLOBAL_INSTALL_DIR = /usr/local/bin
-GLOBAL_RESOURCES_DIR = /usr/share/antiword
+GLOBAL_INSTALL_DIR = @TERMUX_PREFIX@/bin
+GLOBAL_RESOURCES_DIR = @TERMUX_PREFIX@/share/antiword
all: $(PROGS)
================================================
FILE: packages/antiword/antiword.h.patch
================================================
diff -uNr antiword-0.37/antiword.h antiword-0.37.mod/antiword.h
--- antiword-0.37/antiword.h 2005-07-06 20:46:22.000000000 +0300
+++ antiword-0.37.mod/antiword.h 2019-03-05 19:51:12.173846939 +0200
@@ -204,7 +204,7 @@
#define ANTIWORD_DIR "antiword"
#define FONTNAMES_FILE "fontname.txt"
#elif defined(__vms)
-#define GLOBAL_ANTIWORD_DIR "/usr/share/antiword"
+#define GLOBAL_ANTIWORD_DIR "@TERMUX_PREFIX@/share/antiword"
#define ANTIWORD_DIR "antiword"
#define FONTNAMES_FILE "fontnames"
#elif defined(__BEOS__)
@@ -224,7 +224,7 @@
#define ANTIWORD_DIR ".antiword"
#define FONTNAMES_FILE "fontnames"
#else /* All others */
-#define GLOBAL_ANTIWORD_DIR "/usr/share/antiword"
+#define GLOBAL_ANTIWORD_DIR "@TERMUX_PREFIX@/share/antiword"
#define ANTIWORD_DIR ".antiword"
#define FONTNAMES_FILE "fontnames"
#endif /* __dos */
================================================
FILE: packages/antiword/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://www.winfield.demon.nl/
TERMUX_PKG_DESCRIPTION="A free MS Word reader"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Plyushch "
TERMUX_PKG_VERSION=0.37
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://www.winfield.demon.nl/linux/antiword-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=8e2c000fcbc6d641b0e6ff95e13c846da3ff31097801e86702124a206888f5ac
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_MAKE_INSTALL_TARGET="global_install"
TERMUX_PKG_RM_AFTER_INSTALL="bin/kantiword"
================================================
FILE: packages/apache2/Termux.layout
================================================
# Termux layout
prefix:
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/bin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/libexec/apache2
mandir: ${exec_prefix}/share/man
sysconfdir: ${prefix}/etc/apache2
datadir: ${exec_prefix}/share/apache2
iconsdir: ${datadir}/icons
htdocsdir: ${prefix}/share/apache2/default-site/htdocs
manualdir: ${htdocsdir}/manual
cgidir: ${prefix}/lib/cgi-bin
includedir: ${exec_prefix}/include/apache2
localstatedir: ${prefix}/var/lock/apache2
runtimedir: ${prefix}/var/run/apache2
logfiledir: ${prefix}/var/log/apache2
proxycachedir: ${prefix}/var/cache/apache2/proxy
infodir: ${exec_prefix}/share/info
installbuilddir: ${prefix}/share/apache2/build
errordir: ${datadir}/error
================================================
FILE: packages/apache2/build-instdso.sh.patch
================================================
diff -u -r ../httpd-2.4.38/build/instdso.sh ./build/instdso.sh
--- ../httpd-2.4.38/build/instdso.sh 2011-03-04 18:58:38.000000000 +0000
+++ ./build/instdso.sh 2019-03-17 23:43:43.407027928 +0000
@@ -59,6 +59,12 @@
esac
CMD="$SH_LIBTOOL --mode=install $INSTALL_CMD $DSOARCHIVE $TARGETDIR/"
+# Prefixing with bash below simplifies cross compiling setup where
+# $SH_LIBTOOL may have wrong shebang:
+case "$SH_LIBTOOL" in
+ bash*) ;;
+ *) CMD="bash $CMD" ;;
+esac
echo $CMD
$CMD || exit $?
================================================
FILE: packages/apache2/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://httpd.apache.org
TERMUX_PKG_DESCRIPTION="Apache Web Server"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=2.4.41
TERMUX_PKG_SHA256=133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40
TERMUX_PKG_SRCURL=https://www.apache.org/dist/httpd/httpd-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_DEPENDS="apr, apr-util, pcre, openssl, libcrypt, libandroid-support, libnghttp2, libexpat, libuuid, zlib"
TERMUX_PKG_BREAKS="apache2-dev"
TERMUX_PKG_REPLACES="apache2-dev"
TERMUX_PKG_CONFFILES="
etc/apache2/httpd.conf
etc/apache2/extra/httpd-autoindex.conf
etc/apache2/extra/httpd-dav.conf
etc/apache2/extra/httpd-default.conf
etc/apache2/extra/httpd-info.conf
etc/apache2/extra/httpd-languages.conf
etc/apache2/extra/httpd-manual.conf
etc/apache2/extra/httpd-mpm.conf
etc/apache2/extra/httpd-multilang-errordoc.conf
etc/apache2/extra/httpd-ssl.conf
etc/apache2/extra/httpd-userdir.conf
etc/apache2/extra/httpd-vhosts.conf
etc/apache2/extra/proxy-html.conf
etc/apache2/mime.types
etc/apache2/magic
"
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
# providing manual paths to libs because it picks up host libs on some systems
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-apr=$TERMUX_PREFIX
--with-apr-util=$TERMUX_PREFIX
--with-pcre=$TERMUX_PREFIX
--enable-suexec
--enable-layout=Termux
--enable-so
--enable-authnz-fcgi
--enable-cache
--enable-disk-cache
--enable-mem-cache
--enable-file-cache
--enable-ssl
--with-ssl
--enable-deflate
--enable-cgi
--enable-cgid
--enable-proxy
--enable-proxy-connect
--enable-proxy-http
--enable-proxy-ftp
--enable-dbd
--enable-imagemap
--enable-ident
--enable-cern-meta
--enable-http2
--enable-mpms-shared=all
--enable-modules=all
--enable-mods-shared=all
--disable-brotli
--disable-lua
--disable-mods-static
--disable-md
--with-port=8080
--with-sslport=8443
--enable-unixd
--without-libxml2
--libexecdir=$TERMUX_PREFIX/libexec/apache2
ac_cv_func_getpwnam=yes
ac_cv_have_threadsafe_pollset=no
"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_RM_AFTER_INSTALL="share/apache2/manual etc/apache2/original share/man/man8/suexec.8 libexec/httpd.exp"
TERMUX_PKG_EXTRA_MAKE_ARGS="-s"
termux_step_pre_configure() {
# Certain packages are not safe to build on device because their
# build.sh script deletes specific files in $TERMUX_PREFIX.
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi
# remove old files
rm -rf "$TERMUX_PREFIX"/{libexec,share,etc}/apache2
rm -rf "$TERMUX_PREFIX"/lib/cgi-bin
if [ $TERMUX_ARCH_BITS -eq 32 ]; then
export ap_cv_void_ptr_lt_long=4
else
export ap_cv_void_ptr_lt_long=8
fi
LDFLAGS="$LDFLAGS -llog -lapr-1 -laprutil-1"
# use custom layout
cat $TERMUX_PKG_BUILDER_DIR/Termux.layout > $TERMUX_PKG_SRCDIR/config.layout
}
termux_step_post_configure() {
# thanks to @JetBalsa
gcc -O2 -DCROSS_COMPILE $TERMUX_PKG_SRCDIR/server/gen_test_char.c -o $TERMUX_PKG_BUILDDIR/server/gen_test_char
touch -d "1 hour" $TERMUX_PKG_BUILDDIR/server/gen_test_char
}
termux_step_post_make_install() {
sed -e "s#/$TERMUX_PREFIX/libexec/apache2/#modules/#" \
-e 's|#\(LoadModule negotiation_module \)|\1|' \
-e 's|#\(LoadModule include_module \)|\1|' \
-e 's|#\(LoadModule userdir_module \)|\1|' \
-e 's|#\(LoadModule slotmem_shm_module \)|\1|' \
-e 's|#\(Include extra/httpd-multilang-errordoc.conf\)|\1|' \
-e 's|#\(Include extra/httpd-autoindex.conf\)|\1|' \
-e 's|#\(Include extra/httpd-languages.conf\)|\1|' \
-e 's|#\(Include extra/httpd-userdir.conf\)|\1|' \
-e 's|#\(Include extra/httpd-default.conf\)|\1|' \
-e 's|#\(Include extra/httpd-mpm.conf\)|\1|' \
-e 's|User daemon|#User daemon|' \
-e 's|Group daemon|#Group daemon|' \
-i "$TERMUX_PREFIX/etc/apache2/httpd.conf"
}
termux_step_post_massage() {
# sometimes it creates a $TERMUX_PREFIX/bin/sh -> /bin/sh
rm ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/bin/sh || true
mkdir -p ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/var/run/apache2
mkdir -p ${TERMUX_PKG_MASSAGEDIR}${TERMUX_PREFIX}/var/log/apache2
}
================================================
FILE: packages/apache2/configure.patch
================================================
diff -u -r ../httpd-2.4.38/configure ./configure
--- ../httpd-2.4.38/configure 2019-01-17 18:46:19.000000000 +0000
+++ ./configure 2019-03-17 23:05:48.786527661 +0000
@@ -6401,7 +6401,7 @@
LTFLAGS='--silent'
fi
my_libtool=`$apr_config --apr-libtool`
- LIBTOOL="$my_libtool \$(LTFLAGS)"
+ LIBTOOL="bash $my_libtool \$(LTFLAGS)"
- libtoolversion=`$my_libtool --version`
+ libtoolversion=`bash $my_libtool --version`
case $libtoolversion in
*1.[45]* | *[2-9].[0-9]*)
================================================
FILE: packages/apg/Makefile.patch
================================================
diff -uNr apg-2.3.0b/Makefile apg-2.3.0b.mod/Makefile
--- apg-2.3.0b/Makefile 2003-08-07 18:40:39.000000000 +0300
+++ apg-2.3.0b.mod/Makefile 2019-05-20 02:04:28.641201031 +0300
@@ -1,19 +1,19 @@
##################################################################
# Directories
# Install dirs
-INSTALL_PREFIX = /usr/local
+INSTALL_PREFIX = @TERMUX_PREFIX@
# Full default path is /usr/local/bin
APG_BIN_DIR = /bin
# Full default path is /usr/local/man/man1
-APG_MAN_DIR = /man/man1
+APG_MAN_DIR = /share/man/man1
# Full default path is /usr/local/sbin
-APGD_BIN_DIR = /sbin
+APGD_BIN_DIR = $(APG_BIN_DIR)
# Full default path is /usr/local/man/man8
-APGD_MAN_DIR = /man/man8
+APGD_MAN_DIR = /share/man/man8
# You should not edit 2 lines below
APGBFM_CLIBS = -lm
@@ -35,7 +35,7 @@
# This works on MacOS X
#
STANDALONE_OPTIONS += -DAPG_USE_CRYPT
-APG_CLIBS += -lcrypt
+APG_CLIBS += -L@TERMUX_PREFIX@/lib -lcrypt
##################################################################
# Support for cracklib
@@ -60,12 +60,12 @@
##################################################################
# You can modify CC variable if you have compiler other than GCC
# But the code was designed and tested with GCC
-CC = gcc
+CC ?= gcc
##################################################################
# Compilation flags
# You should comment the line below for AIX+native cc
-CFLAGS = -Wall
+CFLAGS = -Wall -I@TERMUX_PREFIX@/include -Wl,-rpath=@TERMUX_PREFIX@/lib -Wl,--enable-new-dtags
####################################################################
# If you plan to install APG daemon you should look at lines below #
================================================
FILE: packages/apg/build.sh
================================================
## Note: APG project seems dead. Official homepage & src urls
## disappeared.
TERMUX_PKG_HOMEPAGE=http://www.adel.nursat.kz/apg/index.shtml
TERMUX_PKG_DESCRIPTION="Automated Password Generator"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="Leonid Plyushch "
TERMUX_PKG_VERSION=2.3.0b
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/apg-2.3.0b.tar.gz
TERMUX_PKG_SHA256=d1e52029709e2d7f9cb99bedce3e02ee7a63cff7b8e2b4c2bc55b3dc03c28b92
TERMUX_PKG_DEPENDS="libcrypt"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_post_extract_package() {
# Fix permissions.
find "$TERMUX_PKG_SRCDIR" -type d -exec chmod 700 "{}" \;
find "$TERMUX_PKG_SRCDIR" -type f -executable -exec chmod 700 "{}" \;
find "$TERMUX_PKG_SRCDIR" -type f ! -executable -exec chmod 600 "{}" \;
}
================================================
FILE: packages/apg/install-sh.patch
================================================
diff -uNr apg-2.2.3/install-sh apg-2.2.3.mod/install-sh
--- apg-2.2.3/install-sh 2003-08-07 18:40:30.000000000 +0300
+++ apg-2.2.3.mod/install-sh 2019-01-28 21:07:56.823960998 +0200
@@ -35,9 +35,9 @@
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
+chownprog="${CHOWNPROG-true}"
+chgrpprog="${CHGRPPROG-true}"
+stripprog="${STRIPPROG-true}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
================================================
FILE: packages/apksigner/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://github.com/fornwall/apksigner
TERMUX_PKG_DESCRIPTION="APK signing tool"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=0.7
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=340560c4f75af3501f037452bcf184fa48fd18bc877a4cce9a51a3fa047b4b38
TERMUX_PKG_SRCURL=https://github.com/fornwall/apksigner/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make() {
mkdir -p $TERMUX_PREFIX/share/{dex,man/man1}
cp apksigner.1 $TERMUX_PREFIX/share/man/man1/
GRADLE_OPTS=" -Dorg.gradle.daemon=false" ./gradlew
$TERMUX_D8 \
--classpath $ANDROID_HOME/platforms/android-$TERMUX_PKG_API_LEVEL/android.jar \
--release \
--min-api $TERMUX_PKG_API_LEVEL \
--output $TERMUX_PKG_TMPDIR \
./build/libs/src-all.jar
cd $TERMUX_PKG_TMPDIR
jar cf apksigner.jar classes.dex
mv apksigner.jar $TERMUX_PREFIX/share/dex/apksigner.jar
echo '#!/bin/sh' > $TERMUX_PREFIX/bin/apksigner
echo "dalvikvm -cp $TERMUX_PREFIX/share/dex/apksigner.jar net.fornwall.apksigner.Main \$@" >> $TERMUX_PREFIX/bin/apksigner
chmod +x $TERMUX_PREFIX/bin/apksigner
}
================================================
FILE: packages/apr/Makefile.in.patch
================================================
diff -u -r ../apr-1.5.2/Makefile.in ./Makefile.in
--- ../apr-1.5.2/Makefile.in 2014-04-25 06:51:11.000000000 -0400
+++ ./Makefile.in 2015-05-03 19:04:44.159616097 -0400
@@ -134,8 +134,9 @@
$(APR_MKDIR) tools
$(LT_COMPILE)
-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
+tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
+ $(CC_FOR_BUILD) -DCROSS_COMPILE -o $@ $<
+
include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
$(APR_MKDIR) include/private
================================================
FILE: packages/apr/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://apr.apache.org/
TERMUX_PKG_DESCRIPTION="Apache Portable Runtime Library"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=1.7.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://apache.mirrors.spacedump.net/apr/apr-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
TERMUX_PKG_DEPENDS="libuuid"
TERMUX_PKG_BREAKS="apr-dev"
TERMUX_PKG_REPLACES="apr-dev"
TERMUX_PKG_BUILD_IN_SRC=true
# "ac_cv_search_crypt=" to avoid needlessly linking to libcrypt.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-installbuilddir=$TERMUX_PREFIX/share/apr-1/build
ac_cv_func_getrandom=no
ac_cv_have_decl_SYS_getrandom=no
ac_cv_file__dev_zero=yes
ac_cv_func_setpgrp_void=yes
apr_cv_process_shared_works=no
apr_cv_tcp_nodelay_with_cork=yes
ac_cv_sizeof_struct_iovec=$(( TERMUX_ARCH_BITS==32 ? 8 : 16 ))
ac_cv_search_crypt="
TERMUX_PKG_RM_AFTER_INSTALL="lib/apr.exp"
termux_step_post_make_install() {
sed -i "s%NM=\".*%NM=\"${TERMUX_HOST_PLATFORM}-nm -B\"%g" $TERMUX_PREFIX/share/apr-1/build/libtool
}
================================================
FILE: packages/apr-util/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://apr.apache.org/
TERMUX_PKG_DESCRIPTION="Apache Portable Runtime Utility Library"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=1.6.1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=d3e12f7b6ad12687572a3a39475545a072608f4ba03a6ce8a3778f607dd0035b
TERMUX_PKG_SRCURL=http://apache.mirrors.spacedump.net/apr/apr-util-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_DEPENDS="apr, libcrypt, libexpat, libiconv, libuuid"
TERMUX_PKG_BREAKS="apr-util-dev"
TERMUX_PKG_REPLACES="apr-util-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_lib_pq_PQsendQueryPrepared=no
--with-apr=$TERMUX_PREFIX
--without-sqlite3
"
TERMUX_PKG_RM_AFTER_INSTALL="lib/aprutil.exp"
================================================
FILE: packages/apt/0000-cmake-fix.patch
================================================
diff -uNr apt-1.4.9/apt-pkg/CMakeLists.txt apt-1.4.9.mod/apt-pkg/CMakeLists.txt
--- apt-1.4.9/apt-pkg/CMakeLists.txt 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/CMakeLists.txt 2019-11-12 22:32:19.117227283 +0200
@@ -48,13 +48,12 @@
)
target_link_libraries(apt-pkg
- PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES}
+ PRIVATE ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${ZLIB_LIBRARIES}
${BZIP2_LIBRARIES}
${LZMA_LIBRARIES}
${LZ4_LIBRARIES}
- ${ICONV_LIBRARIES}
)
set_target_properties(apt-pkg PROPERTIES VERSION ${MAJOR}.${MINOR})
set_target_properties(apt-pkg PROPERTIES SOVERSION ${MAJOR})
diff -uNr apt-1.4.9/CMakeLists.txt apt-1.4.9.mod/CMakeLists.txt
--- apt-1.4.9/CMakeLists.txt 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/CMakeLists.txt 2019-11-12 22:32:24.393914821 +0200
@@ -4,6 +4,7 @@
# set minimum version
project(apt)
cmake_minimum_required(VERSION 3.4.0)
+include(CheckSymbolExists)
# Generic header locations
include_directories(${PROJECT_BINARY_DIR}/include)
@@ -33,7 +34,6 @@
include(GNUInstallDirs)
include(TestBigEndian)
find_package(Threads)
-find_package(LFS REQUIRED)
find_package(Iconv REQUIRED)
find_package(Perl REQUIRED)
@@ -44,11 +44,6 @@
include_directories(${Intl_INCLUDE_DIRS})
endif()
-# Add large file support
-add_compile_options(${LFS_COMPILE_OPTIONS})
-add_definitions(${LFS_DEFINITIONS})
-link_libraries(${LFS_LIBRARIES})
-
# Set compiler flags
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -89,21 +77,12 @@
endif()
-find_package(BZip2)
-if (BZIP2_FOUND)
- set(HAVE_BZ2 1)
-endif()
-
find_package(LZMA)
if (LZMA_FOUND)
set(HAVE_LZMA 1)
endif()
-find_package(LZ4)
-if (LZ4_FOUND)
- set(HAVE_LZ4 1)
-endif()
# Mount()ing and stat()ing and friends
check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H)
@@ -180,10 +159,10 @@
message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
endif()
-if (NOT DEFINED COMMON_ARCH)
- execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
- OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
+# if (NOT DEFINED COMMON_ARCH)
+# execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
+ #OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
+# endif()
if (NOT DEFINED ROOT_GROUP)
execute_process(COMMAND id -gn root
OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -211,11 +190,8 @@
add_subdirectory(apt-inst)
add_subdirectory(cmdline)
add_subdirectory(completions)
-add_subdirectory(doc)
add_subdirectory(dselect)
-add_subdirectory(ftparchive)
add_subdirectory(methods)
-add_subdirectory(test)
if (USE_NLS)
add_subdirectory(po)
diff -uNr apt-1.4.9/methods/CMakeLists.txt apt-1.4.9.mod/methods/CMakeLists.txt
--- apt-1.4.9/methods/CMakeLists.txt 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/methods/CMakeLists.txt 2019-11-12 22:32:30.553939187 +0200
@@ -7,7 +7,7 @@
add_executable(http http.cc http_main.cc rfc2553emu.cc connect.cc basehttp.cc)
add_executable(mirror mirror.cc http.cc rfc2553emu.cc connect.cc basehttp.cc)
add_executable(https https.cc basehttp.cc)
-add_executable(ftp ftp.cc rfc2553emu.cc connect.cc)
+# add_executable(ftp ftp.cc rfc2553emu.cc connect.cc)
add_executable(rred rred.cc)
add_executable(rsh rsh.cc)
@@ -23,12 +23,12 @@
target_link_libraries(http apt-pkg)
target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES})
target_link_libraries(https apt-pkg ${CURL_LIBRARIES})
-target_link_libraries(ftp apt-pkg)
+#target_link_libraries(ftp apt-pkg)
target_link_libraries(rred apt-pkg)
target_link_libraries(rsh apt-pkg)
# Install the library
-install(TARGETS file copy store gpgv cdrom http https ftp rred rsh mirror
+install(TARGETS file copy store gpgv cdrom http https rred rsh mirror
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store gzip lzma bzip2 xz)
================================================
FILE: packages/apt/0001-hardcoded-paths-fix.patch
================================================
diff -uNr apt-1.4.9/apt-pkg/aptconfiguration.cc apt-1.4.9.mod/apt-pkg/aptconfiguration.cc
--- apt-1.4.9/apt-pkg/aptconfiguration.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/aptconfiguration.cc 2019-11-12 22:10:28.531994919 +0200
@@ -35,10 +35,10 @@
// setDefaultConfigurationForCompressors /*{{{*/
static void setDefaultConfigurationForCompressors() {
// Set default application paths to check for optional compression types
- _config->CndSet("Dir::Bin::gzip", "/bin/gzip");
- _config->CndSet("Dir::Bin::bzip2", "/bin/bzip2");
- _config->CndSet("Dir::Bin::xz", "/usr/bin/xz");
- _config->CndSet("Dir::Bin::lz4", "/usr/bin/lz4");
+ _config->CndSet("Dir::Bin::gzip", "@TERMUX_PREFIX@/bin/gzip");
+ _config->CndSet("Dir::Bin::bzip2", "@TERMUX_PREFIX@/bin/bzip2");
+ _config->CndSet("Dir::Bin::xz", "@TERMUX_PREFIX@/bin/xz");
+ _config->CndSet("Dir::Bin::lz4", "@TERMUX_PREFIX@/bin/lz4");
if (FileExists(_config->Find("Dir::Bin::xz")) == true) {
_config->Set("Dir::Bin::lzma", _config->Find("Dir::Bin::xz"));
_config->Set("APT::Compressor::lzma::Binary", "xz");
@@ -51,7 +51,7 @@
_config->Set("APT::Compressor::lzma::UncompressArg::", "-d");
}
} else {
- _config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma");
+ _config->CndSet("Dir::Bin::lzma", "@TERMUX_PREFIX@/bin/lzma");
if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) {
_config->Set("APT::Compressor::lzma::CompressArg::", "--suffix=");
_config->Set("APT::Compressor::lzma::CompressArg::", "-6");
diff -uNr apt-1.4.9/apt-pkg/contrib/cdromutl.cc apt-1.4.9.mod/apt-pkg/contrib/cdromutl.cc
--- apt-1.4.9/apt-pkg/contrib/cdromutl.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/contrib/cdromutl.cc 2019-11-12 22:10:38.788703372 +0200
@@ -268,7 +268,7 @@
string FindMountPointForDevice(const char *devnode)
{
// this is the order that mount uses as well
- std::vector const mounts = _config->FindVector("Dir::state::MountPoints", "/etc/mtab,/proc/mount");
+ std::vector const mounts = _config->FindVector("Dir::state::MountPoints", "@TERMUX_PREFIX@/etc/mtab,/proc/mount");
for (std::vector::const_iterator m = mounts.begin(); m != mounts.end(); ++m)
if (FileExists(*m) == true)
diff -uNr apt-1.4.9/apt-pkg/contrib/fileutl.cc apt-1.4.9.mod/apt-pkg/contrib/fileutl.cc
--- apt-1.4.9/apt-pkg/contrib/fileutl.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/contrib/fileutl.cc 2019-11-12 22:12:25.625803839 +0200
@@ -106,7 +106,7 @@
_exit(100);
}
- if (chdir("/tmp/") != 0)
+ if (chdir("@TERMUX_PREFIX@/tmp/") != 0)
_exit(100);
unsigned int Count = 1;
@@ -2790,10 +2790,10 @@
struct stat st;
if (!tmpdir || strlen(tmpdir) == 0 || // tmpdir is set
stat(tmpdir, &st) != 0 || (st.st_mode & S_IFDIR) == 0) // exists and is directory
- tmpdir = "/tmp";
+ tmpdir = "@TERMUX_PREFIX@/tmp";
else if (geteuid() != 0 && // root can do everything anyway
faccessat(AT_FDCWD, tmpdir, R_OK | W_OK | X_OK, AT_EACCESS) != 0) // current user has rwx access to directory
- tmpdir = "/tmp";
+ tmpdir = "@TERMUX_PREFIX@/tmp";
return string(tmpdir);
}
@@ -3064,7 +3064,7 @@
setenv("LOGNAME", pw->pw_name, 1);
auto const shell = flNotDir(pw->pw_shell);
if (shell == "false" || shell == "nologin")
- setenv("SHELL", "/bin/sh", 1);
+ setenv("SHELL", "@TERMUX_PREFIX@/bin/sh", 1);
else
setenv("SHELL", pw->pw_shell, 1);
auto const apt_setenv_tmp = [](char const * const env) {
diff -uNr apt-1.4.9/apt-pkg/deb/dpkgpm.cc apt-1.4.9.mod/apt-pkg/deb/dpkgpm.cc
--- apt-1.4.9/apt-pkg/deb/dpkgpm.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/deb/dpkgpm.cc 2019-11-12 22:18:36.777295457 +0200
@@ -179,7 +179,7 @@
so we use the binary from util-linux */
static bool ionice(int PID)
{
- if (!FileExists("/usr/bin/ionice"))
+ if (!FileExists("@TERMUX_PREFIX@/bin/ionice"))
return false;
pid_t Process = ExecFork();
if (Process == 0)
@@ -187,7 +187,7 @@
char buf[32];
snprintf(buf, sizeof(buf), "-p%d", PID);
const char *Args[4];
- Args[0] = "/usr/bin/ionice";
+ Args[0] = "@TERMUX_PREFIX@/bin/ionice";
Args[1] = "-c3";
Args[2] = buf;
Args[3] = 0;
@@ -483,7 +483,7 @@
debSystem::DpkgChrootDirectory();
const char *Args[4];
- Args[0] = "/bin/sh";
+ Args[0] = "@TERMUX_PREFIX@/bin/sh";
Args[1] = "-c";
Args[2] = Opts->Value.c_str();
Args[3] = 0;
@@ -2403,11 +2403,13 @@
fprintf(report, " %s: %s\n", pkgname.c_str(), opstr);
}
+// Android doesn't allow to use dmesg without root.
+#ifndef __ANDROID__
// attach dmesg log (to learn about segfaults)
- if (FileExists("/bin/dmesg"))
+ if (FileExists("@TERMUX_PREFIX@/bin/dmesg"))
{
fprintf(report, "Dmesg:\n");
- FILE *log = popen("/bin/dmesg","r");
+ FILE *log = popen("@TERMUX_PREFIX@/bin/dmesg","r");
if(log != NULL)
{
char buf[1024];
@@ -2416,13 +2418,13 @@
pclose(log);
}
}
+#endif
- // attach df -l log (to learn about filesystem status)
- if (FileExists("/bin/df"))
+ // attach df log (to learn about filesystem status)
+ if (FileExists("@TERMUX_PREFIX@/bin/df"))
{
-
fprintf(report, "Df:\n");
- FILE *log = popen("/bin/df -l","r");
+ FILE *log = popen("@TERMUX_PREFIX@/bin/df","r");
if(log != NULL)
{
char buf[1024];
diff -uNr apt-1.4.9/cmdline/apt-key.in apt-1.4.9.mod/cmdline/apt-key.in
--- apt-1.4.9/cmdline/apt-key.in 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/cmdline/apt-key.in 2019-11-12 22:27:00.015963736 +0200
@@ -260,7 +260,7 @@
if accessible_file_exists "$TRUSTEDFILE"; then
$ACTION "$TRUSTEDFILE" "$@"
fi
- local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
+ local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
eval "$(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)"
if [ -d "$TRUSTEDPARTS" ]; then
TRUSTEDPARTS="$(readlink -f "$TRUSTEDPARTS")"
@@ -439,7 +439,7 @@
merge_all_trusted_keyrings_into_pubring
FORCED_KEYRING="${GPGHOMEDIR}/forcedkeyid.gpg"
TRUSTEDFILE="${FORCED_KEYRING}"
- echo "#!/bin/sh
+ echo "#!@TERMUX_PREFIX@/bin/sh
exec sh '($(escape_shell "${GPG}")' --keyring '$(escape_shell "${TRUSTEDFILE}")' \"\$@\"" > "${GPGHOMEDIR}/gpg.1.sh"
GPG="${GPGHOMEDIR}/gpg.1.sh"
# ignore error as this "just" means we haven't found the forced keyid and the keyring will be empty
@@ -451,13 +451,13 @@
else
touch "${GPGHOMEDIR}/pubring.gpg" "${GPGHOMEDIR}/pubring.orig.gpg"
fi
- echo "#!/bin/sh
+ echo "#!@TERMUX_PREFIX@/bin/sh
exec sh '$(escape_shell "${GPG}")' --keyring '$(escape_shell "${GPGHOMEDIR}/pubring.gpg")' \"\$@\"" > "${GPGHOMEDIR}/gpg.1.sh"
GPG="${GPGHOMEDIR}/gpg.1.sh"
else
TRUSTEDFILE="$(dearmor_filename "$FORCED_KEYRING")"
create_new_keyring "$TRUSTEDFILE"
- echo "#!/bin/sh
+ echo "#!@TERMUX_PREFIX@/bin/sh
exec sh '$(escape_shell "${GPG}")' --keyring '$(escape_shell "${TRUSTEDFILE}")' \"\$@\"" > "${GPGHOMEDIR}/gpg.1.sh"
GPG="${GPGHOMEDIR}/gpg.1.sh"
fi
@@ -542,7 +542,7 @@
done
if [ -z "$TRUSTEDFILE" ]; then
- TRUSTEDFILE="/etc/apt/trusted.gpg"
+ TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
fi
@@ -612,7 +612,7 @@
unset TMPDIR
fi
fi
- GPGHOMEDIR="$(mktemp --directory --tmpdir 'apt-key-gpghome.XXXXXXXXXX')"
+ GPGHOMEDIR="$(mktemp -d -t 'apt-key-gpghome.XXXXXXXXXX')"
CURRENTTRAP="${CURRENTTRAP} cleanup_gpg_home;"
trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
if [ -z "$GPGHOMEDIR" ]; then
@@ -654,7 +654,7 @@
create_gpg_home
# now tell gpg that it shouldn't try to maintain this trustdb file
- echo "#!/bin/sh
+ echo "#!@TERMUX_PREFIX@/bin/sh
exec '$(escape_shell "${GPG_EXE}")' --ignore-time-conflict --no-options --no-default-keyring \\
--homedir '$(escape_shell "${GPGHOMEDIR}")' --no-auto-check-trustdb --trust-model always \"\$@\"" > "${GPGHOMEDIR}/gpg.0.sh"
GPG_SH="${GPGHOMEDIR}/gpg.0.sh"
================================================
FILE: packages/apt/0002-glob.patch
================================================
diff -uNr apt-1.4.9/apt-pkg/contrib/fileutl.cc apt-1.4.9.mod/apt-pkg/contrib/fileutl.cc
--- apt-1.4.9/apt-pkg/contrib/fileutl.cc 2019-11-12 22:12:25.625803839 +0200
+++ apt-1.4.9.mod/apt-pkg/contrib/fileutl.cc 2019-11-12 22:36:46.021615823 +0200
@@ -46,7 +46,9 @@
#include
#include
#include
+#ifndef __ANDROID__
#include
+#endif
#include
#include
@@ -2752,6 +2754,7 @@
}
/*}}}*/
+#ifndef __ANDROID__
// Glob - wrapper around "glob()" /*{{{*/
std::vector Glob(std::string const &pattern, int flags)
{
@@ -2777,6 +2780,7 @@
globfree(&globbuf);
return result;
}
+#endif
/*}}}*/
static std::string APT_NONNULL(1) GetTempDirEnv(char const * const env) /*{{{*/
{
diff -uNr apt-1.4.9/apt-pkg/contrib/fileutl.h apt-1.4.9.mod/apt-pkg/contrib/fileutl.h
--- apt-1.4.9/apt-pkg/contrib/fileutl.h 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/contrib/fileutl.h 2019-11-12 22:36:46.021615823 +0200
@@ -239,7 +239,9 @@
APT_HIDDEN std::string flNormalize(std::string file);
// simple c++ glob
+#ifndef __ANDROID__
std::vector Glob(std::string const &pattern, int flags=0);
+#endif
/** \brief Popen() implementation that execv() instead of using a shell
*
================================================
FILE: packages/apt/0003-langinfo-and-codeset.patch
================================================
diff -uNr apt-1.4.9/apt-pkg/contrib/strutl.cc apt-1.4.9.mod/apt-pkg/contrib/strutl.cc
--- apt-1.4.9/apt-pkg/contrib/strutl.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/contrib/strutl.cc 2019-11-12 22:39:32.592335551 +0200
@@ -100,6 +100,7 @@
}
}
/*}}}*/
+#ifndef __ANDROID__
// UTF8ToCodeset - Convert some UTF-8 string for some codeset /*{{{*/
// ---------------------------------------------------------------------
/* This is handy to use before display some information for enduser */
@@ -169,6 +170,7 @@
return true;
}
+#endif
/*}}}*/
// strstrip - Remove white space from the front and back of a string /*{{{*/
// ---------------------------------------------------------------------
diff -uNr apt-1.4.9/apt-pkg/deb/debrecords.cc apt-1.4.9.mod/apt-pkg/deb/debrecords.cc
--- apt-1.4.9/apt-pkg/deb/debrecords.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/deb/debrecords.cc 2019-11-12 22:39:37.975693094 +0200
@@ -25,7 +25,9 @@
#include
#include
#include
+#ifndef __ANDROID__
#include
+#endif
#include
/*}}}*/
@@ -152,12 +154,14 @@
orig = Section.FindS("Description");
}
+#ifndef __ANDROID__
char const * const codeset = nl_langinfo(CODESET);
if (strcmp(codeset,"UTF-8") != 0) {
string dest;
UTF8ToCodeset(codeset, orig, &dest);
return dest;
}
+#endif
return orig;
}
diff -uNr apt-1.4.9/apt-private/private-output.cc apt-1.4.9.mod/apt-private/private-output.cc
--- apt-1.4.9/apt-private/private-output.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-private/private-output.cc 2019-11-12 22:39:43.812385978 +0200
@@ -20,7 +20,11 @@
#include
#include
#include
-#include
+#ifdef __ANDROID__
+# include
+# else
+# include
+#endif
#include
#include
#include
@@ -717,7 +721,7 @@
regex_t Pattern;
int Res;
- Res = regcomp(&Pattern, nl_langinfo(YESEXPR),
+ Res = regcomp(&Pattern, "^[yY]",
REG_EXTENDED|REG_ICASE|REG_NOSUB);
if (Res != 0) {
================================================
FILE: packages/apt/0004-srv-records.patch
================================================
diff -uNr apt-1.4.9/apt-pkg/contrib/srvrec.cc apt-1.4.9.mod/apt-pkg/contrib/srvrec.cc
--- apt-1.4.9/apt-pkg/contrib/srvrec.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-pkg/contrib/srvrec.cc 2019-11-12 22:41:25.142836445 +0200
@@ -40,14 +40,24 @@
struct servent *s_ent = nullptr;
std::vector buf(1024);
+#ifdef __ANDROID__
+ s_ent = getservbyport(htons(port), "tcp");
+ if (s_ent == nullptr) return false;
+#else
res = getservbyport_r(htons(port), "tcp", &s_ent_buf, buf.data(), buf.size(), &s_ent);
if (res != 0 || s_ent == nullptr)
return false;
+#endif
strprintf(target, "_%s._tcp.%s", s_ent->s_name, host.c_str());
return GetSrvRecords(target, Result);
}
+#ifdef __ANDROID__
+extern "C" int __dn_skipname(const unsigned char* comp_dn, const unsigned char* eom);
+static inline int dn_skipname(const unsigned char* a, const unsigned char* b) { return __dn_skipname(a,b); }
+#endif
+
bool GetSrvRecords(std::string name, std::vector &Result)
{
unsigned char answer[PACKETSZ];
diff -uNr apt-1.4.9/methods/connect.cc apt-1.4.9.mod/methods/connect.cc
--- apt-1.4.9/methods/connect.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/methods/connect.cc 2019-11-12 22:41:29.396188505 +0200
@@ -129,7 +129,7 @@
// Check the socket for an error condition
unsigned int Err;
- unsigned int Len = sizeof(Err);
+ socklen_t Len = sizeof(Err);
if (getsockopt(Fd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
return _error->Errno("getsockopt",_("Failed"));
@@ -301,7 +301,10 @@
if(LastHost != Host || LastPort != Port)
{
SrvRecords.clear();
- if (_config->FindB("Acquire::EnableSrvRecords", true) == true)
+ /* Disable by default in Termux due to it breaking on (some) HTC
+ devices (https://github.com/termux/termux-packages/issues/99). */
+
+ if (_config->FindB("Acquire::EnableSrvRecords", false) == true)
{
GetSrvRecords(Host, DefPort, SrvRecords);
// RFC2782 defines that a lonely '.' target is an abort reason
================================================
FILE: packages/apt/0005-http2-fix.patch
================================================
diff -uNr apt-1.4.9/methods/basehttp.cc apt-1.4.9.mod/methods/basehttp.cc
--- apt-1.4.9/methods/basehttp.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/methods/basehttp.cc 2019-11-12 22:43:18.109996205 +0200
@@ -90,7 +90,12 @@
// Evil servers return no version
if (Line[4] == '/')
{
- int const elements = sscanf(Line.c_str(),"HTTP/%3u.%3u %3u%359[^\n]",&Major,&Minor,&Result,Code);
+ int elements = sscanf(Line.c_str(),"HTTP/%3u %3u[^\n]",&Major,&Result);
+ if (elements == 2 && Major == 2) {
+ Minor = 0;
+ Code[0] = '\0';
+ } else {
+ elements = sscanf(Line.c_str(),"HTTP/%3u.%3u %3u%359[^\n]",&Major,&Minor,&Result,Code);
if (elements == 3)
{
Code[0] = '\0';
@@ -99,6 +104,7 @@
}
else if (elements != 4)
return _error->Error(_("The HTTP server sent an invalid reply header"));
+ }
}
else
{
================================================
FILE: packages/apt/0006-apt-key-nonroot.patch
================================================
diff -uNr apt-1.4.9/cmdline/apt-key.in apt-1.4.9.mod/cmdline/apt-key.in
--- apt-1.4.9/cmdline/apt-key.in 2019-11-12 22:27:00.015963736 +0200
+++ apt-1.4.9.mod/cmdline/apt-key.in 2019-11-12 22:46:00.284024293 +0200
@@ -16,10 +16,7 @@
aptkey_echo() { echo "$@"; }
requires_root() {
- if [ "$(id -u)" -ne 0 ]; then
- apt_error "This command can only be used by root."
- exit 1
- fi
+ :
}
command_available() {
================================================
FILE: packages/apt/0007-termux-apt-vendor.patch
================================================
diff -uNr apt-1.4.9/vendor/ubuntu/apt-vendor.ent apt-1.4.9.mod/vendor/ubuntu/apt-vendor.ent
--- apt-1.4.9/vendor/ubuntu/apt-vendor.ent 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/vendor/ubuntu/apt-vendor.ent 2019-11-12 22:53:10.802486744 +0200
@@ -1,9 +1,9 @@
-
-ubuntu-keyring">
-/usr/share/keyrings/ubuntu-archive-keyring.gpg">
-/usr/share/keyrings/ubuntu-archive-removed-keys.gpg">
-
+
+termux-keyring">
+@TERMUX_PREFIX@/share/keyrings/termux-archive-keyring.gpg">
+@TERMUX_PREFIX@/share/keyrings/termux-archive-removed-keys.gpg">
+
Error(_("Unable to determine a suitable packaging system type"));
}
- if (pkgInitArchTupleMap() == false)
- return false;
return Sys->Initialize(Cnf);
}
================================================
FILE: packages/apt/0009-fix-macro-redefinition.patch
================================================
diff -uNr apt-1.4.9/apt-private/private-download.cc apt-1.4.9.mod/apt-private/private-download.cc
--- apt-1.4.9/apt-private/private-download.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/apt-private/private-download.cc 2019-11-13 14:22:40.305931068 +0200
@@ -127,7 +127,6 @@
/*}}}*/
bool CheckFreeSpaceBeforeDownload(std::string const &Dir, unsigned long long FetchBytes)/*{{{*/
{
- uint32_t const RAMFS_MAGIC = 0x858458f6;
/* Check for enough free space, but only if we are actually going to
download */
if (_config->FindB("APT::Get::Print-URIs", false) == true ||
================================================
FILE: packages/apt/0010-prevent-usage-as-root.patch
================================================
diff -uNr apt-1.4.9/cmdline/apt.cc apt-1.4.9.mod/cmdline/apt.cc
--- apt-1.4.9/cmdline/apt.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/cmdline/apt.cc 2019-11-13 14:55:50.954692940 +0200
@@ -97,6 +97,12 @@
/*}}}*/
int main(int argc, const char *argv[]) /*{{{*/
{
+ if (getuid() == 0) {
+ std::cout << "You should not use command 'apt' as root." << std::endl;
+ std::cout << "This is dangerous as may damage your Termux installation and data." << std::endl;
+ return 1;
+ }
+
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
diff -uNr apt-1.4.9/cmdline/apt-get.cc apt-1.4.9.mod/cmdline/apt-get.cc
--- apt-1.4.9/cmdline/apt-get.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/cmdline/apt-get.cc 2019-11-13 14:55:50.954692940 +0200
@@ -432,6 +432,12 @@
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
+ if (getuid() == 0) {
+ std::cout << "You should not use command 'apt-get' as root." << std::endl;
+ std::cout << "This is dangerous as may damage your Termux installation and data." << std::endl;
+ return 1;
+ }
+
// Parse the command line and initialize the package library
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_GET, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
diff -uNr apt-1.4.9/cmdline/apt-key.in apt-1.4.9.mod/cmdline/apt-key.in
--- apt-1.4.9/cmdline/apt-key.in 2019-11-13 14:55:25.431240010 +0200
+++ apt-1.4.9.mod/cmdline/apt-key.in 2019-11-13 15:04:25.853655116 +0200
@@ -15,8 +15,11 @@
aptkey_echo() { echo "$@"; }
-requires_root() {
- :
+assert_no_root() {
+ if [ "$(id -u)" = "0" ]; then
+ apt_error "Refusing to run 'apt-key' as root to prevent damage to your Termux installation."
+ exit 1
+ fi
}
command_available() {
@@ -510,7 +513,6 @@
create_new_keyring() { if [ ! -r "$FORCED_KEYRING" ]; then TRUSTEDFILE='/dev/null'; FORCED_KEYRING="$TRUSTEDFILE"; fi; }
;;
--fakeroot)
- requires_root() { true; }
;;
--quiet)
aptkey_echo() { true; }
@@ -706,7 +708,7 @@
case "$command" in
add)
warn_on_script_usage
- requires_root
+ assert_no_root
setup_merged_keyring
aptkey_execute "$GPG" --quiet --batch --import "$@"
merge_back_changes
@@ -714,19 +716,19 @@
;;
del|rm|remove)
# no script warning here as removing 'add' usage needs 'del' for cleanup
- requires_root
+ assert_no_root
foreach_keyring_do 'remove_key_from_keyring' "$@"
aptkey_echo "OK"
;;
update)
warn_on_script_usage
- requires_root
+ assert_no_root
setup_merged_keyring
update
merge_back_changes
;;
net-update)
- requires_root
+ assert_no_root
setup_merged_keyring
net_update
merge_back_changes
diff -uNr apt-1.4.9/cmdline/apt-mark.cc apt-1.4.9.mod/cmdline/apt-mark.cc
--- apt-1.4.9/cmdline/apt-mark.cc 2019-01-18 12:42:07.000000000 +0200
+++ apt-1.4.9.mod/cmdline/apt-mark.cc 2019-11-13 14:55:50.958026289 +0200
@@ -316,6 +316,12 @@
/*}}}*/
int main(int argc,const char *argv[]) /*{{{*/
{
+ if (getuid() == 0) {
+ std::cout << "You should not use command 'apt-mark' as root." << std::endl;
+ std::cout << "This is dangerous as may damage your Termux installation and data." << std::endl;
+ return 1;
+ }
+
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_MARK, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
================================================
FILE: packages/apt/apt-ftparchive.subpackage.sh
================================================
TERMUX_SUBPKG_DESCRIPTION="apt-ftparchive is the command line tool that generates the index files that APT uses to access a distribution source"
TERMUX_SUBPKG_DEPENDS="libdb"
TERMUX_SUBPKG_INCLUDE="
bin/apt-ftparchive
"
================================================
FILE: packages/apt/apt-transport-tor.subpackage.sh
================================================
TERMUX_SUBPKG_INCLUDE="
lib/apt/methods/tor
lib/apt/methods/tor+http
lib/apt/methods/tor+https
"
TERMUX_SUBPKG_DESCRIPTION="APT transport for anonymous package downloads via Tor"
TERMUX_SUBPKG_DEPENDS="tor"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
================================================
FILE: packages/apt/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=1.4.9
TERMUX_PKG_REVISION=24
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=d4d65e7c84da86f3e6dcc933bba46a08db429c9d933b667c864f5c0e880bac0d
# apt-key requires utilities from coreutils, findutils, gpgv, grep, sed.
TERMUX_PKG_DEPENDS="coreutils, dpkg, findutils, gpgv, grep, libc++, libcurl, liblzma, sed, termux-licenses, zlib"
TERMUX_PKG_CONFLICTS="apt-transport-https, libapt-pkg"
TERMUX_PKG_REPLACES="apt-transport-https, libapt-pkg"
TERMUX_PKG_RECOMMENDS="game-repo, science-repo"
TERMUX_PKG_SUGGESTS="gnupg, unstable-repo, x11-repo"
TERMUX_PKG_ESSENTIAL=true
TERMUX_PKG_CONFFILES="
etc/apt/sources.list
etc/apt/trusted.gpg
"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DPERL_EXECUTABLE=$(which perl)
-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX
-DCOMMON_ARCH=$TERMUX_ARCH
-DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg
-DUSE_NLS=OFF
-DWITH_DOC=OFF
"
# ubuntu uses instead $PREFIX/lib instead of $PREFIX/libexec to
# "Work around bug in GNUInstallDirs" (from apt 1.4.8 CMakeLists.txt).
# Archlinux uses $PREFIX/libexec though, so let's force libexec->lib to
# get same build result on ubuntu and archlinux.
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="-DCMAKE_INSTALL_LIBEXECDIR=lib"
TERMUX_PKG_RM_AFTER_INSTALL="
bin/apt-cdrom
bin/apt-extracttemplates
bin/apt-sortpkgs
etc/apt/apt.conf.d
lib/apt/methods/bzip2
lib/apt/methods/cdrom
lib/apt/methods/mirror
lib/apt/methods/rred
lib/apt/planners/
lib/apt/solvers/
lib/dpkg/
"
termux_step_pre_configure() {
# Certain packages are not safe to build on device because their
# build.sh script deletes specific files in $TERMUX_PREFIX.
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi
}
termux_step_post_make_install() {
printf "# The main termux repository:\ndeb https://dl.bintray.com/andronixapp/termux-packages-24 stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
# apt-transport-tor
ln -sfr $TERMUX_PREFIX/lib/apt/methods/http $TERMUX_PREFIX/lib/apt/methods/tor
ln -sfr $TERMUX_PREFIX/lib/apt/methods/http $TERMUX_PREFIX/lib/apt/methods/tor+http
ln -sfr $TERMUX_PREFIX/lib/apt/methods/https $TERMUX_PREFIX/lib/apt/methods/tor+https
# man pages
mkdir -p $TERMUX_PREFIX/share/man/
cp -Rf $TERMUX_PKG_BUILDER_DIR/man/* $TERMUX_PREFIX/share/man/
}
================================================
FILE: packages/apt/man/man5/apt.conf.5
================================================
'\" t
.\" Title: apt.conf
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 25\ \&November\ \&2016
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\&.CONF" "5" "25\ \&November\ \&2016" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt.conf \- Configuration file for APT
.SH "DESCRIPTION"
.PP
/etc/apt/apt\&.conf
is the main configuration file shared by all the tools in the APT suite of tools, though it is by no means the only place options can be set\&. The suite also shares a common command line parser to provide a uniform environment\&.
.PP
When an APT tool starts up it will read the configuration files in the following order:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
the file specified by the
\fBAPT_CONFIG\fR
environment variable (if any)
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
all files in
Dir::Etc::Parts
in alphanumeric ascending order which have either no or "conf" as filename extension and which only contain alphanumeric, hyphen (\-), underscore (_) and period (\&.) characters\&. Otherwise APT will print a notice that it has ignored a file, unless that file matches a pattern in the
Dir::Ignore\-Files\-Silently
configuration list \- in which case it will be silently ignored\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 3.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 3." 4.2
.\}
the main configuration file specified by
Dir::Etc::main
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 4.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 4." 4.2
.\}
all options set in the binary specific configuration subtree are moved into the root of the tree\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 5.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 5." 4.2
.\}
the command line options are applied to override the configuration directives or to load even more configuration files\&.
.RE
.SH "SYNTAX"
.PP
The configuration file is organized in a tree with options organized into functional groups\&. Option specification is given with a double colon notation; for instance
APT::Get::Assume\-Yes
is an option within the APT tool group, for the Get tool\&. Options do not inherit from their parent groups\&.
.PP
Syntactically the configuration language is modeled after what the ISC tools such as bind and dhcp use\&. Lines starting with
//
are treated as comments (ignored), as well as all text between
/*
and
*/, just like C/C++ comments\&. Each line is of the form
APT::Get::Assume\-Yes "true";\&. The quotation marks and trailing semicolon are required\&. The value must be on one line, and there is no kind of string concatenation\&. Values must not include backslashes or extra quotation marks\&. Option names are made up of alphanumeric characters and the characters "/\-:\&._+"\&. A new scope can be opened with curly braces, like this:
.sp
.if n \{\
.RS 4
.\}
.nf
APT {
Get {
Assume\-Yes "true";
Fix\-Broken "true";
};
};
.fi
.if n \{\
.RE
.\}
.PP
with newlines placed to make it more readable\&. Lists can be created by opening a scope and including a single string enclosed in quotes followed by a semicolon\&. Multiple entries can be included, separated by a semicolon\&.
.sp
.if n \{\
.RS 4
.\}
.nf
DPkg::Pre\-Install\-Pkgs {"/usr/sbin/dpkg\-preconfigure \-\-apt";};
.fi
.if n \{\
.RE
.\}
.PP
In general the sample configuration file
/usr/share/doc/apt/examples/configure\-index\&.gz
is a good guide for how it should look\&.
.PP
Case is not significant in names of configuration items, so in the previous example you could use
dpkg::pre\-install\-pkgs\&.
.PP
Names for the configuration items are optional if a list is defined as can be seen in the
DPkg::Pre\-Install\-Pkgs
example above\&. If you don\*(Aqt specify a name a new entry will simply add a new option to the list\&. If you specify a name you can override the option in the same way as any other option by reassigning a new value to the option\&.
.PP
Two special commands are defined:
#include
(which is deprecated and not supported by alternative implementations) and
#clear\&.
#include
will include the given file, unless the filename ends in a slash, in which case the whole directory is included\&.
#clear
is used to erase a part of the configuration tree\&. The specified element and all its descendants are erased\&. (Note that these lines also need to end with a semicolon\&.)
.PP
The
#clear
command is the only way to delete a list or a complete scope\&. Reopening a scope (or using the syntax described below with an appended
::) will
\fInot\fR
override previously written entries\&. Options can only be overridden by addressing a new value to them \- lists and scopes can\*(Aqt be overridden, only cleared\&.
.PP
All of the APT tools take an \-o option which allows an arbitrary configuration directive to be specified on the command line\&. The syntax is a full option name (APT::Get::Assume\-Yes
for instance) followed by an equals sign then the new value of the option\&. To append a new element to a list, add a trailing
::
to the name of the list\&. (As you might suspect, the scope syntax can\*(Aqt be used on the command line\&.)
.PP
Note that appending items to a list using
::
only works for one item per line, and that you should not use it in combination with the scope syntax (which adds
::
implicitly)\&. Using both syntaxes together will trigger a bug which some users unfortunately depend on: an option with the unusual name "::" which acts like every other option with a name\&. This introduces many problems; for one thing, users who write multiple lines in this
\fIwrong\fR
syntax in the hope of appending to a list will achieve the opposite, as only the last assignment for this option "::" will be used\&. Future versions of APT will raise errors and stop working if they encounter this misuse, so please correct such statements now while APT doesn\*(Aqt explicitly complain about them\&.
.SH "THE APT GROUP"
.PP
This group of options controls general APT behavior as well as holding the options for all of the tools\&.
.PP
\fBArchitecture\fR
.RS 4
System Architecture; sets the architecture to use when fetching files and parsing package lists\&. The internal default is the architecture apt was compiled for\&.
.RE
.PP
\fBArchitectures\fR
.RS 4
All Architectures the system supports\&. For instance, CPUs implementing the
amd64
(also called
x86\-64) instruction set are also able to execute binaries compiled for the
i386
(x86) instruction set\&. This list is used when fetching files and parsing package lists\&. The initial default is always the system\*(Aqs native architecture (APT::Architecture), and foreign architectures are added to the default list when they are registered via
\fBdpkg \-\-add\-architecture\fR\&.
.RE
.PP
\fBCompressor\fR
.RS 4
This scope defines which compression formats are supported, how compression and decompression can be performed if support for this format isn\*(Aqt built into apt directly and a cost\-value indicating how costly it is to compress something in this format\&. As an example the following configuration stanza would allow apt to download and uncompress as well as create and store files with the low\-cost
\&.reversed
file extension which it will pass to the command
\fBrev\fR
without additional commandline parameters for compression and uncompression:
.sp .if n \{\ .RS 4 .\} .nf APT::Compressor::rev { Name "rev"; Extension "\&.reversed"; Binary "rev"; CompressArg {}; UncompressArg {}; Cost "10"; }; .fi .if n \{\ .RE .\}
.RE
.PP
\fBBuild\-Profiles\fR
.RS 4
List of all build profiles enabled for build\-dependency resolution, without the "profile\&." namespace prefix\&. By default this list is empty\&. The
\fBDEB_BUILD_PROFILES\fR
as used by
\fBdpkg-buildpackage\fR(1)
overrides the list notation\&.
.RE
.PP
\fBDefault\-Release\fR
.RS 4
Default release to install packages from if more than one version is available\&. Contains release name, codename or release version\&. Examples: \*(Aqstable\*(Aq, \*(Aqtesting\*(Aq, \*(Aqunstable\*(Aq, \*(Aqstretch\*(Aq, \*(Aqbuster\*(Aq, \*(Aq4\&.0\*(Aq, \*(Aq5\&.0*\*(Aq\&. See also
\fBapt_preferences\fR(5)\&.
.RE
.PP
\fBIgnore\-Hold\fR
.RS 4
Ignore held packages; this global option causes the problem resolver to ignore held packages in its decision making\&.
.RE
.PP
\fBClean\-Installed\fR
.RS 4
Defaults to on\&. When turned on the autoclean feature will remove any packages which can no longer be downloaded from the cache\&. If turned off then packages that are locally installed are also excluded from cleaning \- but note that APT provides no direct means to reinstall them\&.
.RE
.PP
\fBImmediate\-Configure\fR
.RS 4
Defaults to on, which will cause APT to install essential and important packages as soon as possible in an install/upgrade operation, in order to limit the effect of a failing
\fBdpkg\fR(1)
call\&. If this option is disabled, APT treats an important package in the same way as an extra package: between the unpacking of the package A and its configuration there can be many other unpack or configuration calls for other unrelated packages B, C etc\&. If these cause the
\fBdpkg\fR(1)
call to fail (e\&.g\&. because package B\*(Aqs maintainer scripts generate an error), this results in a system state in which package A is unpacked but unconfigured \- so any package depending on A is now no longer guaranteed to work, as its dependency on A is no longer satisfied\&.
.sp
The immediate configuration marker is also applied in the potentially problematic case of circular dependencies, since a dependency with the immediate flag is equivalent to a Pre\-Dependency\&. In theory this allows APT to recognise a situation in which it is unable to perform immediate configuration, abort, and suggest to the user that the option should be temporarily deactivated in order to allow the operation to proceed\&. Note the use of the word "theory" here; in the real world this problem has rarely been encountered, in non\-stable distribution versions, and was caused by wrong dependencies of the package in question or by a system in an already broken state; so you should not blindly disable this option, as the scenario mentioned above is not the only problem it can help to prevent in the first place\&.
.sp
Before a big operation like
dist\-upgrade
is run with this option disabled you should try to explicitly
install
the package APT is unable to configure immediately; but please make sure you also report your problem to your distribution and to the APT team with the buglink below, so they can work on improving or correcting the upgrade process\&.
.RE
.PP
\fBForce\-LoopBreak\fR
.RS 4
Never enable this option unless you
\fIreally\fR
know what you are doing\&. It permits APT to temporarily remove an essential package to break a Conflicts/Conflicts or Conflicts/Pre\-Depends loop between two essential packages\&.
\fISuch a loop should never exist and is a grave bug\fR\&. This option will work if the essential packages are not
\fBtar\fR,
\fBgzip\fR,
\fBlibc\fR,
\fBdpkg\fR,
\fBdash\fR
or anything that those packages depend on\&.
.RE
.PP
\fBCache\-Start\fR, \fBCache\-Grow\fR, \fBCache\-Limit\fR
.RS 4
APT uses since version 0\&.7\&.26 a resizable memory mapped cache file to store the available information\&.
Cache\-Start
acts as a hint of the size the cache will grow to, and is therefore the amount of memory APT will request at startup\&. The default value is 20971520 bytes (~20 MB)\&. Note that this amount of space needs to be available for APT; otherwise it will likely fail ungracefully, so for memory restricted devices this value should be lowered while on systems with a lot of configured sources it should be increased\&.
Cache\-Grow
defines in bytes with the default of 1048576 (~1 MB) how much the cache size will be increased in the event the space defined by
Cache\-Start
is not enough\&. This value will be applied again and again until either the cache is big enough to store all information or the size of the cache reaches the
Cache\-Limit\&. The default of
Cache\-Limit
is 0 which stands for no limit\&. If
Cache\-Grow
is set to 0 the automatic growth of the cache is disabled\&.
.RE
.PP
\fBBuild\-Essential\fR
.RS 4
Defines which packages are considered essential build dependencies\&.
.RE
.PP
\fBGet\fR
.RS 4
The Get subsection controls the
\fBapt-get\fR(8)
tool; please see its documentation for more information about the options here\&.
.RE
.PP
\fBCache\fR
.RS 4
The Cache subsection controls the
\fBapt-cache\fR(8)
tool; please see its documentation for more information about the options here\&.
.RE
.PP
\fBCDROM\fR
.RS 4
The CDROM subsection controls the
\fBapt-cdrom\fR(8)
tool; please see its documentation for more information about the options here\&.
.RE
.SH "THE ACQUIRE GROUP"
.PP
The
Acquire
group of options controls the download of packages as well as the various "acquire methods" responsible for the download itself (see also
\fBsources.list\fR(5))\&.
.PP
\fBCheck\-Valid\-Until\fR
.RS 4
Security related option defaulting to true, as giving a Release file\*(Aqs validation an expiration date prevents replay attacks over a long timescale, and can also for example help users to identify mirrors that are no longer updated \- but the feature depends on the correctness of the clock on the user system\&. Archive maintainers are encouraged to create Release files with the
Valid\-Until
header, but if they don\*(Aqt or a stricter value is desired the
Max\-ValidTime
option below can be used\&. The
\fBCheck\-Valid\-Until\fR
option of
\fBsources.list\fR(5)
entries should be preferred to disable the check selectively instead of using this global override\&.
.RE
.PP
\fBMax\-ValidTime\fR
.RS 4
Maximum time (in seconds) after its creation (as indicated by the
Date
header) that the
Release
file should be considered valid\&. If the Release file itself includes a
Valid\-Until
header the earlier date of the two is used as the expiration date\&. The default value is
0
which stands for "valid forever"\&. Archive specific settings can be made by appending the label of the archive to the option name\&. Preferably, the same can be achieved for specific
\fBsources.list\fR(5)
entries by using the
\fBValid\-Until\-Max\fR
option there\&.
.RE
.PP
\fBMin\-ValidTime\fR
.RS 4
Minimum time (in seconds) after its creation (as indicated by the
Date
header) that the
Release
file should be considered valid\&. Use this if you need to use a seldom updated (local) mirror of a more frequently updated archive with a
Valid\-Until
header instead of completely disabling the expiration date checking\&. Archive specific settings can and should be used by appending the label of the archive to the option name\&. Preferably, the same can be achieved for specific
\fBsources.list\fR(5)
entries by using the
\fBValid\-Until\-Min\fR
option there\&.
.RE
.PP
\fBPDiffs\fR
.RS 4
Try to download deltas called
PDiffs
for indexes (like
Packages
files) instead of downloading whole ones\&. True by default\&. Preferably, this can be set for specific
\fBsources.list\fR(5)
entries or index files by using the
\fBPDiffs\fR
option there\&.
.sp
Two sub\-options to limit the use of PDiffs are also available:
FileLimit
can be used to specify a maximum number of PDiff files should be downloaded to update a file\&.
SizeLimit
on the other hand is the maximum percentage of the size of all patches compared to the size of the targeted file\&. If one of these limits is exceeded the complete file is downloaded instead of the patches\&.
.RE
.PP
\fBBy\-Hash\fR
.RS 4
Try to download indexes via an URI constructed from a hashsum of the expected file rather than downloaded via a well\-known stable filename\&. True by default, but automatically disabled if the source indicates no support for it\&. Usage can be forced with the special value "force"\&. Preferably, this can be set for specific
\fBsources.list\fR(5)
entries or index files by using the
\fBBy\-Hash\fR
option there\&.
.RE
.PP
\fBQueue\-Mode\fR
.RS 4
Queuing mode;
Queue\-Mode
can be one of
host
or
access
which determines how APT parallelizes outgoing connections\&.
host
means that one connection per target host will be opened,
access
means that one connection per URI type will be opened\&.
.RE
.PP
\fBRetries\fR
.RS 4
Number of retries to perform\&. If this is non\-zero APT will retry failed files the given number of times\&.
.RE
.PP
\fBSource\-Symlinks\fR
.RS 4
Use symlinks for source archives\&. If set to true then source archives will be symlinked when possible instead of copying\&. True is the default\&.
.RE
.PP
\fBhttp\fR
.RS 4
http::Proxy
sets the default proxy to use for HTTP URIs\&. It is in the standard form of
http://[[user][:pass]@]host[:port]/\&. Per host proxies can also be specified by using the form
http::Proxy::
with the special keyword
DIRECT
meaning to use no proxies\&. If no one of the above settings is specified,
\fBhttp_proxy\fR
environment variable will be used\&.
.sp
Three settings are provided for cache control with HTTP/1\&.1 compliant proxy caches\&.
No\-Cache
tells the proxy not to use its cached response under any circumstances\&.
Max\-Age
sets the allowed maximum age (in seconds) of an index file in the cache of the proxy\&.
No\-Store
specifies that the proxy should not store the requested archive files in its cache, which can be used to prevent the proxy from polluting its cache with (big) \&.deb files\&.
.sp
The option
timeout
sets the timeout timer used by the method; this value applies to the connection as well as the data timeout\&.
.sp
The setting
Acquire::http::Pipeline\-Depth
can be used to enable HTTP pipelining (RFC 2616 section 8\&.1\&.2\&.2) which can be beneficial e\&.g\&. on high\-latency connections\&. It specifies how many requests are sent in a pipeline\&. APT tries to detect and workaround misbehaving webservers and proxies at runtime, but if you know that yours does not conform to the HTTP/1\&.1 specification pipelining can be disabled by setting the value to 0\&. It is enabled by default with the value 10\&.
.sp
Acquire::http::AllowRedirect
controls whether APT will follow redirects, which is enabled by default\&.
.sp
The used bandwidth can be limited with
Acquire::http::Dl\-Limit
which accepts integer values in kilobytes per second\&. The default value is 0 which deactivates the limit and tries to use all available bandwidth\&. Note that this option implicitly disables downloading from multiple servers at the same time\&.
.sp
Acquire::http::User\-Agent
can be used to set a different User\-Agent for the http download method as some proxies allow access for clients only if the client uses a known identifier\&.
.sp
Acquire::http::Proxy\-Auto\-Detect
can be used to specify an external command to discover the http proxy to use\&. The first and only parameter is an URI denoting the host to be contacted to allow for host\-specific configuration\&. APT expects the command to output the proxy on stdout as a single line in the style
http://proxy:port/
or the word
DIRECT
if no proxy should be used\&. No output indicates that the generic proxy settings should be used\&. Note that auto\-detection will not be used for a host if a host\-specific proxy configuration is already set via
Acquire::http::Proxy::\fIHOST\fR\&. See the
\fBsquid-deb-proxy-client\fR(1)
package for an example implementation that uses avahi\&. This option takes precedence over the legacy option name
ProxyAutoDetect\&.
.RE
.PP
\fBhttps\fR
.RS 4
The
Cache\-control,
Timeout,
AllowRedirect,
Dl\-Limit
and
proxy
options work for HTTPS URIs in the same way as for the
http
method, and default to the same values if they are not explicitly set\&. The
Pipeline\-Depth
option is not yet supported\&.
.sp
CaInfo
suboption specifies place of file that holds info about trusted certificates\&.
::CaInfo
is the corresponding per\-host option\&.
Verify\-Peer
boolean suboption determines whether or not the server\*(Aqs host certificate should be verified against trusted certificates\&.
::Verify\-Peer
is the corresponding per\-host option\&.
Verify\-Host
boolean suboption determines whether or not the server\*(Aqs hostname should be verified\&.
::Verify\-Host
is the corresponding per\-host option\&.
SslCert
determines what certificate to use for client authentication\&.
::SslCert
is the corresponding per\-host option\&.
SslKey
determines what private key to use for client authentication\&.
::SslKey
is the corresponding per\-host option\&.
SslForceVersion
overrides default SSL version to use\&. It can contain either of the strings \*(AqTLSv1\*(Aq or \*(AqSSLv3\*(Aq\&.
::SslForceVersion
is the corresponding per\-host option\&.
.RE
.PP
\fBftp\fR
.RS 4
ftp::Proxy
sets the default proxy to use for FTP URIs\&. It is in the standard form of
ftp://[[user][:pass]@]host[:port]/\&. Per host proxies can also be specified by using the form
ftp::Proxy::
with the special keyword
DIRECT
meaning to use no proxies\&. If no one of the above settings is specified,
\fBftp_proxy\fR
environment variable will be used\&. To use an FTP proxy you will have to set the
ftp::ProxyLogin
script in the configuration file\&. This entry specifies the commands to send to tell the proxy server what to connect to\&. Please see
/usr/share/doc/apt/examples/configure\-index\&.gz
for an example of how to do this\&. The substitution variables representing the corresponding URI component are
$(PROXY_USER),
$(PROXY_PASS),
$(SITE_USER),
$(SITE_PASS),
$(SITE)
and
$(SITE_PORT)\&.
.sp
The option
timeout
sets the timeout timer used by the method; this value applies to the connection as well as the data timeout\&.
.sp
Several settings are provided to control passive mode\&. Generally it is safe to leave passive mode on; it works in nearly every environment\&. However, some situations require that passive mode be disabled and port mode FTP used instead\&. This can be done globally or for connections that go through a proxy or for a specific host (see the sample config file for examples)\&.
.sp
It is possible to proxy FTP over HTTP by setting the
\fBftp_proxy\fR
environment variable to an HTTP URL \- see the discussion of the http method above for syntax\&. You cannot set this in the configuration file and it is not recommended to use FTP over HTTP due to its low efficiency\&.
.sp
The setting
ForceExtended
controls the use of RFC2428
EPSV
and
EPRT
commands\&. The default is false, which means these commands are only used if the control connection is IPv6\&. Setting this to true forces their use even on IPv4 connections\&. Note that most FTP servers do not support RFC2428\&.
.RE
.PP
\fBcdrom\fR
.RS 4
For URIs using the
cdrom
method, the only configurable option is the mount point,
cdrom::Mount, which must be the mount point for the CD\-ROM (or DVD, or whatever) drive as specified in
/etc/fstab\&. It is possible to provide alternate mount and unmount commands if your mount point cannot be listed in the fstab\&. The syntax is to put
.sp
.if n \{\
.RS 4
.\}
.nf
/cdrom/::Mount "foo";
.fi
.if n \{\
.RE
.\}
.sp
within the
cdrom
block\&. It is important to have the trailing slash\&. Unmount commands can be specified using UMount\&.
.RE
.PP
\fBgpgv\fR
.RS 4
For GPGV URIs the only configurable option is
gpgv::Options, which passes additional parameters to gpgv\&.
.RE
.PP
\fBCompressionTypes\fR
.RS 4
List of compression types which are understood by the acquire methods\&. Files like
Packages
can be available in various compression formats\&. By default the acquire methods can decompress and recompress many common formats like
\fBxz\fR
and
\fBgzip\fR; with this scope the supported formats can be queried, modified as well as support for more formats added (see also
\fBAPT::Compressor\fR)\&. The syntax for this is:
.sp
.if n \{\
.RS 4
.\}
.nf
Acquire::CompressionTypes::\fIFileExtension\fR "\fIMethodname\fR";
.fi
.if n \{\
.RE
.\}
.sp
Also, the
Order
subgroup can be used to define in which order the acquire system will try to download the compressed files\&. The acquire system will try the first and proceed with the next compression type in this list on error, so to prefer one over the other type simply add the preferred type first \- types not already added will be implicitly appended to the end of the list, so e\&.g\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Acquire::CompressionTypes::Order:: "gz";
.fi
.if n \{\
.RE
.\}
.sp
can be used to prefer
\fBgzip\fR
compressed files over all other compression formats\&. If
\fBxz\fR
should be preferred over
\fBgzip\fR
and
\fBbzip2\fR
the configure setting should look like this:
.sp
.if n \{\
.RS 4
.\}
.nf
Acquire::CompressionTypes::Order { "xz"; "gz"; };
.fi
.if n \{\
.RE
.\}
.sp
It is not needed to add
bz2
to the list explicitly as it will be added automatically\&.
.sp
Note that the
Dir::Bin::\fIMethodname\fR
will be checked at run time\&. If this option has been set and support for this format isn\*(Aqt directly built into apt, the method will only be used if this file exists; e\&.g\&. for the
bzip2
method (the inbuilt) setting is:
.sp
.if n \{\
.RS 4
.\}
.nf
Dir::Bin::bzip2 "/bin/bzip2";
.fi
.if n \{\
.RE
.\}
.sp
Note also that list entries specified on the command line will be added at the end of the list specified in the configuration files, but before the default entries\&. To prefer a type in this case over the ones specified in the configuration files you can set the option direct \- not in list style\&. This will not override the defined list; it will only prefix the list with this type\&.
.sp
The special type
uncompressed
can be used to give uncompressed files a preference, but note that most archives don\*(Aqt provide uncompressed files so this is mostly only useable for local mirrors\&.
.RE
.PP
\fBGzipIndexes\fR
.RS 4
When downloading
gzip
compressed indexes (Packages, Sources, or Translations), keep them gzip compressed locally instead of unpacking them\&. This saves quite a lot of disk space at the expense of more CPU requirements when building the local package caches\&. False by default\&.
.RE
.PP
\fBLanguages\fR
.RS 4
The Languages subsection controls which
Translation
files are downloaded and in which order APT tries to display the description\-translations\&. APT will try to display the first available description in the language which is listed first\&. Languages can be defined with their short or long language codes\&. Note that not all archives provide
Translation
files for every language \- the long language codes are especially rare\&.
.sp
The default list includes "environment" and "en"\&. "environment" has a special meaning here: it will be replaced at runtime with the language codes extracted from the
LC_MESSAGES
environment variable\&. It will also ensure that these codes are not included twice in the list\&. If
LC_MESSAGES
is set to "C" only the
Translation\-en
file (if available) will be used\&. To force APT to use no Translation file use the setting
Acquire::Languages=none\&. "none" is another special meaning code which will stop the search for a suitable
Translation
file\&. This tells APT to download these translations too, without actually using them unless the environment specifies the languages\&. So the following example configuration will result in the order "en, de" in an English locale or "de, en" in a German one\&. Note that "fr" is downloaded, but not used unless APT is used in a French locale (where the order would be "fr, de, en")\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Acquire::Languages { "environment"; "de"; "en"; "none"; "fr"; };
.fi
.if n \{\
.RE
.\}
.sp
Note: To prevent problems resulting from APT being executed in different environments (e\&.g\&. by different users or by other programs) all Translation files which are found in
/var/lib/apt/lists/
will be added to the end of the list (after an implicit "none")\&.
.RE
.PP
\fBForceIPv4\fR
.RS 4
When downloading, force to use only the IPv4 protocol\&.
.RE
.PP
\fBForceIPv6\fR
.RS 4
When downloading, force to use only the IPv6 protocol\&.
.RE
.PP
\fBMaxReleaseFileSize\fR
.RS 4
The maximum file size of Release/Release\&.gpg/InRelease files\&. The default is 10MB\&.
.RE
.PP
\fBEnableSrvRecords\fR
.RS 4
This option controls if apt will use the DNS SRV server record as specified in RFC 2782 to select an alternative server to connect to\&. The default is "true"\&.
.RE
.PP
\fBAllowInsecureRepositories\fR
.RS 4
Allow update operations to load data files from repositories without sufficient security information\&. The default value is "false"\&. Concept, implications as well as alternatives are detailed in
\fBapt-secure\fR(8)\&.
.RE
.PP
\fBAllowWeakRepositories\fR
.RS 4
Allow update operations to load data files from repositories which provide security information, but these are deemed no longer cryptographically strong enough\&. The default value is "false"\&. Concept, implications as well as alternatives are detailed in
\fBapt-secure\fR(8)\&.
.RE
.PP
\fBAllowDowngradeToInsecureRepositories\fR
.RS 4
Allow that a repository that was previously gpg signed to become unsigned during an update operation\&. When there is no valid signature for a previously trusted repository apt will refuse the update\&. This option can be used to override this protection\&. You almost certainly never want to enable this\&. The default is
false\&. Concept, implications as well as alternatives are detailed in
\fBapt-secure\fR(8)\&.
.RE
.PP
\fBChangelogs::URI\fR scope
.RS 4
Acquiring changelogs can only be done if an URI is known from where to get them\&. Preferable the Release file indicates this in a \*(AqChangelogs\*(Aq field\&. If this isn\*(Aqt available the Label/Origin field of the Release file is used to check if a
Acquire::Changelogs::URI::Label::\fILABEL\fR
or
Acquire::Changelogs::URI::Origin::\fIORIGIN\fR
option exists and if so this value is taken\&. The value in the Release file can be overridden with
Acquire::Changelogs::URI::Override::Label::\fILABEL\fR
or
Acquire::Changelogs::URI::Override::Origin::\fIORIGIN\fR\&. The value should be a normal URI to a text file, except that package specific data is replaced with the placeholder
@CHANGEPATH@\&. The value for it is: 1\&. if the package is from a component (e\&.g\&.
main) this is the first part otherwise it is omitted, 2\&. the first letter of source package name, except if the source package name starts with \*(Aqlib\*(Aq in which case it will be the first four letters\&. 3\&. The complete source package name\&. 4\&. the complete name again and 5\&. the source version\&. The first (if present), second, third and fourth part are separated by a slash (\*(Aq/\*(Aq) and between the fourth and fifth part is an underscore (\*(Aq_\*(Aq)\&. The special value \*(Aqno\*(Aq is available for this option indicating that this source can\*(Aqt be used to acquire changelog files from\&. Another source will be tried if available in this case\&.
.RE
.SH "BINARY SPECIFIC CONFIGURATION"
.PP
Especially with the introduction of the
\fBapt\fR
binary it can be useful to set certain options only for a specific binary as even options which look like they would effect only a certain binary like
\fBAPT::Get::Show\-Versions\fR
effect
\fBapt\-get\fR
as well as
\fBapt\fR\&.
.PP
Setting an option for a specific binary only can be achieved by setting the option inside the
\fBBinary::\fR\fB\fIspecific\-binary\fR\fR
scope\&. Setting the option
\fBAPT::Get::Show\-Versions\fR
for the
\fBapt\fR
only can e\&.g\&. by done by setting
\fBBinary::apt::APT::Get::Show\-Versions\fR
instead\&.
.PP
Note that as seen in the DESCRIPTION section further above you can\*(Aqt set binary\-specific options on the commandline itself nor in configuration files loaded via the commandline\&.
.SH "DIRECTORIES"
.PP
The
Dir::State
section has directories that pertain to local state information\&.
lists
is the directory to place downloaded package lists in and
status
is the name of the
\fBdpkg\fR(1)
status file\&.
preferences
is the name of the APT
preferences
file\&.
Dir::State
contains the default directory to prefix on all sub\-items if they do not start with
/
or
\&./\&.
.PP
Dir::Cache
contains locations pertaining to local cache information, such as the two package caches
srcpkgcache
and
pkgcache
as well as the location to place downloaded archives,
Dir::Cache::archives\&. Generation of caches can be turned off by setting
pkgcache
or
srcpkgcache
to
""\&. This will slow down startup but save disk space\&. It is probably preferable to turn off the pkgcache rather than the srcpkgcache\&. Like
Dir::State
the default directory is contained in
Dir::Cache
.PP
Dir::Etc
contains the location of configuration files,
sourcelist
gives the location of the sourcelist and
main
is the default configuration file (setting has no effect, unless it is done from the config file specified by
\fBAPT_CONFIG\fR)\&.
.PP
The
Dir::Parts
setting reads in all the config fragments in lexical order from the directory specified\&. After this is done then the main config file is loaded\&.
.PP
Binary programs are pointed to by
Dir::Bin\&.
Dir::Bin::Methods
specifies the location of the method handlers and
gzip,
bzip2,
lzma,
dpkg,
apt\-get
dpkg\-source
dpkg\-buildpackage
and
apt\-cache
specify the location of the respective programs\&.
.PP
The configuration item
RootDir
has a special meaning\&. If set, all paths will be relative to
RootDir,
\fIeven paths that are specified absolutely\fR\&. So, for instance, if
RootDir
is set to
/tmp/staging
and
Dir::State::status
is set to
/var/lib/dpkg/status, then the status file will be looked up in
/tmp/staging/var/lib/dpkg/status\&. If you want to prefix only relative paths, set
Dir
instead\&.
.PP
The
Ignore\-Files\-Silently
list can be used to specify which files APT should silently ignore while parsing the files in the fragment directories\&. Per default a file which end with
\&.disabled,
~,
\&.bak
or
\&.dpkg\-[a\-z]+
is silently ignored\&. As seen in the last default value these patterns can use regular expression syntax\&.
.SH "APT IN DSELECT"
.PP
When APT is used as a
\fBdselect\fR(1)
method several configuration directives control the default behavior\&. These are in the
DSelect
section\&.
.PP
\fBClean\fR
.RS 4
Cache Clean mode; this value may be one of
always,
prompt,
auto,
pre\-auto
and
never\&.
always
and
prompt
will remove all packages from the cache after upgrading,
prompt
(the default) does so conditionally\&.
auto
removes only those packages which are no longer downloadable (replaced with a new version for instance)\&.
pre\-auto
performs this action before downloading new packages\&.
.RE
.PP
\fBoptions\fR
.RS 4
The contents of this variable are passed to
\fBapt-get\fR(8)
as command line options when it is run for the install phase\&.
.RE
.PP
\fBUpdateoptions\fR
.RS 4
The contents of this variable are passed to
\fBapt-get\fR(8)
as command line options when it is run for the update phase\&.
.RE
.PP
\fBPromptAfterUpdate\fR
.RS 4
If true the [U]pdate operation in
\fBdselect\fR(1)
will always prompt to continue\&. The default is to prompt only on error\&.
.RE
.SH "HOW APT CALLS DPKG(1)"
.PP
Several configuration directives control how APT invokes
\fBdpkg\fR(1)\&. These are in the
DPkg
section\&.
.PP
\fBoptions\fR
.RS 4
This is a list of options to pass to
\fBdpkg\fR(1)\&. The options must be specified using the list notation and each list item is passed as a single argument to
\fBdpkg\fR(1)\&.
.RE
.PP
\fBPre\-Invoke\fR, \fBPost\-Invoke\fR
.RS 4
This is a list of shell commands to run before/after invoking
\fBdpkg\fR(1)\&. Like
options
this must be specified in list notation\&. The commands are invoked in order using
/bin/sh; should any fail APT will abort\&.
.RE
.PP
\fBPre\-Install\-Pkgs\fR
.RS 4
This is a list of shell commands to run before invoking
\fBdpkg\fR(1)\&. Like
options
this must be specified in list notation\&. The commands are invoked in order using
/bin/sh; should any fail APT will abort\&. APT will pass the filenames of all \&.deb files it is going to install to the commands, one per line on the requested file descriptor, defaulting to standard input\&.
.sp
Version 2 of this protocol sends more information through the requested file descriptor: a line with the text
VERSION 2, the APT configuration space, and a list of package actions with filename and version information\&.
.sp
Each configuration directive line has the form
key=value\&. Special characters (equal signs, newlines, nonprintable characters, quotation marks, and percent signs in
key
and newlines, nonprintable characters, and percent signs in
value) are %\-encoded\&. Lists are represented by multiple
key::=value
lines with the same key\&. The configuration section ends with a blank line\&.
.sp
Package action lines consist of five fields in Version 2: package name (without architecture qualification even if foreign), old version, direction of version change (< for upgrades, > for downgrades, = for no change), new version, action\&. The version fields are "\-" for no version at all (for example when installing a package for the first time; no version is treated as earlier than any real version, so that is an upgrade, indicated as
\- < 1\&.23\&.4)\&. The action field is "**CONFIGURE**" if the package is being configured, "**REMOVE**" if it is being removed, or the filename of a \&.deb file if it is being unpacked\&.
.sp
In Version 3 after each version field follows the architecture of this version, which is "\-" if there is no version, and a field showing the MultiArch type "same", "foreign", "allowed" or "none"\&. Note that "none" is an incorrect typename which is just kept to remain compatible, it should be read as "no" and users are encouraged to support both\&.
.sp
The version of the protocol to be used for the command
\fIcmd\fR
can be chosen by setting
DPkg::Tools::options::\fIcmd\fR::Version
accordingly, the default being version 1\&. If APT isn\*(Aqt supporting the requested version it will send the information in the highest version it has support for instead\&.
.sp
The file descriptor to be used to send the information can be requested with
DPkg::Tools::options::\fIcmd\fR::InfoFD
which defaults to
0
for standard input and is available since version 0\&.9\&.11\&. Support for the option can be detected by looking for the environment variable
\fBAPT_HOOK_INFO_FD\fR
which contains the number of the used file descriptor as a confirmation\&.
.RE
.PP
\fBRun\-Directory\fR
.RS 4
APT chdirs to this directory before invoking
\fBdpkg\fR(1), the default is
/\&.
.RE
.PP
\fBBuild\-options\fR
.RS 4
These options are passed to
\fBdpkg-buildpackage\fR(1)
when compiling packages; the default is to disable signing and produce all binaries\&.
.RE
.PP
\fBDPkg::ConfigurePending\fR
.RS 4
If this option is set APT will call
\fBdpkg \-\-configure \-\-pending\fR
to let
\fBdpkg\fR(1)
handle all required configurations and triggers\&. This option is activated by default, but deactivating it could be useful if you want to run APT multiple times in a row \- e\&.g\&. in an installer\&. In this scenario you could deactivate this option in all but the last run\&.
.RE
.SH "PERIODIC AND ARCHIVES OPTIONS"
.PP
APT::Periodic
and
APT::Archives
groups of options configure behavior of apt periodic updates, which is done by the
/usr/lib/apt/apt\&.systemd\&.daily
script\&. See the top of this script for the brief documentation of these options\&.
.SH "DEBUG OPTIONS"
.PP
Enabling options in the
Debug::
section will cause debugging information to be sent to the standard error stream of the program utilizing the
apt
libraries, or enable special program modes that are primarily useful for debugging the behavior of
apt\&. Most of these options are not interesting to a normal user, but a few may be:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Debug::pkgProblemResolver
enables output about the decisions made by
dist\-upgrade, upgrade, install, remove, purge\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Debug::NoLocking
disables all file locking\&. This can be used to run some operations (for instance,
apt\-get \-s install) as a non\-root user\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Debug::pkgDPkgPM
prints out the actual command line each time that
apt
invokes
\fBdpkg\fR(1)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Debug::IdentCdrom
disables the inclusion of statfs data in CD\-ROM IDs\&.
.RE
.PP
A full list of debugging options to apt follows\&.
.PP
\fBDebug::Acquire::cdrom\fR
.RS 4
Print information related to accessing
cdrom://
sources\&.
.RE
.PP
\fBDebug::Acquire::ftp\fR
.RS 4
Print information related to downloading packages using FTP\&.
.RE
.PP
\fBDebug::Acquire::http\fR
.RS 4
Print information related to downloading packages using HTTP\&.
.RE
.PP
\fBDebug::Acquire::https\fR
.RS 4
Print information related to downloading packages using HTTPS\&.
.RE
.PP
\fBDebug::Acquire::gpgv\fR
.RS 4
Print information related to verifying cryptographic signatures using
gpg\&.
.RE
.PP
\fBDebug::aptcdrom\fR
.RS 4
Output information about the process of accessing collections of packages stored on CD\-ROMs\&.
.RE
.PP
\fBDebug::BuildDeps\fR
.RS 4
Describes the process of resolving build\-dependencies in
\fBapt-get\fR(8)\&.
.RE
.PP
\fBDebug::Hashes\fR
.RS 4
Output each cryptographic hash that is generated by the
apt
libraries\&.
.RE
.PP
\fBDebug::IdentCDROM\fR
.RS 4
Do not include information from
statfs, namely the number of used and free blocks on the CD\-ROM filesystem, when generating an ID for a CD\-ROM\&.
.RE
.PP
\fBDebug::NoLocking\fR
.RS 4
Disable all file locking\&. For instance, this will allow two instances of
\(lqapt\-get update\(rq
to run at the same time\&.
.RE
.PP
\fBDebug::pkgAcquire\fR
.RS 4
Log when items are added to or removed from the global download queue\&.
.RE
.PP
\fBDebug::pkgAcquire::Auth\fR
.RS 4
Output status messages and errors related to verifying checksums and cryptographic signatures of downloaded files\&.
.RE
.PP
\fBDebug::pkgAcquire::Diffs\fR
.RS 4
Output information about downloading and applying package index list diffs, and errors relating to package index list diffs\&.
.RE
.PP
\fBDebug::pkgAcquire::RRed\fR
.RS 4
Output information related to patching apt package lists when downloading index diffs instead of full indices\&.
.RE
.PP
\fBDebug::pkgAcquire::Worker\fR
.RS 4
Log all interactions with the sub\-processes that actually perform downloads\&.
.RE
.PP
\fBDebug::pkgAutoRemove\fR
.RS 4
Log events related to the automatically\-installed status of packages and to the removal of unused packages\&.
.RE
.PP
\fBDebug::pkgDepCache::AutoInstall\fR
.RS 4
Generate debug messages describing which packages are being automatically installed to resolve dependencies\&. This corresponds to the initial auto\-install pass performed in, e\&.g\&.,
apt\-get install, and not to the full
apt
dependency resolver; see
Debug::pkgProblemResolver
for that\&.
.RE
.PP
\fBDebug::pkgDepCache::Marker\fR
.RS 4
Generate debug messages describing which packages are marked as keep/install/remove while the ProblemResolver does his work\&. Each addition or deletion may trigger additional actions; they are shown indented two additional spaces under the original entry\&. The format for each line is
MarkKeep,
MarkDelete
or
MarkInstall
followed by
package\-name d\&.e\&.f | x\&.y\&.z> (section)
where
a\&.b\&.c
is the current version of the package,
d\&.e\&.f
is the version considered for installation and
x\&.y\&.z
is a newer version, but not considered for installation (because of a low pin score)\&. The later two can be omitted if there is none or if it is the same as the installed version\&.
section
is the name of the section the package appears in\&.
.RE
.PP
\fBDebug::pkgDPkgPM\fR
.RS 4
When invoking
\fBdpkg\fR(1), output the precise command line with which it is being invoked, with arguments separated by a single space character\&.
.RE
.PP
\fBDebug::pkgDPkgProgressReporting\fR
.RS 4
Output all the data received from
\fBdpkg\fR(1)
on the status file descriptor and any errors encountered while parsing it\&.
.RE
.PP
\fBDebug::pkgOrderList\fR
.RS 4
Generate a trace of the algorithm that decides the order in which
apt
should pass packages to
\fBdpkg\fR(1)\&.
.RE
.PP
\fBDebug::pkgPackageManager\fR
.RS 4
Output status messages tracing the steps performed when invoking
\fBdpkg\fR(1)\&.
.RE
.PP
\fBDebug::pkgPolicy\fR
.RS 4
Output the priority of each package list on startup\&.
.RE
.PP
\fBDebug::pkgProblemResolver\fR
.RS 4
Trace the execution of the dependency resolver (this applies only to what happens when a complex dependency problem is encountered)\&.
.RE
.PP
\fBDebug::pkgProblemResolver::ShowScores\fR
.RS 4
Display a list of all installed packages with their calculated score used by the pkgProblemResolver\&. The description of the package is the same as described in
Debug::pkgDepCache::Marker
.RE
.PP
\fBDebug::sourceList\fR
.RS 4
Print information about the vendors read from
/etc/apt/vendors\&.list\&.
.RE
.PP
\fBDebug::RunScripts\fR
.RS 4
Display the external commands that are called by apt hooks\&. This includes e\&.g\&. the config options
DPkg::{Pre,Post}\-Invoke
or
APT::Update::{Pre,Post}\-Invoke\&.
.RE
.SH "EXAMPLES"
.PP
/usr/share/doc/apt/examples/configure\-index\&.gz
is a configuration file showing example values for all possible options\&.
.SH "FILES"
.PP
/etc/apt/apt\&.conf
.RS 4
APT configuration file\&. Configuration Item:
Dir::Etc::Main\&.
.RE
.PP
/etc/apt/apt\&.conf\&.d/
.RS 4
APT configuration file fragments\&. Configuration Item:
Dir::Etc::Parts\&.
.RE
.SH "SEE ALSO"
.PP
\fBapt-cache\fR(8),
\fBapt-config\fR(8),
\fBapt_preferences\fR(5)\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.PP
\fBDaniel Burrows\fR <\&dburrows@debian\&.org\&>
.RS 4
Initial documentation of Debug::*\&.
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man5/apt_preferences.5
================================================
'\" t
.\" Title: apt_preferences
.\" Author: APT team
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 15\ \&August\ \&2015
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT_PREFERENCES" "5" "15\ \&August\ \&2015" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt_preferences \- Preference control file for APT
.SH "DESCRIPTION"
.PP
The APT preferences file
/etc/apt/preferences
and the fragment files in the
/etc/apt/preferences\&.d/
folder can be used to control which versions of packages will be selected for installation\&.
.PP
Several versions of a package may be available for installation when the
\fBsources.list\fR(5)
file contains references to more than one distribution (for example,
stable
and
testing)\&. APT assigns a priority to each version that is available\&. Subject to dependency constraints,
\fBapt\-get\fR
selects the version with the highest priority for installation\&. The APT preferences override the priorities that APT assigns to package versions by default, thus giving the user control over which one is selected for installation\&.
.PP
Several instances of the same version of a package may be available when the
\fBsources.list\fR(5)
file contains references to more than one source\&. In this case
\fBapt\-get\fR
downloads the instance listed earliest in the
\fBsources.list\fR(5)
file\&. The APT preferences do not affect the choice of instance, only the choice of version\&.
.PP
Preferences are a strong power in the hands of a system administrator but they can become also their biggest nightmare if used without care! APT will not question the preferences, so wrong settings can lead to uninstallable packages or wrong decisions while upgrading packages\&. Even more problems will arise if multiple distribution releases are mixed without a good understanding of the following paragraphs\&. Packages included in a specific release aren\*(Aqt tested in (and therefore don\*(Aqt always work as expected in) older or newer releases, or together with other packages from different releases\&. You have been warned\&.
.PP
Note that the files in the
/etc/apt/preferences\&.d
directory are parsed in alphanumeric ascending order and need to obey the following naming convention: The files have either no or "pref" as filename extension and only contain alphanumeric, hyphen (\-), underscore (_) and period (\&.) characters\&. Otherwise APT will print a notice that it has ignored a file, unless that file matches a pattern in the
Dir::Ignore\-Files\-Silently
configuration list \- in which case it will be silently ignored\&.
.SS "APT\*(Aqs Default Priority Assignments"
.PP
If there is no preferences file or if there is no entry in the file that applies to a particular version then the priority assigned to that version is the priority of the distribution to which that version belongs\&. It is possible to single out a distribution, "the target release", which receives a higher priority than other distributions do by default\&. The target release can be set on the
\fBapt\-get\fR
command line or in the APT configuration file
/etc/apt/apt\&.conf\&. Note that this has precedence over any general priority you set in the
/etc/apt/preferences
file described later, but not over specifically pinned packages\&. For example,
.sp
.if n \{\
.RS 4
.\}
.nf
\fBapt\-get install \-t testing \fR\fB\fIsome\-package\fR\fR
.fi
.if n \{\
.RE
.\}
.sp
.sp
.if n \{\
.RS 4
.\}
.nf
APT::Default\-Release "stable";
.fi
.if n \{\
.RE
.\}
.PP
If the target release has been specified then APT uses the following algorithm to set the priorities of the versions of a package\&. Assign:
.PP
priority 1
.RS 4
to the versions coming from archives which in their
Release
files are marked as "NotAutomatic: yes" but
\fInot\fR
as "ButAutomaticUpgrades: yes" like the Debian
experimental
archive\&.
.RE
.PP
priority 100
.RS 4
to the version that is already installed (if any) and to the versions coming from archives which in their
Release
files are marked as "NotAutomatic: yes" and "ButAutomaticUpgrades: yes" like the Debian backports archive since
squeeze\-backports\&.
.RE
.PP
priority 500
.RS 4
to the versions that do not belong to the target release\&.
.RE
.PP
priority 990
.RS 4
to the versions that belong to the target release\&.
.RE
The highest of those priorities whose description matches the version is assigned to the version\&.
.PP
If the target release has not been specified then APT simply assigns priority 100 to all installed package versions and priority 500 to all uninstalled package versions, except versions coming from archives which in their
Release
files are marked as "NotAutomatic: yes" \- these versions get the priority 1 or priority 100 if it is additionally marked as "ButAutomaticUpgrades: yes"\&.
.PP
APT then applies the following rules, listed in order of precedence, to determine which version of a package to install\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Never downgrade unless the priority of an available version exceeds 1000\&. ("Downgrading" is installing a less recent version of a package in place of a more recent version\&. Note that none of APT\*(Aqs default priorities exceeds 1000; such high priorities can only be set in the preferences file\&. Note also that downgrading a package can be risky\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Install the highest priority version\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If two or more versions have the same priority, install the most recent one (that is, the one with the higher version number)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If two or more versions have the same priority and version number but either the packages differ in some of their metadata or the
\-\-reinstall
option is given, install the uninstalled one\&.
.RE
.PP
In a typical situation, the installed version of a package (priority 100) is not as recent as one of the versions available from the sources listed in the
\fBsources.list\fR(5)
file (priority 500 or 990)\&. Then the package will be upgraded when
\fBapt\-get install \fR\fB\fIsome\-package\fR\fR
or
\fBapt\-get upgrade\fR
is executed\&.
.PP
More rarely, the installed version of a package is
\fImore\fR
recent than any of the other available versions\&. The package will not be downgraded when
\fBapt\-get install \fR\fB\fIsome\-package\fR\fR
or
\fBapt\-get upgrade\fR
is executed\&.
.PP
Sometimes the installed version of a package is more recent than the version belonging to the target release, but not as recent as a version belonging to some other distribution\&. Such a package will indeed be upgraded when
\fBapt\-get install \fR\fB\fIsome\-package\fR\fR
or
\fBapt\-get upgrade\fR
is executed, because at least
\fIone\fR
of the available versions has a higher priority than the installed version\&.
.SS "The Effect of APT Preferences"
.PP
The APT preferences file allows the system administrator to control the assignment of priorities\&. The file consists of one or more multi\-line records separated by blank lines\&. Records can have one of two forms, a specific form and a general form\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The specific form assigns a priority (a "Pin\-Priority") to one or more specified packages with a specified version or version range\&. For example, the following record assigns a high priority to all versions of the
perl
package whose version number begins with "5\&.20"\&. Multiple packages can be separated by spaces\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: perl
Pin: version 5\&.20*
Pin\-Priority: 1001
.fi
.if n \{\
.RE
.\}
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The general form assigns a priority to all of the package versions in a given distribution (that is, to all the versions of packages that are listed in a certain
Release
file) or to all of the package versions coming from a particular Internet site, as identified by the site\*(Aqs fully qualified domain name\&.
.sp
This general\-form entry in the APT preferences file applies only to groups of packages\&. For example, the following record assigns a high priority to all package versions available from the local site\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: origin ""
Pin\-Priority: 999
.fi
.if n \{\
.RE
.\}
.sp
A note of caution: the keyword used here is "origin" which can be used to match a hostname\&. The following record will assign a high priority to all versions available from the server identified by the hostname "ftp\&.de\&.debian\&.org"
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: origin "ftp\&.de\&.debian\&.org"
Pin\-Priority: 999
.fi
.if n \{\
.RE
.\}
.sp
This should
\fInot\fR
be confused with the Origin of a distribution as specified in a
Release
file\&. What follows the "Origin:" tag in a
Release
file is not an Internet address but an author or vendor name, such as "Debian" or "Ximian"\&.
.sp
The following record assigns a low priority to all package versions belonging to any distribution whose Archive name is "unstable"\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: release a=unstable
Pin\-Priority: 50
.fi
.if n \{\
.RE
.\}
.sp
The following record assigns a high priority to all package versions belonging to any distribution whose Codename is "buster"\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: release n=buster
Pin\-Priority: 900
.fi
.if n \{\
.RE
.\}
.sp
The following record assigns a high priority to all package versions belonging to any release whose Archive name is "stable" and whose release Version number is "9"\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: release a=stable, v=9
Pin\-Priority: 500
.fi
.if n \{\
.RE
.\}
.RE
.sp
The effect of the comma operator is similar to an "and" in logic: All conditions must be satisfied for the pin to match\&. There is one exception: For any type of condition (such as two "a" conditions), only the last such condition is checked\&.
.SS "Regular expressions and glob(7) syntax"
.PP
APT also supports pinning by
\fBglob\fR(7)
expressions, and regular expressions surrounded by slashes\&. For example, the following example assigns the priority 500 to all packages from experimental where the name starts with gnome (as a
\fBglob\fR(7)\-like expression) or contains the word kde (as a POSIX extended regular expression surrounded by slashes)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: gnome* /kde/
Pin: release a=experimental
Pin\-Priority: 500
.fi
.if n \{\
.RE
.\}
.PP
The rule for those expressions is that they can occur anywhere where a string can occur\&. Thus, the following pin assigns the priority 990 to all packages from a release starting with xenial\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: release n=xenial*
Pin\-Priority: 990
.fi
.if n \{\
.RE
.\}
.PP
If a regular expression occurs in a
Package
field, the behavior is the same as if this regular expression were replaced with a list of all package names it matches\&. It is undecided whether this will change in the future; thus you should always list wild\-card pins first, so later specific pins override it\&. The pattern "*" in a Package field is not considered a
\fBglob\fR(7)
expression in itself\&.
.SS "How APT Interprets Priorities"
.PP
Priorities (P) assigned in the APT preferences file must be positive or negative integers\&. They are interpreted as follows (roughly speaking):
.PP
P >= 1000
.RS 4
causes a version to be installed even if this constitutes a downgrade of the package
.RE
.PP
990 <= P < 1000
.RS 4
causes a version to be installed even if it does not come from the target release, unless the installed version is more recent
.RE
.PP
500 <= P < 990
.RS 4
causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent
.RE
.PP
100 <= P < 500
.RS 4
causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent
.RE
.PP
0 < P < 100
.RS 4
causes a version to be installed only if there is no installed version of the package
.RE
.PP
P < 0
.RS 4
prevents the version from being installed
.RE
.PP
P = 0
.RS 4
has undefined behaviour, do not use it\&.
.RE
.PP
The first specific\-form record matching an available package version determines the priority of the package version\&. Failing that, the priority of the package is defined as the maximum of all priorities defined by generic\-form records matching the version\&. Records defined using patterns in the Pin field other than "*" are treated like specific\-form records\&.
.PP
For example, suppose the APT preferences file contains the three records presented earlier:
.sp
.if n \{\
.RS 4
.\}
.nf
Package: perl
Pin: version 5\&.20*
Pin\-Priority: 1001
Package: *
Pin: origin ""
Pin\-Priority: 999
Package: *
Pin: release unstable
Pin\-Priority: 50
.fi
.if n \{\
.RE
.\}
.PP
Then:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The most recent available version of the
perl
package will be installed, so long as that version\*(Aqs version number begins with "5\&.20"\&. If
\fIany\fR
5\&.20* version of
perl
is available and the installed version is 5\&.24*, then
perl
will be downgraded\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
A version of any package other than
perl
that is available from the local system has priority over other versions, even versions belonging to the target release\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
A version of a package whose origin is not the local system but some other site listed in
\fBsources.list\fR(5)
and which belongs to an
unstable
distribution is only installed if it is selected for installation and no version of the package is already installed\&.
.RE
.sp
.SS "Determination of Package Version and Distribution Properties"
.PP
The locations listed in the
\fBsources.list\fR(5)
file should provide
Packages
and
Release
files to describe the packages available at that location\&.
.PP
The
Packages
file is normally found in the directory
\&.\&.\&./dists/\fIdist\-name\fR/\fIcomponent\fR/\fIarch\fR: for example,
\&.\&.\&./dists/stable/main/binary\-i386/Packages\&. It consists of a series of multi\-line records, one for each package available in that directory\&. Only two lines in each record are relevant for setting APT priorities:
.PP
the Package: line
.RS 4
gives the package name
.RE
.PP
the Version: line
.RS 4
gives the version number for the named package
.RE
.PP
The
Release
file is normally found in the directory
\&.\&.\&./dists/\fIdist\-name\fR: for example,
\&.\&.\&./dists/stable/Release, or
\&.\&.\&./dists/stretch/Release\&. It consists of a single multi\-line record which applies to
\fIall\fR
of the packages in the directory tree below its parent\&. Unlike the
Packages
file, nearly all of the lines in a
Release
file are relevant for setting APT priorities:
.PP
the Archive: or Suite: line
.RS 4
names the archive to which all the packages in the directory tree belong\&. For example, the line "Archive: stable" or "Suite: stable" specifies that all of the packages in the directory tree below the parent of the
Release
file are in a
stable
archive\&. Specifying this value in the APT preferences file would require the line:
.sp
.if n \{\
.RS 4
.\}
.nf
Pin: release a=stable
.fi
.if n \{\
.RE
.\}
.RE
.PP
the Codename: line
.RS 4
names the codename to which all the packages in the directory tree belong\&. For example, the line "Codename: buster" specifies that all of the packages in the directory tree below the parent of the
Release
file belong to a version named
buster\&. Specifying this value in the APT preferences file would require the line:
.sp
.if n \{\
.RS 4
.\}
.nf
Pin: release n=buster
.fi
.if n \{\
.RE
.\}
.RE
.PP
the Version: line
.RS 4
names the release version\&. For example, the packages in the tree might belong to Debian release version 9\&. Note that there is normally no version number for the
testing
and
unstable
distributions because they have not been released yet\&. Specifying this in the APT preferences file would require one of the following lines\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Pin: release v=9
Pin: release a=stable, v=9
Pin: release 9
.fi
.if n \{\
.RE
.\}
.RE
.PP
the Component: line
.RS 4
names the licensing component associated with the packages in the directory tree of the
Release
file\&. For example, the line "Component: main" specifies that all the packages in the directory tree are from the
main
component, which entails that they are licensed under terms listed in the Debian Free Software Guidelines\&. Specifying this component in the APT preferences file would require the line:
.sp
.if n \{\
.RS 4
.\}
.nf
Pin: release c=main
.fi
.if n \{\
.RE
.\}
.RE
.PP
the Origin: line
.RS 4
names the originator of the packages in the directory tree of the
Release
file\&. Most commonly, this is
Debian\&. Specifying this origin in the APT preferences file would require the line:
.sp
.if n \{\
.RS 4
.\}
.nf
Pin: release o=Debian
.fi
.if n \{\
.RE
.\}
.RE
.PP
the Label: line
.RS 4
names the label of the packages in the directory tree of the
Release
file\&. Most commonly, this is
Debian\&. Specifying this label in the APT preferences file would require the line:
.sp
.if n \{\
.RS 4
.\}
.nf
Pin: release l=Debian
.fi
.if n \{\
.RE
.\}
.RE
.PP
All of the
Packages
and
Release
files retrieved from locations listed in the
\fBsources.list\fR(5)
file are stored in the directory
/var/lib/apt/lists, or in the file named by the variable
Dir::State::Lists
in the
apt\&.conf
file\&. For example, the file
debian\&.lcs\&.mit\&.edu_debian_dists_unstable_contrib_binary\-i386_Release
contains the
Release
file retrieved from the site
debian\&.lcs\&.mit\&.edu
for
binary\-i386
architecture files from the
contrib
component of the
unstable
distribution\&.
.SS "Optional Lines in an APT Preferences Record"
.PP
Each record in the APT preferences file can optionally begin with one or more lines beginning with the word
Explanation:\&. This provides a place for comments\&.
.SH "EXAMPLES"
.SS "Tracking Stable"
.PP
The following APT preferences file will cause APT to assign a priority higher than the default (500) to all package versions belonging to a
stable
distribution and a prohibitively low priority to package versions belonging to other
Debian
distributions\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Explanation: Uninstall or do not install any Debian\-originated
Explanation: package versions other than those in the stable distro
Package: *
Pin: release a=stable
Pin\-Priority: 900
Package: *
Pin: release o=Debian
Pin\-Priority: \-10
.fi
.if n \{\
.RE
.\}
.PP
With a suitable
\fBsources.list\fR(5)
file and the above preferences file, any of the following commands will cause APT to upgrade to the latest
stable
version(s)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
apt\-get install \fIpackage\-name\fR
apt\-get upgrade
apt\-get dist\-upgrade
.fi
.if n \{\
.RE
.\}
.PP
The following command will cause APT to upgrade the specified package to the latest version from the
testing
distribution; the package will not be upgraded again unless this command is given again\&.
.sp
.if n \{\
.RS 4
.\}
.nf
apt\-get install \fIpackage\fR/testing
.fi
.if n \{\
.RE
.\}
.sp
.SS "Tracking Testing or Unstable"
.PP
The following APT preferences file will cause APT to assign a high priority to package versions from the
testing
distribution, a lower priority to package versions from the
unstable
distribution, and a prohibitively low priority to package versions from other
Debian
distributions\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Package: *
Pin: release a=testing
Pin\-Priority: 900
Package: *
Pin: release a=unstable
Pin\-Priority: 800
Package: *
Pin: release o=Debian
Pin\-Priority: \-10
.fi
.if n \{\
.RE
.\}
.PP
With a suitable
\fBsources.list\fR(5)
file and the above preferences file, any of the following commands will cause APT to upgrade to the latest
testing
version(s)\&.
.sp
.if n \{\
.RS 4
.\}
.nf
apt\-get install \fIpackage\-name\fR
apt\-get upgrade
apt\-get dist\-upgrade
.fi
.if n \{\
.RE
.\}
.PP
The following command will cause APT to upgrade the specified package to the latest version from the
unstable
distribution\&. Thereafter,
\fBapt\-get upgrade\fR
will upgrade the package to the most recent
testing
version if that is more recent than the installed version, otherwise, to the most recent
unstable
version if that is more recent than the installed version\&.
.sp
.if n \{\
.RS 4
.\}
.nf
apt\-get install \fIpackage\fR/unstable
.fi
.if n \{\
.RE
.\}
.sp
.SS "Tracking the evolution of a codename release"
.PP
The following APT preferences file will cause APT to assign a priority higher than the default (500) to all package versions belonging to a specified codename of a distribution and a prohibitively low priority to package versions belonging to other
Debian
distributions, codenames and archives\&. Note that with this APT preference APT will follow the migration of a release from the archive
testing
to
stable
and later
oldstable\&. If you want to follow for example the progress in
testing
notwithstanding the codename changes you should use the example configurations above\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Explanation: Uninstall or do not install any Debian\-originated package versions
Explanation: other than those in the distribution codenamed with buster or sid
Package: *
Pin: release n=buster
Pin\-Priority: 900
Explanation: Debian unstable is always codenamed with sid
Package: *
Pin: release n=sid
Pin\-Priority: 800
Package: *
Pin: release o=Debian
Pin\-Priority: \-10
.fi
.if n \{\
.RE
.\}
.PP
With a suitable
\fBsources.list\fR(5)
file and the above preferences file, any of the following commands will cause APT to upgrade to the latest version(s) in the release codenamed with
buster\&.
.sp
.if n \{\
.RS 4
.\}
.nf
apt\-get install \fIpackage\-name\fR
apt\-get upgrade
apt\-get dist\-upgrade
.fi
.if n \{\
.RE
.\}
.PP
The following command will cause APT to upgrade the specified package to the latest version from the
sid
distribution\&. Thereafter,
\fBapt\-get upgrade\fR
will upgrade the package to the most recent
buster
version if that is more recent than the installed version, otherwise, to the most recent
sid
version if that is more recent than the installed version\&.
.sp
.if n \{\
.RS 4
.\}
.nf
apt\-get install \fIpackage\fR/sid
.fi
.if n \{\
.RE
.\}
.sp
.SH "FILES"
.PP
/etc/apt/preferences
.RS 4
Version preferences file\&. This is where you would specify "pinning", i\&.e\&. a preference to get certain packages from a separate source or from a different version of a distribution\&. Configuration Item:
Dir::Etc::Preferences\&.
.RE
.PP
/etc/apt/preferences\&.d/
.RS 4
File fragments for the version preferences\&. Configuration Item:
Dir::Etc::PreferencesParts\&.
.RE
.SH "SEE ALSO"
.PP
\fBapt-get\fR(8)
\fBapt-cache\fR(8)
\fBapt.conf\fR(5)
\fBsources.list\fR(5)
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHOR"
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man5/sources.list.5
================================================
'\" t
.\" Title: sources.list
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 25\ \&November\ \&2016
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "SOURCES\&.LIST" "5" "25\ \&November\ \&2016" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sources.list \- List of configured APT data sources
.SH "DESCRIPTION"
.PP
The source list
/etc/apt/sources\&.list
and the files contained in
/etc/apt/sources\&.list\&.d/
are designed to support any number of active sources and a variety of source media\&. The files list one source per line (one\-line style) or contain multiline stanzas defining one or more sources per stanza (deb822 style), with the most preferred source listed first (in case a single version is available from more than one source)\&. The information available from the configured sources is acquired by
\fBapt\-get update\fR
(or by an equivalent command from another APT front\-end)\&.
.SH "SOURCES\&.LIST\&.D"
.PP
The
/etc/apt/sources\&.list\&.d
directory provides a way to add sources\&.list entries in separate files\&. Two different file formats are allowed as described in the next two sections\&. Filenames need to have either the extension
\&.list
or
\&.sources
depending on the contained format\&. The filenames may only contain letters (a\-z and A\-Z), digits (0\-9), underscore (_), hyphen (\-) and period (\&.) characters\&. Otherwise APT will print a notice that it has ignored a file, unless that file matches a pattern in the
Dir::Ignore\-Files\-Silently
configuration list \- in which case it will be silently ignored\&.
.SH "ONE\-LINE\-STYLE FORMAT"
.PP
Files in this format have the extension
\&.list\&. Each line specifying a source starts with a type (e\&.g\&.
deb\-src) followed by options and arguments for this type\&. Individual entries cannot be continued onto a following line\&. Empty lines are ignored, and a
#
character anywhere on a line marks the remainder of that line as a comment\&. Consequently an entry can be disabled by commenting out the entire line\&. If options should be provided they are separated by spaces and all of them together are enclosed by square brackets ([]) included in the line after the type separated from it with a space\&. If an option allows multiple values these are separated from each other with a comma (,)\&. An option name is separated from its value(s) by an equals sign (=)\&. Multivalue options also have
\-=
and
+=
as separators, which instead of replacing the default with the given value(s) modify the default value(s) to remove or include the given values\&.
.PP
This is the traditional format and supported by all apt versions\&. Note that not all options as described below are supported by all apt versions\&. Note also that some older applications parsing this format on their own might not expect to encounter options as they were uncommon before the introduction of multi\-architecture support\&.
.SH "DEB822\-STYLE FORMAT"
.PP
Files in this format have the extension
\&.sources\&. The format is similar in syntax to other files used by Debian and its derivatives, such as the metadata files that apt will download from the configured sources or the
debian/control
file in a Debian source package\&. Individual entries are separated by an empty line; additional empty lines are ignored, and a
#
character at the start of the line marks the entire line as a comment\&. An entry can hence be disabled by commenting out each line belonging to the stanza, but it is usually easier to add the field "Enabled: no" to the stanza to disable the entry\&. Removing the field or setting it to yes reenables it\&. Options have the same syntax as every other field: A fieldname separated by a colon (:) and optionally spaces from its value(s)\&. Note especially that multiple values are separated by spaces, not by commas as in the one\-line format\&. Multivalue fields like
Architectures
also have
Architectures\-Add
and
Architectures\-Remove
to modify the default value rather than replacing it\&.
.PP
This is a new format supported by apt itself since version 1\&.1\&. Previous versions ignore such files with a notice message as described earlier\&. It is intended to make this format gradually the default format, deprecating the previously described one\-line\-style format, as it is easier to create, extend and modify for humans and machines alike especially if a lot of sources and/or options are involved\&. Developers who are working with and/or parsing apt sources are highly encouraged to add support for this format and to contact the APT team to coordinate and share this work\&. Users can freely adopt this format already, but may encounter problems with software not supporting the format yet\&.
.SH "THE DEB AND DEB\-SRC TYPES: GENERAL FORMAT"
.PP
The
deb
type references a typical two\-level Debian archive,
distribution/component\&. The
distribution
is generally a suite name like
stable
or
testing
or a codename like
stretch
or
buster
while component is one of
main,
contrib
or
non\-free\&. The
deb\-src
type references a Debian distribution\*(Aqs source code in the same form as the
deb
type\&. A
deb\-src
line is required to fetch source indexes\&.
.PP
The format for two one\-line\-style entries using the
deb
and
deb\-src
types is:
.sp
.if n \{\
.RS 4
.\}
.nf
deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [\&.\&.\&.]
deb\-src [ option1=value1 option2=value2 ] uri suite [component1] [component2] [\&.\&.\&.]
.fi
.if n \{\
.RE
.\}
.PP
Alternatively the equivalent entry in deb822 style looks like this:
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb deb\-src
URIs: uri
Suites: suite
Components: [component1] [component2] [\&.\&.\&.]
option1: value1
option2: value2
.fi
.if n \{\
.RE
.\}
.PP
The URI for the
deb
type must specify the base of the Debian distribution, from which APT will find the information it needs\&.
suite
can specify an exact path, in which case the components must be omitted and
suite
must end with a slash (/)\&. This is useful for the case when only a particular sub\-directory of the archive denoted by the URI is of interest\&. If
suite
does not specify an exact path, at least one
component
must be present\&.
.PP
suite
may also contain a variable,
$(ARCH)
which expands to the Debian architecture (such as
amd64
or
armel) used on the system\&. This permits architecture\-independent
sources\&.list
files to be used\&. In general this is only of interest when specifying an exact path;
APT
will automatically generate a URI with the current architecture otherwise\&.
.PP
Especially in the one\-line\-style format since only one distribution can be specified per line it may be necessary to have multiple lines for the same URI, if a subset of all available distributions or components at that location is desired\&. APT will sort the URI list after it has generated a complete set internally, and will collapse multiple references to the same Internet host, for instance, into a single connection, so that it does not inefficiently establish a connection, close it, do something else, and then re\-establish a connection to that same host\&. APT also parallelizes connections to different hosts to more effectively deal with sites with low bandwidth\&.
.PP
It is important to list sources in order of preference, with the most preferred source listed first\&. Typically this will result in sorting by speed from fastest to slowest (CD\-ROM followed by hosts on a local network, followed by distant Internet hosts, for example)\&.
.PP
As an example, the sources for your distribution could look like this in one\-line\-style format:
.sp
.if n \{\
.RS 4
.\}
.nf
deb http://deb\&.debian\&.org/debian stretch main contrib non\-free
deb http://security\&.debian\&.org stretch/updates main contrib non\-free
.fi
.if n \{\
.RE
.\}
.sp
or like this in deb822 style format:
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: http://deb\&.debian\&.org/debian
Suites: stretch
Components: main contrib non\-free
Types: deb
URIs: http://security\&.debian\&.org
Suites: stretch/updates
Components: main contrib non\-free
.fi
.if n \{\
.RE
.\}
.SH "THE DEB AND DEB\-SRC TYPES: OPTIONS"
.PP
Each source entry can have options specified to modify which source is accessed and how data is acquired from it\&. Format, syntax and names of the options vary between the one\-line\-style and deb822\-style formats as described, but they both have the same options available\&. For simplicity we list the deb822 fieldname and provide the one\-line name in brackets\&. Remember that besides setting multivalue options explicitly, there is also the option to modify them based on the default, but we aren\*(Aqt listing those names explicitly here\&. Unsupported options are silently ignored by all APT versions\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBArchitectures\fR
(\fBarch\fR) is a multivalue option defining for which architectures information should be downloaded\&. If this option isn\*(Aqt set the default is all architectures as defined by the
\fBAPT::Architectures\fR
config option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBLanguages\fR
(\fBlang\fR) is a multivalue option defining for which languages information such as translated package descriptions should be downloaded\&. If this option isn\*(Aqt set the default is all languages as defined by the
\fBAcquire::Languages\fR
config option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBTargets\fR
(\fBtarget\fR) is a multivalue option defining which download targets apt will try to acquire from this source\&. If not specified, the default set is defined by the
\fBAcquire::IndexTargets\fR
configuration scope (targets are specified by their name in the
Created\-By
field)\&. Additionally, targets can be enabled or disabled by using the
Identifier
field as an option with a boolean value instead of using this multivalue option\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBPDiffs\fR
(\fBpdiffs\fR) is a yes/no value which controls if APT should try to use PDiffs to update old indexes instead of downloading the new indexes entirely\&. The value of this option is ignored if the repository doesn\*(Aqt announce the availability of PDiffs\&. Defaults to the value of the option with the same name for a specific index file defined in the
\fBAcquire::IndexTargets\fR
scope, which itself defaults to the value of configuration option
\fBAcquire::PDiffs\fR
which defaults to
yes\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBBy\-Hash\fR
(\fBby\-hash\fR) can have the value
yes,
no
or
force
and controls if APT should try to acquire indexes via a URI constructed from a hashsum of the expected file instead of using the well\-known stable filename of the index\&. Using this can avoid hashsum mismatches, but requires a supporting mirror\&. A
yes
or
no
value activates/disables the use of this feature if this source indicates support for it, while
force
will enable the feature regardless of what the source indicates\&. Defaults to the value of the option of the same name for a specific index file defined in the
\fBAcquire::IndexTargets\fR
scope, which itself defaults to the value of configuration option
\fBAcquire::By\-Hash\fR
which defaults to
yes\&.
.RE
.sp
Furthermore, there are options which if set affect
\fIall\fR
sources with the same URI and Suite, so they have to be set on all such entries and can not be varied between different components\&. APT will try to detect and error out on such anomalies\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBAllow\-Insecure\fR
(\fBallow\-insecure\fR),
\fBAllow\-Weak\fR
(\fBallow\-weak\fR) and
\fBAllow\-Downgrade\-To\-Insecure\fR
(\fBallow\-downgrade\-to\-insecure\fR) are boolean values which all default to
no\&. If set to
yes
they circumvent parts of
\fBapt-secure\fR(8)
and should therefore not be used lightly!
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBTrusted\fR
(\fBtrusted\fR) is a tri\-state value which defaults to APT deciding if a source is considered trusted or if warnings should be raised before e\&.g\&. packages are installed from this source\&. This option can be used to override that decision\&. The value
yes
tells APT always to consider this source as trusted, even if it doesn\*(Aqt pass authentication checks\&. It disables parts of
\fBapt-secure\fR(8), and should therefore only be used in a local and trusted context (if at all) as otherwise security is breached\&. The value
no
does the opposite, causing the source to be handled as untrusted even if the authentication checks passed successfully\&. The default value can\*(Aqt be set explicitly\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBSigned\-By\fR
(\fBsigned\-by\fR) is either an absolute path to a keyring file (has to be accessible and readable for the
_apt
user, so ensure everyone has read\-permissions on the file) or one or more fingerprints of keys either in the
trusted\&.gpg
keyring or in the keyrings in the
trusted\&.gpg\&.d/
directory (see
\fBapt\-key fingerprint\fR)\&. If the option is set, only the key(s) in this keyring or only the keys with these fingerprints are used for the
\fBapt-secure\fR(8)
verification of this repository\&. Defaults to the value of the option with the same name if set in the previously acquired
Release
file\&. Otherwise all keys in the trusted keyrings are considered valid signers for this repository\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBCheck\-Valid\-Until\fR
(\fBcheck\-valid\-until\fR) is a yes/no value which controls if APT should try to detect replay attacks\&. A repository creator can declare a time until which the data provided in the repository should be considered valid, and if this time is reached, but no new data is provided, the data is considered expired and an error is raised\&. Besides increasing security, as a malicious attacker can\*(Aqt send old data forever to prevent a user from upgrading to a new version, this also helps users identify mirrors which are no longer updated\&. However, some repositories such as historic archives are not updated any more by design, so this check can be disabled by setting this option to
no\&. Defaults to the value of configuration option
\fBAcquire::Check\-Valid\-Until\fR
which itself defaults to
yes\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBValid\-Until\-Min\fR
(\fBvalid\-until\-min\fR) and
\fBValid\-Until\-Max\fR
(\fBvalid\-until\-max\fR) can be used to raise or lower the time period in seconds in which the data from this repository is considered valid\&. \-Max can be especially useful if the repository provides no Valid\-Until field on its Release file to set your own value, while \-Min can be used to increase the valid time on seldom updated (local) mirrors of a more frequently updated but less accessible archive (which is in the sources\&.list as well) instead of disabling the check entirely\&. Default to the value of the configuration options
\fBAcquire::Min\-ValidTime\fR
and
\fBAcquire::Max\-ValidTime\fR
which are both unset by default\&.
.RE
.sp
.SH "URI SPECIFICATION"
.PP
The currently recognized URI types are:
.PP
\fBfile\fR
.RS 4
The file scheme allows an arbitrary directory in the file system to be considered an archive\&. This is useful for NFS mounts and local mirrors or archives\&.
.RE
.PP
\fBcdrom\fR
.RS 4
The cdrom scheme allows APT to use a local CD\-ROM drive with media swapping\&. Use the
\fBapt-cdrom\fR(8)
program to create cdrom entries in the source list\&.
.RE
.PP
\fBhttp\fR
.RS 4
The http scheme specifies an HTTP server for the archive\&. If an environment variable
\fBhttp_proxy\fR
is set with the format http://server:port/, the proxy server specified in
\fBhttp_proxy\fR
will be used\&. Users of authenticated HTTP/1\&.1 proxies may use a string of the format http://user:pass@server:port/\&. Note that this is an insecure method of authentication\&.
.RE
.PP
\fBftp\fR
.RS 4
The ftp scheme specifies an FTP server for the archive\&. APT\*(Aqs FTP behavior is highly configurable; for more information see the
\fBapt.conf\fR(5)
manual page\&. Please note that an FTP proxy can be specified by using the
\fBftp_proxy\fR
environment variable\&. It is possible to specify an HTTP proxy (HTTP proxy servers often understand FTP URLs) using this environment variable and
\fIonly\fR
this environment variable\&. Proxies using HTTP specified in the configuration file will be ignored\&.
.RE
.PP
\fBcopy\fR
.RS 4
The copy scheme is identical to the file scheme except that packages are copied into the cache directory instead of used directly at their location\&. This is useful for people using removable media to copy files around with APT\&.
.RE
.PP
\fBrsh\fR, \fBssh\fR
.RS 4
The rsh/ssh method invokes RSH/SSH to connect to a remote host and access the files as a given user\&. Prior configuration of rhosts or RSA keys is recommended\&. The standard
\fBfind\fR
and
\fBdd\fR
commands are used to perform the file transfers from the remote host\&.
.RE
.PP
adding more recognizable URI types
.RS 4
APT can be extended with more methods shipped in other optional packages, which should follow the naming scheme
apt\-transport\-\fImethod\fR\&. For instance, the APT team also maintains the package
apt\-transport\-https, which provides access methods for HTTPS URIs with features similar to the http method\&. Methods for using e\&.g\&. debtorrent are also available \- see
\fBapt-transport-debtorrent\fR(1)\&.
.RE
.SH "EXAMPLES"
.PP
Uses the archive stored locally (or NFS mounted) at /home/apt/debian for stable/main, stable/contrib, and stable/non\-free\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb file:/home/apt/debian stable main contrib non\-free
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: file:/home/apt/debian
Suites: stable
Components: main contrib non\-free
.fi
.if n \{\
.RE
.\}
.PP
As above, except this uses the unstable (development) distribution\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb file:/home/apt/debian unstable main contrib non\-free
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: file:/home/apt/debian
Suites: unstable
Components: main contrib non\-free
.fi
.if n \{\
.RE
.\}
.PP
Sources specification for the above\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb\-src file:/home/apt/debian unstable main contrib non\-free
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb\-src
URIs: file:/home/apt/debian
Suites: unstable
Components: main contrib non\-free
.fi
.if n \{\
.RE
.\}
.PP
The first line gets package information for the architectures in
APT::Architectures
while the second always retrieves
amd64
and
armel\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb http://deb\&.debian\&.org/debian stretch main
deb [ arch=amd64,armel ] http://deb\&.debian\&.org/debian stretch main
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: http://deb\&.debian\&.org/debian
Suites: stretch
Components: main
Types: deb
URIs: http://deb\&.debian\&.org/debian
Suites: stretch
Components: main
Architectures: amd64 armel
.fi
.if n \{\
.RE
.\}
.PP
Uses HTTP to access the archive at archive\&.debian\&.org, and uses only the hamm/main area\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb http://archive\&.debian\&.org/debian\-archive hamm main
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: http://archive\&.debian\&.org/debian\-archive
Suites: hamm
Components: main
.fi
.if n \{\
.RE
.\}
.PP
Uses FTP to access the archive at ftp\&.debian\&.org, under the debian directory, and uses only the stretch/contrib area\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb ftp://ftp\&.debian\&.org/debian stretch contrib
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: ftp://ftp\&.debian\&.org/debian
Suites: stretch
Components: contrib
.fi
.if n \{\
.RE
.\}
.PP
Uses FTP to access the archive at ftp\&.debian\&.org, under the debian directory, and uses only the unstable/contrib area\&. If this line appears as well as the one in the previous example in
sources\&.list
a single FTP session will be used for both resource lines\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb ftp://ftp\&.debian\&.org/debian unstable contrib
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: ftp://ftp\&.debian\&.org/debian
Suites: unstable
Components: contrib
.fi
.if n \{\
.RE
.\}
.PP
Uses HTTP to access the archive at ftp\&.tlh\&.debian\&.org, under the universe directory, and uses only files found under
unstable/binary\-i386
on i386 machines,
unstable/binary\-amd64
on amd64, and so forth for other supported architectures\&. [Note this example only illustrates how to use the substitution variable; official debian archives are not structured like this]
.sp
.if n \{\
.RS 4
.\}
.nf
deb http://ftp\&.tlh\&.debian\&.org/universe unstable/binary\-$(ARCH)/
.fi
.if n \{\
.RE
.\}
.sp
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb
URIs: http://ftp\&.tlh\&.debian\&.org/universe
Suites: unstable/binary\-$(ARCH)/
.fi
.if n \{\
.RE
.\}
.PP
Uses HTTP to get binary packages as well as sources from the stable, testing and unstable suites and the components main and contrib\&.
.sp
.if n \{\
.RS 4
.\}
.nf
deb http://deb\&.debian\&.org/debian stable main contrib
deb\-src http://deb\&.debian\&.org/debian stable main contrib
deb http://deb\&.debian\&.org/debian testing main contrib
deb\-src http://deb\&.debian\&.org/debian testing main contrib
deb http://deb\&.debian\&.org/debian unstable main contrib
deb\-src http://deb\&.debian\&.org/debian unstable main contrib
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Types: deb deb\-src
URIs: http://deb\&.debian\&.org/debian
Suites: stable testing unstable
Components: main contrib
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBapt-get\fR(8),
\fBapt.conf\fR(5),
/usr/share/doc/apt\-doc/acquire\-additional\-files\&.txt
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt-cache.8
================================================
'\" t
.\" Title: apt-cache
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 25\ \&November\ \&2016
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\-CACHE" "8" "25\ \&November\ \&2016" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt-cache \- query the APT cache
.SH "SYNOPSIS"
.HP \w'\fBapt\-cache\fR\ 'u
\fBapt\-cache\fR [\fB\-agipns\fR] [\fB\-o=\fR\fB\fIconfig_string\fR\fR] [\fB\-c=\fR\fB\fIconfig_file\fR\fR] {gencaches | showpkg\ \fIpkg\fR... | showsrc\ \fIpkg\fR... | stats | dump | dumpavail | unmet | search\ \fIregex\fR... | show\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | depends\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | rdepends\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | pkgnames\ [\fIprefix\fR] | dotty\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | xvcg\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | policy\ [\fIpkg\fR...] | madison\ \fIpkg\fR... | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}}
.SH "DESCRIPTION"
.PP
\fBapt\-cache\fR
performs a variety of operations on APT\*(Aqs package cache\&.
\fBapt\-cache\fR
does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata\&. The metadata is acquired and updated via the \*(Aqupdate\*(Aq command of e\&.g\&.
\fBapt\-get\fR, so that it can be outdated if the last update is too long ago, but in exchange
\fBapt\-cache\fR
works independently of the availability of the configured sources (e\&.g\&. offline)\&.
.PP
Unless the
\fB\-h\fR, or
\fB\-\-help\fR
option is given, one of the commands below must be present\&.
.PP
\fBgencaches\fR
.RS 4
gencaches
creates APT\*(Aqs package cache\&. This is done implicitly by all commands needing this cache if it is missing or outdated\&.
.RE
.PP
\fBshowpkg\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
showpkg
displays information about the packages listed on the command line\&. Remaining arguments are package names\&. The available versions and reverse dependencies of each package listed are listed, as well as forward dependencies for each version\&. Forward (normal) dependencies are those packages upon which the package in question depends; reverse dependencies are those packages that depend upon the package in question\&. Thus, forward dependencies must be satisfied for a package, but reverse dependencies need not be\&. For instance,
\fBapt\-cache showpkg libreadline2\fR
would produce output similar to the following:
.sp
.if n \{\
.RS 4
.\}
.nf
Package: libreadline2
Versions: 2\&.1\-12(/var/state/apt/lists/foo_Packages),
Reverse Depends:
libreadlineg2,libreadline2
libreadline2\-altdev,libreadline2
Dependencies:
2\&.1\-12 \- libc5 (2 5\&.4\&.0\-0) ncurses3\&.0 (0 (null))
Provides:
2\&.1\-12 \-
Reverse Provides:
.fi
.if n \{\
.RE
.\}
Thus it may be seen that libreadline2, version 2\&.1\-12, depends on libc5 and ncurses3\&.0 which must be installed for libreadline2 to work\&. In turn, libreadlineg2 and libreadline2\-altdev depend on libreadline2\&. If libreadline2 is installed, libc5 and ncurses3\&.0 (and ldso) must also be installed; libreadlineg2 and libreadline2\-altdev do not have to be installed\&. For the specific meaning of the remainder of the output it is best to consult the apt source code\&.
.RE
.PP
\fBstats\fR
.RS 4
stats
displays some statistics about the cache\&. No further arguments are expected\&. Statistics reported are:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Total package names
is the number of package names found in the cache\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Normal packages
is the number of regular, ordinary package names; these are packages that bear a one\-to\-one correspondence between their names and the names used by other packages for them in dependencies\&. The majority of packages fall into this category\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Pure virtual packages
is the number of packages that exist only as a virtual package name; that is, packages only "provide" the virtual package name, and no package actually uses the name\&. For instance, "mail\-transport\-agent" in the Debian system is a pure virtual package; several packages provide "mail\-transport\-agent", but there is no package named "mail\-transport\-agent"\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Single virtual packages
is the number of packages with only one package providing a particular virtual package\&. For example, in the Debian system, "X11\-text\-viewer" is a virtual package, but only one package, xless, provides "X11\-text\-viewer"\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Mixed virtual packages
is the number of packages that either provide a particular virtual package or have the virtual package name as the package name\&. For instance, in the Debian system, "debconf" is both an actual package, and provided by the debconf\-tiny package\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Missing
is the number of package names that were referenced in a dependency but were not provided by any package\&. Missing packages may be an evidence if a full distribution is not accessed, or if a package (real or virtual) has been dropped from the distribution\&. Usually they are referenced from Conflicts or Breaks statements\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Total distinct
versions is the number of package versions found in the cache\&. If more than one distribution is being accessed (for instance, "stable" and "unstable"), this value can be considerably larger than the number of total package names\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Total dependencies
is the number of dependency relationships claimed by all of the packages in the cache\&.
.RE
.sp
.RE
.PP
\fBshowsrc\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
showsrc
displays all the source package records that match the given package names\&. All versions are shown, as well as all records that declare the name to be a binary package\&. Use
\fB\-\-only\-source\fR
to display only source package names\&.
.RE
.PP
\fBdump\fR
.RS 4
dump
shows a short listing of every package in the cache\&. It is primarily for debugging\&.
.RE
.PP
\fBdumpavail\fR
.RS 4
dumpavail
prints out an available list to stdout\&. This is suitable for use with
\fBdpkg\fR(1)
and is used by the
\fBdselect\fR(1)
method\&.
.RE
.PP
\fBunmet\fR
.RS 4
unmet
displays a summary of all unmet dependencies in the package cache\&.
.RE
.PP
\fBshow\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
show
performs a function similar to
\fBdpkg \-\-print\-avail\fR; it displays the package records for the named packages\&.
.RE
.PP
\fBsearch\fR \fB\fIregex\fR\fR\fB\&...\fR
.RS 4
search
performs a full text search on all available package lists for the POSIX regex pattern given, see
\fBregex\fR(7)\&. It searches the package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short description, including virtual package names\&. If
\fB\-\-full\fR
is given then output identical to
show
is produced for each matched package, and if
\fB\-\-names\-only\fR
is given then the long description is not searched, only the package name and provided packages are\&.
.sp
Separate arguments can be used to specify multiple search patterns that are and\*(Aqed together\&.
.RE
.PP
\fBdepends\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
depends
shows a listing of each dependency a package has and all the possible other packages that can fulfill that dependency\&.
.RE
.PP
\fBrdepends\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
rdepends
shows a listing of each reverse dependency a package has\&.
.RE
.PP
\fBpkgnames\fR [\fIprefix\fR]
.RS 4
This command prints the name of each package APT knows\&. The optional argument is a prefix match to filter the name list\&. The output is suitable for use in a shell tab complete function and the output is generated extremely quickly\&. This command is best used with the
\fB\-\-generate\fR
option\&.
.sp
Note that a package which APT knows of is not necessarily available to download, installable or installed, e\&.g\&. virtual packages are also listed in the generated list\&.
.RE
.PP
\fBdotty\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
dotty
takes a list of packages on the command line and generates output suitable for use by dotty from the
\m[blue]\fBGraphViz\fR\m[]\&\s-2\u[1]\d\s+2
package\&. The result will be a set of nodes and edges representing the relationships between the packages\&. By default the given packages will trace out all dependent packages; this can produce a very large graph\&. To limit the output to only the packages listed on the command line, set the
APT::Cache::GivenOnly
option\&.
.sp
The resulting nodes will have several shapes; normal packages are boxes, pure virtual packages are triangles, mixed virtual packages are diamonds, missing packages are hexagons\&. Orange boxes mean recursion was stopped (leaf packages), blue lines are pre\-depends, green lines are conflicts\&.
.sp
Caution, dotty cannot graph larger sets of packages\&.
.RE
.PP
\fBxvcg\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
The same as
dotty, only for xvcg from the
\m[blue]\fBVCG tool\fR\m[]\&\s-2\u[2]\d\s+2\&.
.RE
.PP
\fBpolicy\fR [\fIpkg\fR\&...]
.RS 4
policy
is meant to help debug issues relating to the preferences file\&. With no arguments it will print out the priorities of each source\&. Otherwise it prints out detailed information about the priority selection of the named package\&.
.RE
.PP
\fBmadison\fR \fB\fIpkg\fR\fR\fB\&...\fR
.RS 4
apt\-cache\*(Aqs
madison
command attempts to mimic the output format and a subset of the functionality of the Debian archive management tool,
madison\&. It displays available versions of a package in a tabular format\&. Unlike the original
madison, it can only display information for the architecture for which APT has retrieved package lists (APT::Architecture)\&.
.RE
.SH "OPTIONS"
.PP
All command line options may be set using the configuration file, the descriptions indicate the configuration option to set\&. For boolean options you can override the config file by using something like
\fB\-f\-\fR,\fB\-\-no\-f\fR,
\fB\-f=no\fR
or several other variations\&.
.PP
\fB\-p\fR, \fB\-\-pkg\-cache\fR
.RS 4
Select the file to store the package cache\&. The package cache is the primary cache used by all operations\&. Configuration Item:
Dir::Cache::pkgcache\&.
.RE
.PP
\fB\-s\fR, \fB\-\-src\-cache\fR
.RS 4
Select the file to store the source cache\&. The source is used only by
gencaches
and it stores a parsed version of the package information from remote sources\&. When building the package cache the source cache is used to avoid reparsing all of the package files\&. Configuration Item:
Dir::Cache::srcpkgcache\&.
.RE
.PP
\fB\-q\fR, \fB\-\-quiet\fR
.RS 4
Quiet; produces output suitable for logging, omitting progress indicators\&. More q\*(Aqs will produce more quietness up to a maximum of 2\&. You can also use
\fB\-q=#\fR
to set the quietness level, overriding the configuration file\&. Configuration Item:
quiet\&.
.RE
.PP
\fB\-i\fR, \fB\-\-important\fR
.RS 4
Print only important dependencies; for use with
unmet
and
depends\&. Causes only Depends and Pre\-Depends relations to be printed\&. Configuration Item:
APT::Cache::Important\&.
.RE
.PP
\fB\-\-no\-pre\-depends\fR, \fB\-\-no\-depends\fR, \fB\-\-no\-recommends\fR, \fB\-\-no\-suggests\fR, \fB\-\-no\-conflicts\fR, \fB\-\-no\-breaks\fR, \fB\-\-no\-replaces\fR, \fB\-\-no\-enhances\fR
.RS 4
Per default the
\fBdepends\fR
and
\fBrdepends\fR
print all dependencies\&. This can be tweaked with these flags which will omit the specified dependency type\&. Configuration Item:
APT::Cache::Show\fIDependencyType\fR
e\&.g\&.
APT::Cache::ShowRecommends\&.
.RE
.PP
\fB\-\-implicit\fR
.RS 4
Per default
\fBdepends\fR
and
\fBrdepends\fR
print only dependencies explicitly expressed in the metadata\&. With this flag it will also show dependencies implicitly added based on the encountered data\&. A
Conflicts: foo
e\&.g\&. expresses implicitly that this package also conflicts with the package foo from any other architecture\&. Configuration Item:
APT::Cache::ShowImplicit\&.
.RE
.PP
\fB\-f\fR, \fB\-\-full\fR
.RS 4
Print full package records when searching\&. Configuration Item:
APT::Cache::ShowFull\&.
.RE
.PP
\fB\-a\fR, \fB\-\-all\-versions\fR
.RS 4
Print full records for all available versions\&. This is the default; to turn it off, use
\fB\-\-no\-all\-versions\fR\&. If
\fB\-\-no\-all\-versions\fR
is specified, only the candidate version will be displayed (the one which would be selected for installation)\&. This option is only applicable to the
show
command\&. Configuration Item:
APT::Cache::AllVersions\&.
.RE
.PP
\fB\-g\fR, \fB\-\-generate\fR
.RS 4
Perform automatic package cache regeneration, rather than use the cache as it is\&. This is the default; to turn it off, use
\fB\-\-no\-generate\fR\&. Configuration Item:
APT::Cache::Generate\&.
.RE
.PP
\fB\-\-names\-only\fR, \fB\-n\fR
.RS 4
Only search on the package and provided package names, not the long descriptions\&. Configuration Item:
APT::Cache::NamesOnly\&.
.RE
.PP
\fB\-\-all\-names\fR
.RS 4
Make
pkgnames
print all names, including virtual packages and missing dependencies\&. Configuration Item:
APT::Cache::AllNames\&.
.RE
.PP
\fB\-\-recurse\fR
.RS 4
Make
depends
and
rdepends
recursive so that all packages mentioned are printed once\&. Configuration Item:
APT::Cache::RecurseDepends\&.
.RE
.PP
\fB\-\-installed\fR
.RS 4
Limit the output of
depends
and
rdepends
to packages which are currently installed\&. Configuration Item:
APT::Cache::Installed\&.
.RE
.PP
\fB\-\-with\-source\fR \fB\fIfilename\fR\fR
.RS 4
Adds the given file as a source for metadata\&. Can be repeated to add multiple files\&. Supported are currently
*\&.deb,
*\&.dsc,
*\&.changes,
Sources
and
Packages
files as well as source package directories\&. Files are matched based on their name only, not their content!
.sp
Sources
and
Packages
can be compressed in any format apt supports as long as they have the correct extension\&. If you need to store multiple of these files in one directory you can prefix a name of your choice with the last character being an underscore ("_")\&. Example: my\&.example_Packages\&.xz
.sp
Note that these sources are treated as trusted (see
\fBapt-secure\fR(8))\&. Configuration Item:
APT::Sources::With\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Show a short usage summary\&.
.RE
.PP
\fB\-v\fR, \fB\-\-version\fR
.RS 4
Show the program version\&.
.RE
.PP
\fB\-c\fR, \fB\-\-config\-file\fR
.RS 4
Configuration File; Specify a configuration file to use\&. The program will read the default configuration file and then this configuration file\&. If configuration settings need to be set before the default configuration files are parsed specify a file with the
\fBAPT_CONFIG\fR
environment variable\&. See
\fBapt.conf\fR(5)
for syntax information\&.
.RE
.PP
\fB\-o\fR, \fB\-\-option\fR
.RS 4
Set a Configuration Option; This will set an arbitrary configuration option\&. The syntax is
\fB\-o Foo::Bar=bar\fR\&.
\fB\-o\fR
and
\fB\-\-option\fR
can be used multiple times to set different options\&.
.RE
.SH "FILES"
.PP
/etc/apt/sources\&.list
.RS 4
Locations to fetch packages from\&. Configuration Item:
Dir::Etc::SourceList\&.
.RE
.PP
/etc/apt/sources\&.list\&.d/
.RS 4
File fragments for locations to fetch packages from\&. Configuration Item:
Dir::Etc::SourceParts\&.
.RE
.PP
/var/lib/apt/lists/
.RS 4
Storage area for state information for each package resource specified in
\fBsources.list\fR(5)
Configuration Item:
Dir::State::Lists\&.
.RE
.PP
/var/lib/apt/lists/partial/
.RS 4
Storage area for state information in transit\&. Configuration Item:
Dir::State::Lists
(partial
will be implicitly appended)
.RE
.SH "SEE ALSO"
.PP
\fBapt.conf\fR(5),
\fBsources.list\fR(5),
\fBapt-get\fR(8)
.SH "DIAGNOSTICS"
.PP
\fBapt\-cache\fR
returns zero on normal operation, decimal 100 on error\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[3]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
GraphViz
.RS 4
\%http://www.research.att.com/sw/tools/graphviz/
.RE
.IP " 2." 4
VCG tool
.RS 4
\%http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html
.RE
.IP " 3." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt-config.8
================================================
'\" t
.\" Title: apt-config
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 30\ \&November\ \&2013
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\-CONFIG" "8" "30\ \&November\ \&2013" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt-config \- APT Configuration Query program
.SH "SYNOPSIS"
.HP \w'\fBapt\-config\fR\ 'u
\fBapt\-config\fR [\fB\-\-empty\fR] [\fB\-\-format\ \*(Aq\fR\fB\fI%f\ "%v";%n\fR\fR\fB\*(Aq\fR] [\fB\-o=\fR\fB\fIconfig_string\fR\fR] [\fB\-c=\fR\fB\fIconfig_file\fR\fR] {shell | dump | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}}
.SH "DESCRIPTION"
.PP
\fBapt\-config\fR
is an internal program used by various portions of the APT suite to provide consistent configurability\&. It accesses the main configuration file
/etc/apt/apt\&.conf
in a manner that is easy to use for scripted applications\&.
.PP
Unless the
\fB\-h\fR, or
\fB\-\-help\fR
option is given, one of the commands below must be present\&.
.PP
\fBshell\fR
.RS 4
shell is used to access the configuration information from a shell script\&. It is given pairs of arguments, the first being a shell variable and the second the configuration value to query\&. As output it lists shell assignment commands for each value present\&. In a shell script it should be used as follows:
.sp
.if n \{\
.RS 4
.\}
.nf
OPTS="\-f"
RES=`apt\-config shell OPTS MyApp::options`
eval $RES
.fi
.if n \{\
.RE
.\}
This will set the shell environment variable $OPTS to the value of MyApp::options with a default of
\fB\-f\fR\&.
.sp
The configuration item may be postfixed with a /[fdbi]\&. f returns file names, d returns directories, b returns true or false and i returns an integer\&. Each of the returns is normalized and verified internally\&.
.RE
.PP
\fBdump\fR
.RS 4
Just show the contents of the configuration space\&.
.RE
.SH "OPTIONS"
.PP
All command line options may be set using the configuration file, the descriptions indicate the configuration option to set\&. For boolean options you can override the config file by using something like
\fB\-f\-\fR,\fB\-\-no\-f\fR,
\fB\-f=no\fR
or several other variations\&.
.PP
\fB\-\-empty\fR
.RS 4
Include options which have an empty value\&. This is the default, so use \-\-no\-empty to remove them from the output\&.
.RE
.PP
\fB\-\-format \*(Aq\fR\fB\fI%f "%v";%n\fR\fR\fB\*(Aq\fR
.RS 4
Defines the output of each config option\&. %t will be replaced with its individual name, %f with its full hierarchical name and %v with its value\&. Use uppercase letters and special characters in the value will be encoded to ensure that it can e\&.g\&. be safely used in a quoted\-string as defined by RFC822\&. Additionally %n will be replaced by a newline, and %N by a tab\&. A % can be printed by using %%\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Show a short usage summary\&.
.RE
.PP
\fB\-v\fR, \fB\-\-version\fR
.RS 4
Show the program version\&.
.RE
.PP
\fB\-c\fR, \fB\-\-config\-file\fR
.RS 4
Configuration File; Specify a configuration file to use\&. The program will read the default configuration file and then this configuration file\&. If configuration settings need to be set before the default configuration files are parsed specify a file with the
\fBAPT_CONFIG\fR
environment variable\&. See
\fBapt.conf\fR(5)
for syntax information\&.
.RE
.PP
\fB\-o\fR, \fB\-\-option\fR
.RS 4
Set a Configuration Option; This will set an arbitrary configuration option\&. The syntax is
\fB\-o Foo::Bar=bar\fR\&.
\fB\-o\fR
and
\fB\-\-option\fR
can be used multiple times to set different options\&.
.RE
.SH "SEE ALSO"
.PP
\fBapt.conf\fR(5)
.SH "DIAGNOSTICS"
.PP
\fBapt\-config\fR
returns zero on normal operation, decimal 100 on error\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt-get.8
================================================
'\" t
.\" Title: apt-get
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 22\ \&February\ \&2017
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\-GET" "8" "22\ \&February\ \&2017" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt-get \- APT package handling utility \-\- command\-line interface
.SH "SYNOPSIS"
.HP \w'\fBapt\-get\fR\ 'u
\fBapt\-get\fR [\fB\-asqdyfmubV\fR] [\fB\-o=\fR\fB\fIconfig_string\fR\fR] [\fB\-c=\fR\fB\fIconfig_file\fR\fR] [\fB\-t=\fR\fB\fItarget_release\fR\fR] [\fB\-a=\fR\fB\fIarchitecture\fR\fR] {update | upgrade | dselect\-upgrade | dist\-upgrade | install\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | remove\ \fIpkg\fR... | purge\ \fIpkg\fR... | source\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | build\-dep\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | download\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | check | clean | autoclean | autoremove | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}}
.SH "DESCRIPTION"
.PP
\fBapt\-get\fR
is the command\-line tool for handling packages, and may be considered the user\*(Aqs "back\-end" to other tools using the APT library\&. Several "front\-end" interfaces exist, such as
\fBaptitude\fR(8),
\fBsynaptic\fR(8)
and
\fBwajig\fR(1)\&.
.PP
Unless the
\fB\-h\fR, or
\fB\-\-help\fR
option is given, one of the commands below must be present\&.
.PP
\fBupdate\fR
.RS 4
update
is used to resynchronize the package index files from their sources\&. The indexes of available packages are fetched from the location(s) specified in
/etc/apt/sources\&.list\&. For example, when using a Debian archive, this command retrieves and scans the
Packages\&.gz
files, so that information about new and updated packages is available\&. An
update
should always be performed before an
upgrade
or
dist\-upgrade\&. Please be aware that the overall progress meter will be incorrect as the size of the package files cannot be known in advance\&.
.RE
.PP
\fBupgrade\fR
.RS 4
upgrade
is used to install the newest versions of all packages currently installed on the system from the sources enumerated in
/etc/apt/sources\&.list\&. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed\&. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version\&. An
update
must be performed first so that
\fBapt\-get\fR
knows that new versions of packages are available\&.
.RE
.PP
\fBdist\-upgrade\fR
.RS 4
dist\-upgrade
in addition to performing the function of
upgrade, also intelligently handles changing dependencies with new versions of packages;
\fBapt\-get\fR
has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary\&. The
dist\-upgrade
command may therefore remove some packages\&. The
/etc/apt/sources\&.list
file contains a list of locations from which to retrieve desired package files\&. See also
\fBapt_preferences\fR(5)
for a mechanism for overriding the general settings for individual packages\&.
.RE
.PP
\fBdselect\-upgrade\fR
.RS 4
dselect\-upgrade
is used in conjunction with the traditional Debian packaging front\-end,
\fBdselect\fR(1)\&.
dselect\-upgrade
follows the changes made by
\fBdselect\fR(1)
to the
Status
field of available packages, and performs the actions necessary to realize that state (for instance, the removal of old and the installation of new packages)\&.
.RE
.PP
\fBinstall\fR
.RS 4
install
is followed by one or more packages desired for installation or upgrading\&. Each package is a package name, not a fully qualified filename (for instance, in a Debian system,
apt\-utils
would be the argument provided, not
apt\-utils_1\&.4\&.9_amd64\&.deb)\&. All packages required by the package(s) specified for installation will also be retrieved and installed\&. The
/etc/apt/sources\&.list
file is used to locate the desired packages\&. If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed\&. Similarly a plus sign can be used to designate a package to install\&. These latter features may be used to override decisions made by apt\-get\*(Aqs conflict resolution system\&.
.sp
A specific version of a package can be selected for installation by following the package name with an equals and the version of the package to select\&. This will cause that version to be located and selected for install\&. Alternatively a specific distribution can be selected by following the package name with a slash and the version of the distribution or the Archive name (stable, testing, unstable)\&.
.sp
Both of the version selection mechanisms can downgrade packages and must be used with care\&.
.sp
This is also the target to use if you want to upgrade one or more already\-installed packages without upgrading every package you have on your system\&. Unlike the "upgrade" target, which installs the newest version of all currently installed packages, "install" will install the newest version of only the package(s) specified\&. Simply provide the name of the package(s) you wish to upgrade, and if a newer version is available, it (and its dependencies, as described above) will be downloaded and installed\&.
.sp
Finally, the
\fBapt_preferences\fR(5)
mechanism allows you to create an alternative installation policy for individual packages\&.
.sp
If no package matches the given expression and the expression contains one of \*(Aq\&.\*(Aq, \*(Aq?\*(Aq or \*(Aq*\*(Aq then it is assumed to be a POSIX regular expression, and it is applied to all package names in the database\&. Any matches are then installed (or removed)\&. Note that matching is done by substring so \*(Aqlo\&.*\*(Aq matches \*(Aqhow\-lo\*(Aq and \*(Aqlowest\*(Aq\&. If this is undesired, anchor the regular expression with a \*(Aq^\*(Aq or \*(Aq$\*(Aq character, or create a more specific regular expression\&.
.RE
.PP
\fBremove\fR
.RS 4
remove
is identical to
install
except that packages are removed instead of installed\&. Note that removing a package leaves its configuration files on the system\&. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed\&.
.RE
.PP
\fBpurge\fR
.RS 4
purge
is identical to
remove
except that packages are removed and purged (any configuration files are deleted too)\&.
.RE
.PP
\fBsource\fR
.RS 4
source
causes
\fBapt\-get\fR
to fetch source packages\&. APT will examine the available packages to decide which source package to fetch\&. It will then find and download into the current directory the newest available version of that source package while respecting the default release, set with the option
APT::Default\-Release, the
\fB\-t\fR
option or per package with the
pkg/release
syntax, if possible\&.
.sp
Source packages are tracked separately from binary packages via
deb\-src
lines in the
\fBsources.list\fR(5)
file\&. This means that you will need to add such a line for each repository you want to get sources from; otherwise you will probably get either the wrong (too old/too new) source versions or none at all\&.
.sp
If the
\fB\-\-compile\fR
option is specified then the package will be compiled to a binary \&.deb using
\fBdpkg\-buildpackage\fR
for the architecture as defined by the
\fB\-\-host\-architecture\fR
option\&. If
\fB\-\-download\-only\fR
is specified then the source package will not be unpacked\&.
.sp
A specific source version can be retrieved by postfixing the source name with an equals and then the version to fetch, similar to the mechanism used for the package files\&. This enables exact matching of the source package name and version, implicitly enabling the
APT::Get::Only\-Source
option\&.
.sp
Note that source packages are not installed and tracked in the
\fBdpkg\fR
database like binary packages; they are simply downloaded to the current directory, like source tarballs\&.
.RE
.PP
\fBbuild\-dep\fR
.RS 4
build\-dep
causes apt\-get to install/remove packages in an attempt to satisfy the build dependencies for a source package\&. By default the dependencies are satisfied to build the package natively\&. If desired a host\-architecture can be specified with the
\fB\-\-host\-architecture\fR
option instead\&.
.RE
.PP
\fBcheck\fR
.RS 4
check
is a diagnostic tool; it updates the package cache and checks for broken dependencies\&.
.RE
.PP
\fBdownload\fR
.RS 4
download
will download the given binary package into the current directory\&.
.RE
.PP
\fBclean\fR
.RS 4
clean
clears out the local repository of retrieved package files\&. It removes everything but the lock file from
/var/cache/apt/archives/
and
/var/cache/apt/archives/partial/\&.
.RE
.PP
\fBautoclean\fR (and the \fBauto\-clean\fR alias since 1\&.1)
.RS 4
Like
clean,
autoclean
clears out the local repository of retrieved package files\&. The difference is that it only removes package files that can no longer be downloaded, and are largely useless\&. This allows a cache to be maintained over a long period without it growing out of control\&. The configuration option
APT::Clean\-Installed
will prevent installed packages from being erased if it is set to off\&.
.RE
.PP
\fBautoremove\fR (and the \fBauto\-remove\fR alias since 1\&.1)
.RS 4
autoremove
is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed\&.
.RE
.PP
\fBchangelog\fR
.RS 4
changelog
tries to download the changelog of a package and displays it through
\fBsensible\-pager\fR\&. By default it displays the changelog for the version that is installed\&. However, you can specify the same options as for the
\fBinstall\fR
command\&.
.RE
.PP
\fBindextargets\fR
.RS 4
Displays by default a deb822 formatted listing of information about all data files (aka index targets)
\fBapt\-get update\fR
would download\&. Supports a
\fB\-\-format\fR
option to modify the output format as well as accepts lines of the default output to filter the records by\&. The command is mainly used as an interface for external tools working with APT to get information as well as filenames for downloaded files so they can use them as well instead of downloading them again on their own\&. Detailed documentation is omitted here and can instead be found in the file
/usr/share/doc/apt\-doc/acquire\-additional\-files\&.txt
shipped by the
apt\-doc
package\&.
.RE
.SH "OPTIONS"
.PP
All command line options may be set using the configuration file, the descriptions indicate the configuration option to set\&. For boolean options you can override the config file by using something like
\fB\-f\-\fR,\fB\-\-no\-f\fR,
\fB\-f=no\fR
or several other variations\&.
.PP
\fB\-\-no\-install\-recommends\fR
.RS 4
Do not consider recommended packages as a dependency for installing\&. Configuration Item:
APT::Install\-Recommends\&.
.RE
.PP
\fB\-\-install\-suggests\fR
.RS 4
Consider suggested packages as a dependency for installing\&. Configuration Item:
APT::Install\-Suggests\&.
.RE
.PP
\fB\-d\fR, \fB\-\-download\-only\fR
.RS 4
Download only; package files are only retrieved, not unpacked or installed\&. Configuration Item:
APT::Get::Download\-Only\&.
.RE
.PP
\fB\-f\fR, \fB\-\-fix\-broken\fR
.RS 4
Fix; attempt to correct a system with broken dependencies in place\&. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution\&. If packages are specified, these have to completely correct the problem\&. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system\&. It is possible that a system\*(Aqs dependency structure can be so corrupt as to require manual intervention (which usually means using
\fBdpkg \-\-remove\fR
to eliminate some of the offending packages)\&. Use of this option together with
\fB\-m\fR
may produce an error in some situations\&. Configuration Item:
APT::Get::Fix\-Broken\&.
.RE
.PP
\fB\-m\fR, \fB\-\-ignore\-missing\fR, \fB\-\-fix\-missing\fR
.RS 4
Ignore missing packages; if packages cannot be retrieved or fail the integrity check after retrieval (corrupted package files), hold back those packages and handle the result\&. Use of this option together with
\fB\-f\fR
may produce an error in some situations\&. If a package is selected for installation (particularly if it is mentioned on the command line) and it could not be downloaded then it will be silently held back\&. Configuration Item:
APT::Get::Fix\-Missing\&.
.RE
.PP
\fB\-\-no\-download\fR
.RS 4
Disables downloading of packages\&. This is best used with
\fB\-\-ignore\-missing\fR
to force APT to use only the \&.debs it has already downloaded\&. Configuration Item:
APT::Get::Download\&.
.RE
.PP
\fB\-q\fR, \fB\-\-quiet\fR
.RS 4
Quiet; produces output suitable for logging, omitting progress indicators\&. More q\*(Aqs will produce more quiet up to a maximum of 2\&. You can also use
\fB\-q=#\fR
to set the quiet level, overriding the configuration file\&. Note that quiet level 2 implies
\fB\-y\fR; you should never use \-qq without a no\-action modifier such as \-d, \-\-print\-uris or \-s as APT may decide to do something you did not expect\&. Configuration Item:
quiet\&.
.RE
.PP
\fB\-s\fR, \fB\-\-simulate\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR, \fB\-\-no\-act\fR
.RS 4
No action; perform a simulation of events that would occur based on the current system state but do not actually change the system\&. Locking will be disabled (\fBDebug::NoLocking\fR) so the system state could change while
\fBapt\-get\fR
is running\&. Simulations can also be executed by non\-root users which might not have read access to all apt configuration distorting the simulation\&. A notice expressing this warning is also shown by default for non\-root users (\fBAPT::Get::Show\-User\-Simulation\-Note\fR)\&. Configuration Item:
APT::Get::Simulate\&.
.sp
Simulated runs print out a series of lines, each representing a
\fBdpkg\fR
operation: configure (Conf), remove (Remv) or unpack (Inst)\&. Square brackets indicate broken packages, and empty square brackets indicate breaks that are of no consequence (rare)\&.
.RE
.PP
\fB\-y\fR, \fB\-\-yes\fR, \fB\-\-assume\-yes\fR
.RS 4
Automatic yes to prompts; assume "yes" as answer to all prompts and run non\-interactively\&. If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occurs then
apt\-get
will abort\&. Configuration Item:
APT::Get::Assume\-Yes\&.
.RE
.PP
\fB\-\-assume\-no\fR
.RS 4
Automatic "no" to all prompts\&. Configuration Item:
APT::Get::Assume\-No\&.
.RE
.PP
\fB\-\-no\-show\-upgraded\fR
.RS 4
Do not show a list of all packages that are to be upgraded\&. Configuration Item:
APT::Get::Show\-Upgraded\&.
.RE
.PP
\fB\-V\fR, \fB\-\-verbose\-versions\fR
.RS 4
Show full versions for upgraded and installed packages\&. Configuration Item:
APT::Get::Show\-Versions\&.
.RE
.PP
\fB\-a\fR, \fB\-\-host\-architecture\fR
.RS 4
This option controls the architecture packages are built for by
\fBapt\-get source \-\-compile\fR
and how cross\-builddependencies are satisfied\&. By default is it not set which means that the host architecture is the same as the build architecture (which is defined by
APT::Architecture)\&. Configuration Item:
APT::Get::Host\-Architecture\&.
.RE
.PP
\fB\-P\fR, \fB\-\-build\-profiles\fR
.RS 4
This option controls the activated build profiles for which a source package is built by
\fBapt\-get source \-\-compile\fR
and how build dependencies are satisfied\&. By default no build profile is active\&. More than one build profile can be activated at a time by concatenating them with a comma\&. Configuration Item:
APT::Build\-Profiles\&.
.RE
.PP
\fB\-b\fR, \fB\-\-compile\fR, \fB\-\-build\fR
.RS 4
Compile source packages after downloading them\&. Configuration Item:
APT::Get::Compile\&.
.RE
.PP
\fB\-\-ignore\-hold\fR
.RS 4
Ignore package holds; this causes
\fBapt\-get\fR
to ignore a hold placed on a package\&. This may be useful in conjunction with
dist\-upgrade
to override a large number of undesired holds\&. Configuration Item:
APT::Ignore\-Hold\&.
.RE
.PP
\fB\-\-with\-new\-pkgs\fR
.RS 4
Allow installing new packages when used in conjunction with
upgrade\&. This is useful if the update of a installed package requires new dependencies to be installed\&. Instead of holding the package back
upgrade
will upgrade the package and install the new dependencies\&. Note that
upgrade
with this option will never remove packages, only allow adding new ones\&. Configuration Item:
APT::Get::Upgrade\-Allow\-New\&.
.RE
.PP
\fB\-\-no\-upgrade\fR
.RS 4
Do not upgrade packages; when used in conjunction with
install,
no\-upgrade
will prevent packages on the command line from being upgraded if they are already installed\&. Configuration Item:
APT::Get::Upgrade\&.
.RE
.PP
\fB\-\-only\-upgrade\fR
.RS 4
Do not install new packages; when used in conjunction with
install,
only\-upgrade
will install upgrades for already installed packages only and ignore requests to install new packages\&. Configuration Item:
APT::Get::Only\-Upgrade\&.
.RE
.PP
\fB\-\-allow\-downgrades\fR
.RS 4
This is a dangerous option that will cause apt to continue without prompting if it is doing downgrades\&. It should not be used except in very special situations\&. Using it can potentially destroy your system! Configuration Item:
APT::Get::allow\-downgrades\&. Introduced in APT 1\&.1\&.
.RE
.PP
\fB\-\-allow\-remove\-essential\fR
.RS 4
Force yes; this is a dangerous option that will cause apt to continue without prompting if it is removing essentials\&. It should not be used except in very special situations\&. Using it can potentially destroy your system! Configuration Item:
APT::Get::allow\-remove\-essential\&. Introduced in APT 1\&.1\&.
.RE
.PP
\fB\-\-allow\-change\-held\-packages\fR
.RS 4
Force yes; this is a dangerous option that will cause apt to continue without prompting if it is changing held packages\&. It should not be used except in very special situations\&. Using it can potentially destroy your system! Configuration Item:
APT::Get::allow\-change\-held\-packages\&. Introduced in APT 1\&.1\&.
.RE
.PP
\fB\-\-force\-yes\fR
.RS 4
Force yes; this is a dangerous option that will cause apt to continue without prompting if it is doing something potentially harmful\&. It should not be used except in very special situations\&. Using
force\-yes
can potentially destroy your system! Configuration Item:
APT::Get::force\-yes\&. This is deprecated and replaced by
\fB\-\-allow\-downgrades\fR,
\fB\-\-allow\-remove\-essential\fR,
\fB\-\-allow\-change\-held\-packages\fR
in 1\&.1\&.
.RE
.PP
\fB\-\-print\-uris\fR
.RS 4
Instead of fetching the files to install their URIs are printed\&. Each URI will have the path, the destination file name, the size and the expected MD5 hash\&. Note that the file name to write to will not always match the file name on the remote site! This also works with the
source
and
update
commands\&. When used with the
update
command the MD5 and size are not included, and it is up to the user to decompress any compressed files\&. Configuration Item:
APT::Get::Print\-URIs\&.
.RE
.PP
\fB\-\-purge\fR
.RS 4
Use purge instead of remove for anything that would be removed\&. An asterisk ("*") will be displayed next to packages which are scheduled to be purged\&.
\fBremove \-\-purge\fR
is equivalent to the
\fBpurge\fR
command\&. Configuration Item:
APT::Get::Purge\&.
.RE
.PP
\fB\-\-reinstall\fR
.RS 4
Re\-install packages that are already installed and at the newest version\&. Configuration Item:
APT::Get::ReInstall\&.
.RE
.PP
\fB\-\-list\-cleanup\fR
.RS 4
This option is on by default; use
\-\-no\-list\-cleanup
to turn it off\&. When it is on,
\fBapt\-get\fR
will automatically manage the contents of
/var/lib/apt/lists
to ensure that obsolete files are erased\&. The only reason to turn it off is if you frequently change your sources list\&. Configuration Item:
APT::Get::List\-Cleanup\&.
.RE
.PP
\fB\-t\fR, \fB\-\-target\-release\fR, \fB\-\-default\-release\fR
.RS 4
This option controls the default input to the policy engine; it creates a default pin at priority 990 using the specified release string\&. This overrides the general settings in
/etc/apt/preferences\&. Specifically pinned packages are not affected by the value of this option\&. In short, this option lets you have simple control over which distribution packages will be retrieved from\&. Some common examples might be
\fB\-t \*(Aq2\&.1*\*(Aq\fR,
\fB\-t unstable\fR
or
\fB\-t sid\fR\&. Configuration Item:
APT::Default\-Release; see also the
\fBapt_preferences\fR(5)
manual page\&.
.RE
.PP
\fB\-\-trivial\-only\fR
.RS 4
Only perform operations that are \*(Aqtrivial\*(Aq\&. Logically this can be considered related to
\fB\-\-assume\-yes\fR; where
\fB\-\-assume\-yes\fR
will answer yes to any prompt,
\fB\-\-trivial\-only\fR
will answer no\&. Configuration Item:
APT::Get::Trivial\-Only\&.
.RE
.PP
\fB\-\-no\-remove\fR
.RS 4
If any packages are to be removed apt\-get immediately aborts without prompting\&. Configuration Item:
APT::Get::Remove\&.
.RE
.PP
\fB\-\-auto\-remove\fR, \fB\-\-autoremove\fR
.RS 4
If the command is either
install
or
remove, then this option acts like running the
autoremove
command, removing unused dependency packages\&. Configuration Item:
APT::Get::AutomaticRemove\&.
.RE
.PP
\fB\-\-only\-source\fR
.RS 4
Only has meaning for the
source
and
build\-dep
commands\&. Indicates that the given source names are not to be mapped through the binary table\&. This means that if this option is specified, these commands will only accept source package names as arguments, rather than accepting binary package names and looking up the corresponding source package\&. Configuration Item:
APT::Get::Only\-Source\&.
.RE
.PP
\fB\-\-diff\-only\fR, \fB\-\-dsc\-only\fR, \fB\-\-tar\-only\fR
.RS 4
Download only the diff, dsc, or tar file of a source archive\&. Configuration Item:
APT::Get::Diff\-Only,
APT::Get::Dsc\-Only, and
APT::Get::Tar\-Only\&.
.RE
.PP
\fB\-\-arch\-only\fR
.RS 4
Only process architecture\-dependent build\-dependencies\&. Configuration Item:
APT::Get::Arch\-Only\&.
.RE
.PP
\fB\-\-indep\-only\fR
.RS 4
Only process architecture\-independent build\-dependencies\&. Configuration Item:
APT::Get::Indep\-Only\&.
.RE
.PP
\fB\-\-allow\-unauthenticated\fR
.RS 4
Ignore if packages can\*(Aqt be authenticated and don\*(Aqt prompt about it\&. This can be useful while working with local repositories, but is a huge security risk if data authenticity isn\*(Aqt ensured in another way by the user itself\&. The usage of the
\fBTrusted\fR
option for
\fBsources.list\fR(5)
entries should usually be preferred over this global override\&. Configuration Item:
APT::Get::AllowUnauthenticated\&.
.RE
.PP
\fB\-\-no\-allow\-insecure\-repositories\fR
.RS 4
Forbid the update command to acquire unverifiable data from configured sources\&. APT will fail at the update command for repositories without valid cryptographically signatures\&. See also
\fBapt-secure\fR(8)
for details on the concept and the implications\&. Configuration Item:
Acquire::AllowInsecureRepositories\&.
.RE
.PP
\fB\-\-show\-progress\fR
.RS 4
Show user friendly progress information in the terminal window when packages are installed, upgraded or removed\&. For a machine parsable version of this data see README\&.progress\-reporting in the apt doc directory\&. Configuration Items:
Dpkg::Progress
and
Dpkg::Progress\-Fancy\&.
.RE
.PP
\fB\-\-with\-source\fR \fB\fIfilename\fR\fR
.RS 4
Adds the given file as a source for metadata\&. Can be repeated to add multiple files\&. See
\fB\-\-with\-source\fR
description in
\fBapt-cache\fR(8)
for further details\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Show a short usage summary\&.
.RE
.PP
\fB\-v\fR, \fB\-\-version\fR
.RS 4
Show the program version\&.
.RE
.PP
\fB\-c\fR, \fB\-\-config\-file\fR
.RS 4
Configuration File; Specify a configuration file to use\&. The program will read the default configuration file and then this configuration file\&. If configuration settings need to be set before the default configuration files are parsed specify a file with the
\fBAPT_CONFIG\fR
environment variable\&. See
\fBapt.conf\fR(5)
for syntax information\&.
.RE
.PP
\fB\-o\fR, \fB\-\-option\fR
.RS 4
Set a Configuration Option; This will set an arbitrary configuration option\&. The syntax is
\fB\-o Foo::Bar=bar\fR\&.
\fB\-o\fR
and
\fB\-\-option\fR
can be used multiple times to set different options\&.
.RE
.SH "FILES"
.PP
/etc/apt/sources\&.list
.RS 4
Locations to fetch packages from\&. Configuration Item:
Dir::Etc::SourceList\&.
.RE
.PP
/etc/apt/sources\&.list\&.d/
.RS 4
File fragments for locations to fetch packages from\&. Configuration Item:
Dir::Etc::SourceParts\&.
.RE
.PP
/etc/apt/apt\&.conf
.RS 4
APT configuration file\&. Configuration Item:
Dir::Etc::Main\&.
.RE
.PP
/etc/apt/apt\&.conf\&.d/
.RS 4
APT configuration file fragments\&. Configuration Item:
Dir::Etc::Parts\&.
.RE
.PP
/etc/apt/preferences
.RS 4
Version preferences file\&. This is where you would specify "pinning", i\&.e\&. a preference to get certain packages from a separate source or from a different version of a distribution\&. Configuration Item:
Dir::Etc::Preferences\&.
.RE
.PP
/etc/apt/preferences\&.d/
.RS 4
File fragments for the version preferences\&. Configuration Item:
Dir::Etc::PreferencesParts\&.
.RE
.PP
/var/cache/apt/archives/
.RS 4
Storage area for retrieved package files\&. Configuration Item:
Dir::Cache::Archives\&.
.RE
.PP
/var/cache/apt/archives/partial/
.RS 4
Storage area for package files in transit\&. Configuration Item:
Dir::Cache::Archives
(partial
will be implicitly appended)
.RE
.PP
/var/lib/apt/lists/
.RS 4
Storage area for state information for each package resource specified in
\fBsources.list\fR(5)
Configuration Item:
Dir::State::Lists\&.
.RE
.PP
/var/lib/apt/lists/partial/
.RS 4
Storage area for state information in transit\&. Configuration Item:
Dir::State::Lists
(partial
will be implicitly appended)
.RE
.SH "SEE ALSO"
.PP
\fBapt-cache\fR(8),
\fBapt-cdrom\fR(8),
\fBdpkg\fR(1),
\fBsources.list\fR(5),
\fBapt.conf\fR(5),
\fBapt-config\fR(8),
\fBapt-secure\fR(8), The APT User\*(Aqs guide in /usr/share/doc/apt\-doc/,
\fBapt_preferences\fR(5), the APT Howto\&.
.SH "DIAGNOSTICS"
.PP
\fBapt\-get\fR
returns zero on normal operation, decimal 100 on error\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt-key.8
================================================
'\" t
.\" Title: apt-key
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 25\ \&November\ \&2016
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\-KEY" "8" "25\ \&November\ \&2016" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt-key \- APT key management utility
.SH "SYNOPSIS"
.HP \w'\fBapt\-key\fR\ 'u
\fBapt\-key\fR [\fB\-\-keyring\ \fR\fB\fIfilename\fR\fR] {add\ \fIfilename\fR | del\ \fIkeyid\fR | export\ \fIkeyid\fR | exportall | list | finger | adv | update | net\-update | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}}
.SH "DESCRIPTION"
.PP
\fBapt\-key\fR
is used to manage the list of keys used by apt to authenticate packages\&. Packages which have been authenticated using these keys will be considered trusted\&.
.PP
Note that if usage of
\fBapt\-key\fR
is desired the additional installation of the GNU Privacy Guard suite (packaged in
gnupg) is required\&. For this reason alone the programmatic usage (especially in package maintainerscripts!) is strongly discouraged\&. Further more the output format of all commands is undefined and can and does change whenever the underlying commands change\&.
\fBapt\-key\fR
will try to detect such usage and generates warnings on stderr in these cases\&.
.SH "SUPPORTED KEYRING FILES"
.PP
apt\-key supports only the binary OpenPGP format (also known as "GPG key public ring") in files with the "gpg" extension, not the keybox database format introduced in newer
\fBgpg\fR(1)
versions as default for keyring files\&. Binary keyring files intended to be used with any apt version should therefore always be created with
\fBgpg \-\-export\fR\&.
.PP
Alternatively, if all systems which should be using the created keyring have at least apt version >= 1\&.4 installed, you can use the ASCII armored format with the "asc" extension instead which can be created with
\fBgpg \-\-armor \-\-export\fR\&.
.SH "COMMANDS"
.PP
\fBadd\fR \fB\fIfilename\fR\fR
.RS 4
Add a new key to the list of trusted keys\&. The key is read from the filename given with the parameter
\fIfilename\fR
or if the filename is
\-
from standard input\&.
.sp
It is critical that keys added manually via
\fBapt\-key\fR
are verified to belong to the owner of the repositories they claim to be for otherwise the
\fBapt-secure\fR(8)
infrastructure is completely undermined\&.
.sp
\fINote\fR: Instead of using this command a keyring should be placed directly in the
/etc/apt/trusted\&.gpg\&.d/
directory with a descriptive name and either "gpg" or "asc" as file extension\&.
.RE
.PP
\fBdel\fR \fB\fIkeyid\fR\fR
.RS 4
Remove a key from the list of trusted keys\&.
.RE
.PP
\fBexport\fR \fB\fIkeyid\fR\fR
.RS 4
Output the key
\fIkeyid\fR
to standard output\&.
.RE
.PP
\fBexportall\fR
.RS 4
Output all trusted keys to standard output\&.
.RE
.PP
\fBlist\fR, \fBfinger\fR
.RS 4
List trusted keys with fingerprints\&.
.RE
.PP
\fBadv\fR
.RS 4
Pass advanced options to gpg\&. With
\fBadv \-\-recv\-key\fR
you can e\&.g\&. download key from keyservers directly into the trusted set of keys\&. Note that there are
\fIno\fR
checks performed, so it is easy to completely undermine the
\fBapt-secure\fR(8)
infrastructure if used without care\&.
.RE
.PP
\fBupdate\fR (deprecated)
.RS 4
Update the local keyring with the archive keyring and remove from the local keyring the archive keys which are no longer valid\&. The archive keyring is shipped in the
archive\-keyring
package of your distribution, e\&.g\&. the
debian\-archive\-keyring
package in Debian\&.
.sp
Note that a distribution does not need to and in fact should not use this command any longer and instead ship keyring files in the
/etc/apt/trusted\&.gpg\&.d/
directory directly as this avoids a dependency on
gnupg
and it is easier to manage keys by simply adding and removing files for maintainers and users alike\&.
.RE
.PP
\fBnet\-update\fR
.RS 4
Perform an update working similarly to the
\fBupdate\fR
command above, but get the archive keyring from a URI instead and validate it against a master key\&. This requires an installed
\fBwget\fR(1)
and an APT build configured to have a server to fetch from and a master keyring to validate\&. APT in Debian does not support this command, relying on
\fBupdate\fR
instead, but Ubuntu\*(Aqs APT does\&.
.RE
.SH "OPTIONS"
.PP
Note that options need to be defined before the commands described in the previous section\&.
.PP
\fB\-\-keyring\fR \fB\fIfilename\fR\fR
.RS 4
With this option it is possible to specify a particular keyring file the command should operate on\&. The default is that a command is executed on the
trusted\&.gpg
file as well as on all parts in the
trusted\&.gpg\&.d
directory, though
trusted\&.gpg
is the primary keyring which means that e\&.g\&. new keys are added to this one\&.
.RE
.SH "FILES"
.PP
/etc/apt/trusted\&.gpg
.RS 4
Keyring of local trusted keys, new keys will be added here\&. Configuration Item:
Dir::Etc::Trusted\&.
.RE
.PP
/etc/apt/trusted\&.gpg\&.d/
.RS 4
File fragments for the trusted keys, additional keyrings can be stored here (by other packages or the administrator)\&. Configuration Item
Dir::Etc::TrustedParts\&.
.RE
.SH "SEE ALSO"
.PP
\fBapt-get\fR(8),
\fBapt-secure\fR(8)
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHOR"
.PP
APT was written by the APT team
\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt-mark.8
================================================
'\" t
.\" Title: apt-mark
.\" Author: Mike O\*(AqConnor
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 25\ \&September\ \&2015
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\-MARK" "8" "25\ \&September\ \&2015" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt-mark \- show, set and unset various settings for a package
.SH "SYNOPSIS"
.HP \w'\fBapt\-mark\fR\ 'u
\fBapt\-mark\fR {\fB\-f=\fR\fB\fIfilename\fR\fR | {auto\ |\ manual}\ \fIpkg\fR... | {showauto\ |\ showmanual}\ [\fIpkg\fR...] } | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}
.HP \w'\fBapt\-mark\fR\ 'u
\fBapt\-mark\fR {hold\ |\ unhold\ |\ install\ |\ remove\ |\ purge}\ \fIpkg\fR... | {showhold\ |\ showinstall\ |\ showremove\ |\ showpurge}\ [\fIpkg\fR...]
.SH "DESCRIPTION"
.PP
\fBapt\-mark\fR
can be used as a unified front\-end to set various settings for a package, such as marking a package as being automatically/manually installed or changing
\fBdpkg\fR
selections such as hold, install, deinstall and purge which are respected e\&.g\&. by
\fBapt\-get dselect\-upgrade\fR
or
\fBaptitude\fR\&.
.SH "AUTOMATICALLY AND MANUALLY INSTALLED PACKAGES"
.PP
When you request that a package is installed, and as a result other packages are installed to satisfy its dependencies, the dependencies are marked as being automatically installed, while the package you installed explicitly is marked as manually installed\&. Once an automatically installed package is no longer depended on by any manually installed package it is considered no longer needed and e\&.g\&.
\fBapt\-get\fR
or
\fBaptitude\fR
will at least suggest removing them\&.
.PP
\fBauto\fR
.RS 4
auto
is used to mark a package as being automatically installed, which will cause the package to be removed when no more manually installed packages depend on this package\&.
.RE
.PP
\fBmanual\fR
.RS 4
manual
is used to mark a package as being manually installed, which will prevent the package from being automatically removed if no other packages depend on it\&.
.RE
.PP
\fBshowauto\fR
.RS 4
showauto
is used to print a list of automatically installed packages with each package on a new line\&. All automatically installed packages will be listed if no package is given\&. If packages are given only those which are automatically installed will be shown\&.
.RE
.PP
\fBshowmanual\fR
.RS 4
showmanual
can be used in the same way as
showauto
except that it will print a list of manually installed packages instead\&.
.RE
.SS "Options"
.PP
\fB\-f=\fR\fB\fIfilename\fR\fR, \fB\-\-file=\fR\fB\fIfilename\fR\fR
.RS 4
Read/Write package stats from the filename given with the parameter
\fIfilename\fR
instead of from the default location, which is
extended_status
in the directory defined by the Configuration Item:
Dir::State\&.
.RE
.SH "PREVENT CHANGES FOR A PACKAGE"
.PP
\fBhold\fR
.RS 4
hold
is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed\&.
.RE
.PP
\fBunhold\fR
.RS 4
unhold
is used to cancel a previously set hold on a package to allow all actions again\&.
.RE
.PP
\fBshowhold\fR
.RS 4
showhold
is used to print a list of packages on hold in the same way as for the other show commands\&.
.RE
.SH "SCHEDULE PACKAGES FOR INSTALL, REMOVE AND PURGE"
.PP
Some front\-ends like
\fBapt\-get dselect\-upgrade\fR
can be used to apply previously scheduled changes to the install state of packages\&. Such changes can be scheduled with the
\fBinstall\fR,
\fBremove\fR
(also known as
\fBdeinstall\fR) and
\fBpurge\fR
commands\&. Packages with a specific selection can be displayed with
\fBshowinstall\fR,
\fBshowremove\fR
and
\fBshowpurge\fR
respectively\&. More information about these so called dpkg selections can be found in
\fBdpkg\fR(1)\&.
.SH "OPTIONS"
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Show a short usage summary\&.
.RE
.PP
\fB\-v\fR, \fB\-\-version\fR
.RS 4
Show the program version\&.
.RE
.PP
\fB\-c\fR, \fB\-\-config\-file\fR
.RS 4
Configuration File; Specify a configuration file to use\&. The program will read the default configuration file and then this configuration file\&. If configuration settings need to be set before the default configuration files are parsed specify a file with the
\fBAPT_CONFIG\fR
environment variable\&. See
\fBapt.conf\fR(5)
for syntax information\&.
.RE
.PP
\fB\-o\fR, \fB\-\-option\fR
.RS 4
Set a Configuration Option; This will set an arbitrary configuration option\&. The syntax is
\fB\-o Foo::Bar=bar\fR\&.
\fB\-o\fR
and
\fB\-\-option\fR
can be used multiple times to set different options\&.
.RE
.SH "FILES"
.PP
/var/lib/apt/extended_states
.RS 4
Status list of auto\-installed packages\&. Configuration Item:
Dir::State::extended_states\&.
.RE
.SH "SEE ALSO"
.PP
\fBapt-get\fR(8),\fBaptitude\fR(8),\fBapt.conf\fR(5)
.SH "DIAGNOSTICS"
.PP
\fBapt\-mark\fR
returns zero on normal operation, non\-zero on error\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHORS"
.PP
\fBMike O\*(AqConnor\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt-secure.8
================================================
'\" t
.\" Title: apt-secure
.\" Author: Jason Gunthorpe
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 06\ \&August\ \&2016
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT\-SECURE" "8" "06\ \&August\ \&2016" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt-secure \- Archive authentication support for APT
.SH "DESCRIPTION"
.PP
Starting with version 0\&.6,
\fBAPT\fR
contains code that does signature checking of the Release file for all repositories\&. This ensures that data like packages in the archive can\*(Aqt be modified by people who have no access to the Release file signing key\&. Starting with version 1\&.1
\fBAPT\fR
requires repositories to provide recent authentication information for unimpeded usage of the repository\&.
.PP
If an archive has an unsigned Release file or no Release file at all current APT versions will refuse to download data from them by default in
\fBupdate\fR
operations and even if forced to download front\-ends like
\fBapt-get\fR(8)
will require explicit confirmation if an installation request includes a package from such an unauthenticated archive\&.
.PP
As a temporary exception
\fBapt-get\fR(8)
(not
\fBapt\fR(8)!) raises warnings only if it encounters unauthenticated archives to give a slightly longer grace period on this backward compatibility effecting change\&. This exception will be removed in future releases and you can opt\-out of this grace period by setting the configuration option
\fBBinary::apt\-get::Acquire::AllowInsecureRepositories\fR
to
false
or
\fB\-\-no\-allow\-insecure\-repositories\fR
on the command line\&.
.PP
You can force all APT clients to raise only warnings by setting the configuration option
\fBAcquire::AllowInsecureRepositories\fR
to
true\&. Individual repositories can also be allowed to be insecure via the
\fBsources.list\fR(5)
option
allow\-insecure=yes\&. Note that insecure repositories are strongly discouraged and all options to force apt to continue supporting them will eventually be removed\&. Users also have the
\fBTrusted\fR
option available to disable even the warnings, but be sure to understand the implications as detailed in
\fBsources.list\fR(5)\&.
.PP
A repository which previously was authenticated but would loose this state in an
\fBupdate\fR
operation raises an error in all APT clients irrespective of the option to allow or forbid usage of insecure repositories\&. The error can be overcome by additionally setting
\fBAcquire::AllowDowngradeToInsecureRepositories\fR
to
true
or for Individual repositories with the
\fBsources.list\fR(5)
option
allow\-downgrade\-to\-insecure=yes\&.
.PP
Note: All APT\-based package management front\-ends like
\fBapt-get\fR(8),
\fBaptitude\fR(8)
and
\fBsynaptic\fR(8)
support this authentication feature, so this manpage uses
APT
to refer to them all for simplicity only\&.
.SH "TRUSTED REPOSITORIES"
.PP
The chain of trust from an APT archive to the end user is made up of several steps\&.
\fBapt\-secure\fR
is the last step in this chain; trusting an archive does not mean that you trust its packages not to contain malicious code, but means that you trust the archive maintainer\&. It\*(Aqs the archive maintainer\*(Aqs responsibility to ensure that the archive\*(Aqs integrity is preserved\&.
.PP
apt\-secure does not review signatures at a package level\&. If you require tools to do this you should look at
\fBdebsig\-verify\fR
and
\fBdebsign\fR
(provided in the debsig\-verify and devscripts packages respectively)\&.
.PP
The chain of trust in Debian starts (e\&.g\&.) when a maintainer uploads a new package or a new version of a package to the Debian archive\&. In order to become effective, this upload needs to be signed by a key contained in one of the Debian package maintainer keyrings (available in the debian\-keyring package)\&. Maintainers\*(Aq keys are signed by other maintainers following pre\-established procedures to ensure the identity of the key holder\&. Similar procedures exist in all Debian\-based distributions\&.
.PP
Once the uploaded package is verified and included in the archive, the maintainer signature is stripped off, and checksums of the package are computed and put in the Packages file\&. The checksums of all of the Packages files are then computed and put into the Release file\&. The Release file is then signed by the archive key for this Debian release, and distributed alongside the packages and the Packages files on Debian mirrors\&. The keys are in the Debian archive keyring available in the
debian\-archive\-keyring
package\&.
.PP
End users can check the signature of the Release file, extract a checksum of a package from it and compare it with the checksum of the package they downloaded by hand \- or rely on APT doing this automatically\&.
.PP
Notice that this is distinct from checking signatures on a per package basis\&. It is designed to prevent two possible attacks:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Network "man in the middle" attacks\&. Without signature checking, malicious agents can introduce themselves into the package download process and provide malicious software either by controlling a network element (router, switch, etc\&.) or by redirecting traffic to a rogue server (through ARP or DNS spoofing attacks)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Mirror network compromise\&. Without signature checking, a malicious agent can compromise a mirror host and modify the files in it to propagate malicious software to all users downloading packages from that host\&.
.RE
.PP
However, it does not defend against a compromise of the master server itself (which signs the packages) or against a compromise of the key used to sign the Release files\&. In any case, this mechanism can complement a per\-package signature\&.
.SH "USER CONFIGURATION"
.PP
\fBapt\-key\fR
is the program that manages the list of keys used by APT to trust repositories\&. It can be used to add or remove keys as well as list the trusted keys\&. Limiting which key(s) are able to sign which archive is possible via the
\fBSigned\-By\fR
in
\fBsources.list\fR(5)\&.
.PP
Note that a default installation already contains all keys to securely acquire packages from the default repositories, so fiddling with
\fBapt\-key\fR
is only needed if third\-party repositories are added\&.
.PP
In order to add a new key you need to first download it (you should make sure you are using a trusted communication channel when retrieving it), add it with
\fBapt\-key\fR
and then run
\fBapt\-get update\fR
so that apt can download and verify the
InRelease
or
Release\&.gpg
files from the archives you have configured\&.
.SH "ARCHIVE CONFIGURATION"
.PP
If you want to provide archive signatures in an archive under your maintenance you have to:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fICreate a toplevel Release file\fR, if it does not exist already\&. You can do this by running
\fBapt\-ftparchive release\fR
(provided in apt\-utils)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fISign it\fR\&. You can do this by running
\fBgpg \-\-clearsign \-o InRelease Release\fR
and
\fBgpg \-abs \-o Release\&.gpg Release\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIPublish the key fingerprint\fR, so that your users will know what key they need to import in order to authenticate the files in the archive\&. It is best to ship your key in its own keyring package like Debian does with
debian\-archive\-keyring
to be able to distribute updates and key transitions automatically later\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIProvide instructions on how to add your archive and key\fR\&. If your users can\*(Aqt acquire your key securely the chain of trust described above is broken\&. How you can help users add your key depends on your archive and target audience ranging from having your keyring package included in another archive users already have configured (like the default repositories of their distribution) to leveraging the web of trust\&.
.RE
.PP
Whenever the contents of the archive change (new packages are added or removed) the archive maintainer has to follow the first two steps outlined above\&.
.SH "SEE ALSO"
.PP
\fBapt.conf\fR(5),
\fBapt-get\fR(8),
\fBsources.list\fR(5),
\fBapt-key\fR(8),
\fBapt-ftparchive\fR(1),
\fBdebsign\fR(1),
\fBdebsig-verify\fR(1),
\fBgpg\fR(1)
.PP
For more background information you might want to review the
\m[blue]\fBDebian Security Infrastructure\fR\m[]\&\s-2\u[1]\d\s+2
chapter of the Securing Debian Manual (also available in the harden\-doc package) and the
\m[blue]\fBStrong Distribution HOWTO\fR\m[]\&\s-2\u[2]\d\s+2
by V\&. Alex Brennen\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[3]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHOR"
.PP
APT was written by the APT team
\&.
.SH "MANPAGE AUTHORS"
.PP
This man\-page is based on the work of Javier Fernández\-Sanguino Peña, Isaac Jones, Colin Walters, Florian Weimer and Michael Vogt\&.
.SH "AUTHORS"
.PP
\fBJason Gunthorpe\fR
.RS 4
.RE
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
Debian Security Infrastructure
.RS 4
\%https://www.debian.org/doc/manuals/securing-debian-howto/ch7
.RE
.IP " 2." 4
Strong Distribution HOWTO
.RS 4
\%http://www.cryptnet.net/fdp/crypto/strong_distro.html
.RE
.IP " 3." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/apt/man/man8/apt.8
================================================
'\" t
.\" Title: apt
.\" Author: APT team
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 20\ \&October\ \&2015
.\" Manual: APT
.\" Source: APT 1.4.9
.\" Language: English
.\"
.TH "APT" "8" "20\ \&October\ \&2015" "APT 1.4.9" "APT"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
apt \- command\-line interface
.SH "SYNOPSIS"
.HP \w'\fBapt\fR\ 'u
\fBapt\fR [\fB\-h\fR] [\fB\-o=\fR\fB\fIconfig_string\fR\fR] [\fB\-c=\fR\fB\fIconfig_file\fR\fR] [\fB\-t=\fR\fB\fItarget_release\fR\fR] [\fB\-a=\fR\fB\fIarchitecture\fR\fR] {list | search | show | update | install\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | remove\ \fIpkg\fR... | upgrade | full\-upgrade | edit\-sources | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}}
.SH "DESCRIPTION"
.PP
\fBapt\fR
provides a high\-level commandline interface for the package management system\&. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like
\fBapt-get\fR(8)
and
\fBapt-cache\fR(8)\&.
.PP
Much like
\fBapt\fR
itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details\&.
.PP
\fBupdate\fR (\fBapt-get\fR(8))
.RS 4
\fBupdate\fR
is used to download package information from all configured sources\&. Other commands operate on this data to e\&.g\&. perform package upgrades or search in and display details about all packages available for installation\&.
.RE
.PP
\fBupgrade\fR (\fBapt-get\fR(8))
.RS 4
\fBupgrade\fR
is used to install available upgrades of all packages currently installed on the system from the sources configured via
\fBsources.list\fR(5)\&. New packages will be installed if required to satisfy dependencies, but existing packages will never be removed\&. If an upgrade for a package requires the remove of an installed package the upgrade for this package isn\*(Aqt performed\&.
.RE
.PP
\fBfull\-upgrade\fR (\fBapt-get\fR(8))
.RS 4
full\-upgrade
performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole\&.
.RE
.PP
\fBinstall\fR, \fBremove\fR, \fBpurge\fR (\fBapt-get\fR(8))
.RS 4
Performs the requested action on one or more packages specified via
\fBregex\fR(7),
\fBglob\fR(7)
or exact match\&. The requested action can be overridden for specific packages by append a plus (+) to the package name to install this package or a minus (\-) to remove it\&.
.sp
A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select\&. Alternatively the version from a specific release can be selected by following the package name with a forward slash (/) and codename (stretch, buster, sid \&...) or suite name (stable, testing, unstable)\&. This will also select versions from this release for dependencies of this package if needed to satisfy the request\&.
.sp
Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind, in case the remove was an accident\&. Just issuing an installation request for the accidentally removed package will restore its function as before in that case\&. On the other hand you can get rid of these leftovers by calling
\fBpurge\fR
even on already removed packages\&. Note that this does not affect any data or configuration stored in your home directory\&.
.RE
.PP
\fBautoremove\fR (\fBapt-get\fR(8))
.RS 4
autoremove
is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the meantime\&.
.sp
You should check that the list does not include applications you have grown to like even though they were once installed just as a dependency of another package\&. You can mark such a package as manually installed by using
\fBapt-mark\fR(8)\&. Packages which you have installed explicitly via
\fBinstall\fR
are also never proposed for automatic removal\&.
.RE
.PP
\fBsearch\fR (\fBapt-cache\fR(8))
.RS 4
\fBsearch\fR
can be used to search for the given
\fBregex\fR(7)
term(s) in the list of available packages and display matches\&. This can e\&.g\&. be useful if you are looking for packages having a specific feature\&. If you are looking for a package including a specific file try
\fBapt-file\fR(1)\&.
.RE
.PP
\fBshow\fR (\fBapt-cache\fR(8))
.RS 4
Show information about the given package(s) including its dependencies, installation and download size, sources the package is available from, the description of the packages content and much more\&. It can e\&.g\&. be helpful to look at this information before allowing
\fBapt\fR(8)
to remove a package or while searching for new packages to install\&.
.RE
.PP
\fBlist\fR (work\-in\-progress)
.RS 4
\fBlist\fR
is somewhat similar to
\fBdpkg\-query \-\-list\fR
in that it can display a list of packages satisfying certain criteria\&. It supports
\fBglob\fR(7)
patterns for matching package names as well as options to list installed (\fB\-\-installed\fR), upgradeable (\fB\-\-upgradeable\fR) or all available (\fB\-\-all\-versions\fR) versions\&.
.RE
.PP
\fBedit\-sources\fR (work\-in\-progress)
.RS 4
edit\-sources
lets you edit your
\fBsources.list\fR(5)
files in your preferred texteditor while also providing basic sanity checks\&.
.RE
.SH "SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS"
.PP
The
\fBapt\fR(8)
commandline is designed as an end\-user tool and it may change behavior between versions\&. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use\&.
.PP
All features of
\fBapt\fR(8)
are available in dedicated APT tools like
\fBapt-get\fR(8)
and
\fBapt-cache\fR(8)
as well\&.
\fBapt\fR(8)
just changes the default value of some options (see
\fBapt.conf\fR(5)
and specifically the Binary scope)\&. So you should prefer using these commands (potentially with some additional options enabled) in your scripts as they keep backward compatibility as much as possible\&.
.SH "SEE ALSO"
.PP
\fBapt-get\fR(8),
\fBapt-cache\fR(8),
\fBsources.list\fR(5),
\fBapt.conf\fR(5),
\fBapt-config\fR(8), The APT User\*(Aqs guide in /usr/share/doc/apt\-doc/,
\fBapt_preferences\fR(5), the APT Howto\&.
.SH "DIAGNOSTICS"
.PP
\fBapt\fR
returns zero on normal operation, decimal 100 on error\&.
.SH "BUGS"
.PP
\m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[1]\d\s+2\&. If you wish to report a bug in APT, please see
/usr/share/doc/debian/bug\-reporting\&.txt
or the
\fBreportbug\fR(1)
command\&.
.SH "AUTHOR"
.PP
\fBAPT team\fR
.RS 4
.RE
.SH "NOTES"
.IP " 1." 4
APT bug page
.RS 4
\%http://bugs.debian.org/src:apt
.RE
================================================
FILE: packages/aptly/Makefile.patch
================================================
diff -uNr aptly-1.4.0/Makefile aptly-1.4.0.mod/Makefile
--- aptly-1.4.0/Makefile 2019-07-06 16:03:14.000000000 +0300
+++ aptly-1.4.0.mod/Makefile 2019-07-23 00:58:29.206419471 +0300
@@ -4,7 +4,7 @@
else
TAG="$(shell git describe --tags)"
endif
-VERSION=$(shell echo $(TAG) | sed 's@^v@@' | sed 's@-@+@g')
+VERSION ?= $(shell echo $(TAG) | sed 's@^v@@' | sed 's@-@+@g')
PACKAGES=context database deb files gpg http query swift s3 utils
PYTHON?=python
TESTS?=
================================================
FILE: packages/aptly/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://www.aptly.info
TERMUX_PKG_DESCRIPTION="A Swiss Army knife for Debian repository management."
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch "
TERMUX_PKG_VERSION=1.4.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/aptly-dev/aptly/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=4172d54613139f6c34d5a17396adc9675d7ed002e517db8381731d105351fbe5
termux_step_make() {
termux_setup_golang
export GOPATH=$TERMUX_PKG_BUILDDIR
mkdir -p "$GOPATH"/src/github.com/aptly-dev/
cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/aptly-dev/aptly
cd "$GOPATH"/src/github.com/aptly-dev/aptly
make install VERSION=$TERMUX_PKG_VERSION
}
termux_step_make_install() {
install -Dm700 \
"$GOPATH"/bin/${GOOS}_${GOARCH}/aptly \
"$TERMUX_PREFIX"/bin/aptly
install -Dm600 \
"$TERMUX_PKG_SRCDIR"/man/aptly.1 \
"$TERMUX_PREFIX"/share/man/man1/aptly.1
}
================================================
FILE: packages/argp/argp-fmtstream.h.patch
================================================
--- ./argp-fmtstream.h.orig 2003-12-11 09:37:05.000000000 +0100
+++ ./argp-fmtstream.h 2011-08-12 11:56:43.000000000 +0200
@@ -192,7 +192,7 @@
extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
-#ifdef __OPTIMIZE__
+#if defined(__OPTIMIZE__) && !defined(__clang__)
/* Inline versions of above routines. */
#if !_LIBC
================================================
FILE: packages/argp/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://www.lysator.liu.se/~nisse/misc/
TERMUX_PKG_DESCRIPTION="Standalone version of arguments parsing functions from GLIBC"
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_VERSION=1.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be
TERMUX_PKG_SRCURL=https://www.lysator.liu.se/~nisse/misc/argp-standalone-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_NO_STATICSPLIT=true
termux_step_post_make_install() {
cp libargp.a $TERMUX_PREFIX/lib
cp $TERMUX_PKG_SRCDIR/argp.h $TERMUX_PREFIX/include
}
================================================
FILE: packages/aria2/build.sh
================================================
TERMUX_PKG_HOMEPAGE=https://aria2.github.io
TERMUX_PKG_DESCRIPTION="Download utility supporting HTTP/HTTPS, FTP, BitTorrent and Metalink"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=1.35.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/aria2/aria2/releases/download/release-${TERMUX_PKG_VERSION}/aria2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=1e2b7fd08d6af228856e51c07173cfcf987528f1ac97e04c5af4a47642617dfd
TERMUX_PKG_DEPENDS="libc++, c-ares, openssl, libxml2, zlib"
# sqlite3 is only used for loading cookies from firefox or chrome:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-openssl
--without-gnutls
--without-libuv
--without-sqlite3
--without-libssh2
ac_cv_func_basename=yes
ac_cv_func_getaddrinfo=yes
ac_cv_func_gettimeofday=yes
ac_cv_func_sleep=yes
ac_cv_func_usleep=yes
ac_cv_search_getaddrinfo=no
"
termux_step_pre_configure() {
if [ "$TERMUX_ARCH" = "arm" ]; then
CXXFLAGS="${CFLAGS/-Oz/-Os}"
fi
}
================================================
FILE: packages/arj/001_arches_align.patch
================================================
Description: Correct build failure on ia64 due to unaligned memory access.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2008-06-16
Index: b/arj_proc.c
===================================================================
--- a/arj_proc.c 2005-06-21 22:53:12.000000000 +0300
+++ b/arj_proc.c 2008-06-16 08:25:28.000000000 +0300
@@ -2898,7 +2898,7 @@ char *ltrim(char *str)
}
#endif
-#if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
+#if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && !defined(ARJDISP) && !defined(REGISTER)
/* Model-independent routine to get 2 bytes from far RAM */
unsigned int mget_word(char FAR *p)
Index: b/arj_proc.h
===================================================================
--- a/arj_proc.h 2004-01-25 12:39:30.000000000 +0200
+++ b/arj_proc.h 2008-06-16 08:25:28.000000000 +0300
@@ -12,7 +12,7 @@
#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
-#ifndef WORDS_BIGENDIAN
+#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
#define mget_dword(p) (*(unsigned long *)(p))
@@ -60,7 +60,7 @@ void pack_mem(struct mempack *mempack);
void unpack_mem(struct mempack *mempack);
void strip_lf(char *str);
char *ltrim(char *str);
-#ifdef WORDS_BIGENDIAN
+#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
unsigned int mget_word(char FAR *p);
unsigned long mget_dword(char FAR *p);
void mput_word(unsigned int w, char FAR *p);
================================================
FILE: packages/arj/002_no_remove_static_const.patch
================================================
Description: Set the static const intergrity_identifier variable as volatile
instead of building the file with -O0 to avoid the compiler optimizing it
away, so that we can use standard flags everywhere.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2013-05-10
---
integr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/integr.c
+++ b/integr.c
@@ -5,7 +5,7 @@
*
*/
-static const char intergrity_identifier[] = {
+static volatile const char intergrity_identifier[] = {
0xB0, 0x03, 0xB0, 0x02, 0xB0, 0x03,
0xB0, 0x04, 0xB0, 0x05,
0x90, 0x90, 0x90, 0x90,
================================================
FILE: packages/arj/003_64_bit_clean.patch
================================================
Description: Make code 64-bit clean.
Author: Guillem Jover
Origin: vendor
Bug-Debian: https://bugs.debian.org/339815
Forwarded: no
Last-Update: 2005-11-24
Index: b/arj_arcv.c
===================================================================
--- a/arj_arcv.c 2005-06-21 22:53:12.000000000 +0300
+++ b/arj_arcv.c 2008-06-16 08:25:43.000000000 +0300
@@ -59,27 +59,27 @@ static char idxid_fault[]="?";
#define setup_hput(ptr) (tmp_hptr=(ptr))
#define hget_byte() (*(tmp_hptr++)&0xFF)
-#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
+#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
/* Reads two bytes from the header, incrementing the pointer */
-static unsigned int hget_word()
+static uint16_t hget_word()
{
- unsigned int result;
+ uint16_t result;
result=mget_word(tmp_hptr);
- tmp_hptr+=sizeof(short);
+ tmp_hptr+=sizeof(uint16_t);
return result;
}
/* Reads four bytes from the header, incrementing the pointer */
-static unsigned long hget_longword()
+static uint32_t hget_longword()
{
- unsigned long result;
+ uint32_t result;
result=mget_dword(tmp_hptr);
- tmp_hptr+=sizeof(unsigned long);
+ tmp_hptr+=sizeof(uint32_t);
return result;
}
@@ -87,18 +87,18 @@ static unsigned long hget_longword()
/* Writes two bytes to the header, incrementing the pointer */
-static void hput_word(unsigned int w)
+static void hput_word(uint16_t w)
{
mput_word(w,tmp_hptr);
- tmp_hptr+=sizeof(unsigned short);
+ tmp_hptr+=sizeof(uint16_t);
}
/* Writes four bytes to the header, incrementing the pointer */
-static void hput_longword(unsigned long l)
+static void hput_longword(uint32_t l)
{
mput_dword(l,tmp_hptr);
- tmp_hptr+=sizeof(unsigned long);
+ tmp_hptr+=sizeof(uint32_t);
}
/* Calculates and stores the basic header size */
Index: b/arj_proc.c
===================================================================
--- a/arj_proc.c 2008-06-16 08:25:28.000000000 +0300
+++ b/arj_proc.c 2008-06-16 08:25:43.000000000 +0300
@@ -585,7 +585,7 @@ int search_for_extension(char *name, cha
/* Returns the exact amount of data that could be safely written to the
destination volume */
-unsigned long get_volfree(unsigned int increment)
+unsigned long get_volfree(unsigned long increment)
{
unsigned long pvol;
unsigned int arjsec_overhead;
@@ -605,7 +605,7 @@ unsigned long get_volfree(unsigned int i
remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead-
(long)out_bytes-(long)cpos-(long)ext_voldata-
MULTIVOLUME_RESERVE-t_volume_offset;
- return((unsigned long)min(remain, (unsigned long)increment));
+ return((unsigned long)min(remain, increment));
}
/* Performs various checks when multivolume data is packed to predict an
@@ -2466,14 +2466,14 @@ static int get_str_from_jq()
*tsptr='\0';
endptr=tsptr;
tsptr=sptr;
- while((unsigned int)tsptr<(unsigned int)endptr&&patterns>8 , p+1);
@@ -2931,7 +2931,7 @@ void mput_word(unsigned int w, char FAR
/* Model-independent routine to store 4 bytes in far RAM */
-void mput_dword(unsigned long d, char FAR *p)
+void mput_dword(uint32_t d, char FAR *p)
{
mput_word(d&0xFFFF, p);
mput_word(d>>16 , p+2);
Index: b/arj_proc.h
===================================================================
--- a/arj_proc.h 2008-06-16 08:25:28.000000000 +0300
+++ b/arj_proc.h 2008-06-16 08:25:43.000000000 +0300
@@ -8,15 +8,17 @@
#ifndef ARJ_PROC_INCLUDED
#define ARJ_PROC_INCLUDED
+#include
+
/* Helper macros */
-#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
-#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
+#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
+#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
-#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
-#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
-#define mget_dword(p) (*(unsigned long *)(p))
-#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
+#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
+#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
+#define mget_dword(p) (*(uint32_t *)(p))
+#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
#endif
/* Prototypes */
@@ -31,7 +33,7 @@ void copy_bytes(unsigned long nbytes);
int translate_path(char *name);
void restart_proc(char *dest);
int search_for_extension(char *name, char *ext_list);
-unsigned long get_volfree(unsigned int increment);
+unsigned long get_volfree(unsigned long increment);
unsigned int check_multivolume(unsigned int increment);
void store();
void hollow_encode();
@@ -61,10 +63,10 @@ void unpack_mem(struct mempack *mempack)
void strip_lf(char *str);
char *ltrim(char *str);
#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
-unsigned int mget_word(char FAR *p);
-unsigned long mget_dword(char FAR *p);
-void mput_word(unsigned int w, char FAR *p);
-void mput_dword(unsigned long d, char FAR *p);
+uint16_t mget_word(char FAR *p);
+uint32_t mget_dword(char FAR *p);
+void mput_word(uint16_t w, char FAR *p);
+void mput_dword(uint32_t d, char FAR *p);
#endif
#endif
================================================
FILE: packages/arj/004_parallel_build.patch
================================================
Description: Fix upstream build sysstem to support parallel builds.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2007-12-05
---
gnu/makefile.in | 74 +++++++++++++++++++++++++++++++++-----------------------
1 file changed, 44 insertions(+), 30 deletions(-)
--- a/gnu/makefile.in
+++ b/gnu/makefile.in
@@ -159,13 +159,15 @@ $(SFXSTUB_DIR)/%.o: $(SRC_DIR)/%.c
# Main dependency tree
#
-.PHONY: timestamp prepare cleanup package help
+.PHONY: timestamp msg-headers depends prepare clean package help
ifdef COMMERCIAL
MAKE_KEY=$(TOOLS_DIR)/make_key$x
endif
all: prepare timestamp
+ $(MAKE) msg-headers
+ $(MAKE) depends
$(MAKE) do-all
do-all: \
@@ -175,8 +177,28 @@ do-all: \
$(REGISTER_DIR)/$(REGISTER)$x \
$(ARJDISP_DIR)/arjdisp$x \
$(TOOLS_DIR)/packager$x \
- $(MAKE_KEY) \
- dispose
+ $(MAKE_KEY)
+
+MSG_ID := \
+ msg_crp msg_stb msg_sfv msg_sfx msg_sfj msg_arj msg_rej msg_reg msg_adi
+MSG_HEADERS := $(patsubst %,$(BASEDIR)/%.h,$(MSG_ID))
+
+msg-headers: $(MSG_HEADERS)
+
+.deps:
+ mkdir -p $@
+
+.deps/%.d: %.c .deps
+ $(CC) $(CPPFLAGS) $(COPT) $< -MM > $@
+
+SOURCES = $(wildcard *.c)
+DEPS = $(addprefix .deps/,$(SOURCES:.c=.d))
+
+ifeq ($(sort $(DEPS)),$(sort $(wildcard .deps/*.d)))
+include $(DEPS)
+endif
+
+depends: $(DEPS)
#
# Update timestamp file
@@ -186,12 +208,6 @@ timestamp: $(TOOLS_DIR)/today$x
$(TOOLS_DIR)/today$x $(LOCALE) $(BASEDIR)
#
-# Final cleanup
-#
-
-dispose:
-
-#
# The tools
#
@@ -255,7 +271,7 @@ $(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_O
$(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS)
$(TOOLS_DIR)/postproc $@
-$(BASEDIR)/nmsg_crp.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/nmsg_crp.c $(BASEDIR)/msg_crp.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_crp $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -269,7 +285,7 @@ $(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SFXSTUB_OBJS) $(LIBS)
$(TOOLS_DIR)/postproc$x $@ -sfx
-$(BASEDIR)/nmsg_stb.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/nmsg_stb.c $(BASEDIR)/msg_stb.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_stb $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -287,7 +303,8 @@ $(ARJSFXV_DIR)/arjsfxv$x: $(ARJSFXV_OBJS
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXV_OBJS) $(LIBS) $(DYN_LIBS)
$(TOOLS_DIR)/postproc$x $@ -sfx
-$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c \
+$(BASEDIR)/msg_sfv.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfv $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -304,7 +321,8 @@ $(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFX_OBJS) $(LIBS)
$(TOOLS_DIR)/postproc$x $@ -sfx
-$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c \
+$(BASEDIR)/msg_sfx.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfx $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -319,7 +337,8 @@ $(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_O
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXJR_OBJS) $(LIBS)
$(TOOLS_DIR)/postproc$x $@ -sfx
-$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c \
+$(BASEDIR)/msg_sfj.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_sfj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -354,7 +373,8 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(BASEDIR)/help.arj
$(TOOLS_DIR)/postproc $@
-$(BASEDIR)/fmsg_arj.c $(BASEDIR)/imsg_arj.c $(BASEDIR)/nmsg_arj.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_arj.c $(BASEDIR)/imsg_arj.c $(BASEDIR)/nmsg_arj.c \
+$(BASEDIR)/msg_arj.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_arj $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -372,7 +392,8 @@ $(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REARJ_OBJS) $(LIBS)
$(TOOLS_DIR)/postproc $@
-$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c \
+$(BASEDIR)/msg_rej.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_rej $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -388,7 +409,8 @@ $(REGISTER_DIR)/$(REGISTER)$x: $(REGISTE
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REGISTER_OBJS) $(LIBS)
$(TOOLS_DIR)/postproc $@ -sfx
-$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c \
+$(BASEDIR)/msg_reg.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_reg $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -402,7 +424,8 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DI
$(ARJDISP_DIR)/arjdisp$x: $(ARJDISP_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJDISP_OBJS) $(LIBS)
-$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c: $(TOOLS_DIR)/msgbind$x $(RESFILE)
+$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c \
+$(BASEDIR)/msg_adi.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
$(TOOLS_DIR)/msgbind $(RESFILE) msg_adi $(OS_ID) $(PACKAGE) $(LOCALE) $(BASEDIR)
#
@@ -427,18 +450,9 @@ prepare:
#
clean:
- -rm -f $(BASEDIR)/*
- -rm -f $(TOOLS_DIR)/*
- -rm -f $(ARJCRYPT_DIR)/*
- -rm -f $(SFXSTUB_DIR)/*
- -rm -f $(ARJSFXV_DIR)/*
- -rm -f $(ARJSFX_DIR)/*
- -rm -f $(ARJSFXJR_DIR)/*
- -rm -f $(ARJ_DIR)/*
- -rm -f $(REARJ_DIR)/*
- -rm -f $(REGISTER_DIR)/*
- -rm -f $(ARJDISP_DIR)/*
- -rm -f arj.core
+ rm -rf .deps
+ rm -rf $(BASEDIR)
+ rm -f arj.core
#
# Local installation
================================================
FILE: packages/arj/005_use_system_strnlen.patch
================================================
Description: Detect and conditionally use system strnlen function.
This fixes build failures when the system has eglibc 2.10.
Author: Guillem Jover
Origin: vendor
Bug-Debian: https://bugs.debian.org/546475
Forwarded: no
Last-Update: 2009-09-13
---
fardata.c | 2 ++
gnu/config.h.in | 1 +
gnu/configure.in | 4 +++-
3 files changed, 6 insertions(+), 1 deletion(-)
--- a/fardata.c
+++ b/fardata.c
@@ -190,6 +190,7 @@ int msg_sprintf(char *str, FMSG *fmt, ..
/* Length-limited strlen() */
+#ifndef HAVE_STRNLEN
static int strnlen(const char FAR *s, int count)
{
const char FAR *sc;
@@ -198,6 +199,7 @@ static int strnlen(const char FAR *s, in
;
return(sc-s);
}
+#endif
/* Hex representation of digits */
--- a/gnu/config.h.in
+++ b/gnu/config.h.in
@@ -8,6 +8,7 @@
#undef HAVE_FCLOSEALL
#undef HAVE_SETPRIORITY
#undef HAVE_STRCASECMP
+#undef HAVE_STRNLEN
#undef HAVE_STRUPR
#undef HAVE_STRLWR
#undef USE_COLORS
--- a/gnu/configure.in
+++ b/gnu/configure.in
@@ -35,7 +35,9 @@ AC_FUNC_MEMCMP
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([getcwd min max mkdir mkdtemp rmdir fcloseall strcasecmp setpriority strdup strerror strstr strupr strlwr strtol strtoul])
+AC_CHECK_FUNCS([getcwd min max mkdir mkdtemp rmdir fcloseall \
+ strcasecmp setpriority strdup strerror strstr strnlen \
+ strupr strlwr strtol strtoul])
dnl Platform-specific tuning
PROG_EXT=
================================================
FILE: packages/arj/006_use_safe_strcpy.patch
================================================
Description: Use a safe strcpy for overlapping strings, among others
fixes a build problem with a mangled generated .c file by msgbind
(thus FTBFS), and CRC errors at run-time.
Author: Guillem Jover
Origin: vendor
Bug-Debian: https://bugs.debian.org/590354
Forwarded: no
Last-Update: 2010-07-26
---
arj.c | 2 +-
arjdata.c | 9 +--------
ea_mgr.c | 2 +-
misc.h | 4 ++++
msgbind.c | 2 +-
packager.c | 2 +-
6 files changed, 9 insertions(+), 12 deletions(-)
--- a/arjdata.c
+++ b/arjdata.c
@@ -204,13 +204,6 @@ void date_fmt(char *dest)
#endif
}
-/* A safe strcpy() */
-
-static void safe_strcpy(char *dest, char *src)
-{
- memmove(dest, src, strlen(src)+1);
-}
-
/* Context substitution routine */
char *expand_tags(char *str, int limit)
@@ -232,7 +225,7 @@ char *expand_tags(char *str, int limit)
{
if(*(p+1)==TAG_CHAR)
{
- strcpy(p, p+1);
+ safe_strcpy(p, p+1);
p++;
}
else if(*(p+1)==TAG_SPECIAL_BEGIN&&(et=strchr(p+3, TAG_SPECIAL_END))!=NULL)
--- a/arj.c
+++ b/arj.c
@@ -1169,7 +1169,7 @@ int main(int argc, char *argv[])
if(strlen(tmp_ptr)<=121)
tmp_ptr[0]='\0';
else if(tmp_ptr[120]==' ')
- strcpy(tmp_ptr, tmp_ptr+121);
+ safe_strcpy(tmp_ptr, tmp_ptr+121);
}
if(cmd==ARJ_CMD_ORDER&&strpbrk(tmp_ptr, wildcard_pattern)!=NULL)
error(M_ORDER_WILDCARD);
--- a/ea_mgr.c
+++ b/ea_mgr.c
@@ -696,7 +696,7 @@ int resolve_longname(char *dest, char *n
tmp_name[st_len]='\0';
if(tmp_name[0]==0xFD&&tmp_name[1]==0xFF)
{
- strcpy(tmp_name, (char *)tmp_name+4);
+ safe_strcpy(tmp_name, (char *)tmp_name+4);
st_len-=4;
}
if(st_len==0||st_len+entry>=FILENAME_MAX)
--- a/msgbind.c
+++ b/msgbind.c
@@ -578,7 +578,7 @@ int main(int argc, char **argv)
}
strcat(pool[tpool].data, msgname);
strcat(pool[tpool].data, ", ");
- strcpy(msg_buffer, msg_buffer+1);
+ safe_strcpy(msg_buffer, msg_buffer+1);
buf_len=strlen(msg_buffer);
msg_buffer[--buf_len]='\0';
patch_string(msg_buffer);
--- a/packager.c
+++ b/packager.c
@@ -347,7 +347,7 @@ int main(int argc, char **argv)
expand_tags(buf, sizeof(buf)-1);
if((p=strchr(buf, '.'))!=NULL)
{
- strcpy(p, p+1);
+ safe_strcpy(p, p+1);
if((p=strchr(buf, '.'))!=NULL)
*p='\0';
}
--- a/misc.h
+++ b/misc.h
@@ -11,6 +11,10 @@
#include "arjtypes.h"
#include "filelist.h"
+/* A safe strcpy() */
+
+#define safe_strcpy(dest, src) memmove(dest, src, strlen(src)+1);
+
/* ASCIIZ string copy macro */
#define strcpyn(dest, src, n) \
================================================
FILE: packages/arj/build.sh
================================================
TERMUX_PKG_HOMEPAGE=http://arj.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Open-source version of arj archiver"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Plyushch "
TERMUX_PKG_VERSION=3.10.22
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/arj/arj-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=589e4c9bccc8669e7b6d8d6fcd64e01f6a2c21fe10aad56a83304ecc3b96a7db
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
(cd ./gnu && autoconf -f -i)
# Hack for executing configure script in
# non-standard directory.
{
echo "#!/bin/sh"
echo "cd ./gnu"
echo "\$(dirname \$0)/gnu/configure \"\$@\""
} > ./configure
chmod +x ./configure
}
# ARJ appends archive of its help to its end. Unfortunately stripping and
# ELF cleaning remove it. So redo this addition and correct the
# ARJ self-checksum.
termux_step_post_massage() {
local build_subdir
if [ "$TERMUX_ARCH" = "arm" ]; then
build_subdir="linux-androideabi"
else
build_subdir="linux-android"
fi
"$TERMUX_PKG_SRCDIR/$build_subdir"/en/rs/tools/join \
bin/arj \
"$TERMUX_PKG_SRCDIR/$build_subdir"/en/rs/help.arj
"$TERMUX_PKG_SRCDIR/$build_subdir"/en/rs/tools/postproc \
bin/arj
}
================================================
FILE: packages/arj/doc_refer_robert_k_jung.patch
================================================
Description: Refer to original author Robert K. Jung in the manual page.
Author: Guillem Jover
Origin: vendor
Bug-Debian: https://bugs.debian.org/456275
Forwarded: no
Last-Update: 2008-06-16
Index: b/resource/en/arj.1
===================================================================
--- a/resource/en/arj.1 2005-06-21 21:27:20.000000000 +0300
+++ b/resource/en/arj.1 2008-06-16 08:25:47.000000000 +0300
@@ -21,6 +21,9 @@ arj \- Archiver for .arj files
.IR archive [ .arj ]
.RI [ "base directory" ]
.RI [ "!list name" | "path name" | "wildcard name" ]
+.SH DESCRIPTION
+\fIarj\fP is a compression and file archiving utility. It was invented by
+Robert K. Jung. \fIARJ\fP stands for \fIA\fPrchived by \fIR\fPobert \fIJ\fPung.
.SH COMMANDS
.TP
.B ac
================================================
FILE: packages/arj/gnu_build_fix.patch
================================================
Description: Fix build failure on GNU/Hurd due to missing -ldl, by
adding “gnu*” to the configure case handling libdl linking.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2011-02-28
---
gnu/configure.in | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- a/gnu/configure.in
+++ b/gnu/configure.in
@@ -49,16 +49,11 @@ OS_DEF="-D_UNIX"
DLL_CFLAGS="-fPIC"
case $host_os in
-linux*)
+gnu*|linux*|k*bsd*)
AC_DEFINE(ELF_EXECUTABLES, 1, [Define if executables use ELF format])
DYN_LIBS="-ldl"
LD_STRIP="gnu/stripgcc.lnk"
;;
-k*bsd*)
- AC_DEFINE(ELF_EXECUTABLES)
- DYN_LIBS="-ldl"
- LD_STRIP="gnu/stripgcc.lnk"
- ;;
*bsd*)
AC_DEFINE(ELF_EXECUTABLES)
DLL_FLAGS="-shared -export-dynamic"
================================================
FILE: packages/arj/gnu_build_flags.patch
================================================
Description: Fix upstream build system to honour CPPFLAGS and LDFLAGS.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2013-05-09
---
gnu/makefile.in | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/gnu/makefile.in
+++ b/gnu/makefile.in
@@ -56,7 +56,7 @@ DEBUG_SM = r
ADD_LDFLAGS = -s @LD_STRIP@
endif
-ALL_CFLAGS += $(CFLAGS)
+ALL_CFLAGS += @CPPFLAGS@ $(CPPFLAGS) @CFLAGS@ $(CFLAGS)
# Build Installation paths
@@ -80,11 +80,11 @@ SFXSTUB_DIR = $(BASEDIR)/sfxstub
# Definitions for compiling submodules
LDFLAGS = @LDFLAGS@ $(ADD_LDFLAGS)
-DLL_FLAGS = @DLL_FLAGS@ $(ADD_LDFLAGS)
+DLL_FLAGS = @DLL_FLAGS@ $(LDFLAGS)
DLL_CFLAGS = @DLL_CFLAGS@
REQUIRES_DEF = @REQUIRES_DEF@
-COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) @CFLAGS@ $(ALL_CFLAGS)
+COPT = -c -I@OUT_DIR@ -I$(BASEDIR) -I$(SRC_DIR) $(ALL_CFLAGS)
STD_COPT = -DARJUTIL $(COPT)
ARJ_COPT = -DSFL=4 $(COPT)
ARJSFXV_COPT = -DSFL=3 $(COPT)
@@ -189,7 +190,7 @@ msg-headers: $(MSG_HEADERS)
mkdir -p $@
.deps/%.d: %.c .deps
- $(CC) $(CPPFLAGS) $(COPT) $< -MM > $@
+ $(CC) $(COPT) $< -MM > $@
SOURCES = $(wildcard *.c)
DEPS = $(addprefix .deps/,$(SOURCES:.c=.d))
================================================
FILE: packages/arj/gnu_build_pie.patch
================================================
Description: Support PIE build option.
We always pass -shared and -fPIC after all user defined flags, so that these
will override any possibly passed -fPIE option.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2016-06-03
---
gnu/configure.in | 2 ++
gnu/makefile.in | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
--- a/gnu/makefile.in
+++ b/gnu/makefile.in
@@ -85,7 +85,7 @@ SFXSTUB_DIR = $(BASEDIR)/sfxstub
# Definitions for compiling submodules
LDFLAGS = @LDFLAGS@ $(ADD_LDFLAGS)
-DLL_FLAGS = @DLL_FLAGS@ $(LDFLAGS)
+DLL_FLAGS = $(LDFLAGS) @DLL_FLAGS@
DLL_CFLAGS = @DLL_CFLAGS@
REQUIRES_DEF = @REQUIRES_DEF@
@@ -98,7 +98,7 @@ ARJSFXJR_COPT = -DSFL=1 $(COPT)
REARJ_COPT = -DREARJ $(COPT)
REGISTER_COPT = -DREGISTER $(COPT)
ARJDISP_COPT = -DARJDISP $(COPT)
-ARJCRYPT_COPT = $(DLL_CFLAGS) $(COPT)
+ARJCRYPT_COPT = $(COPT) $(DLL_CFLAGS)
SFXSTUB_COPT = -DSFXSTUB $(COPT)
# Linkage
--- a/gnu/configure.in
+++ b/gnu/configure.in
@@ -52,6 +52,8 @@ case $host_os in
gnu*|linux*|k*bsd*)
AC_DEFINE(ELF_EXECUTABLES, 1, [Define if executables use ELF format])
DYN_LIBS="-ldl"
+ DLL_FLAGS="-shared -fPIC"
+ DLL_CFLAGS="-fPIC"
LD_STRIP="gnu/stripgcc.lnk"
;;
*bsd*)
================================================
FILE: packages/arj/gnu_build_strip.patch
================================================
Description: Support nostrip build option.
By changing the upstrem build system to optionally strip the binaries
after the linking stage and before their preprocessing.
Author: Guillem Jover
Origin: vendor
Bug-Debian: https://bugs.debian.org/436473
Forwarded: no
Last-Update: 2013-05-10
---
gnu/makefile.in | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
--- a/gnu/makefile.in
+++ b/gnu/makefile.in
@@ -50,10 +50,15 @@ endif
ifdef DEBUG
DEBUG_SM = d
-ALL_CFLAGS += -g -DDEBUG
+ALL_CFLAGS += -DDEBUG
else
DEBUG_SM = r
-ADD_LDFLAGS = -s @LD_STRIP@
+endif
+
+ifdef BUILD_STRIP
+STRIP = strip --strip-unneeded --remove-section=.comment --remove-section=.note
+else
+STRIP = :
endif
ALL_CFLAGS += @CPPFLAGS@ $(CPPFLAGS) @CFLAGS@ $(CFLAGS)
@@ -269,6 +274,7 @@ ARJCRYPT_OBJS = $(patsubst %,$(ARJCRYPT_
$(ARJCRYPT_DIR)/arjcrypt$d: $(ARJCRYPT_OBJS) $(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(DLL_FLAGS) -o $@ $(ARJCRYPT_OBJS) $(ARJCRYPT_DEF) $(LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc $@
$(BASEDIR)/nmsg_crp.c $(BASEDIR)/msg_crp.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
@@ -283,6 +289,7 @@ SFXSTUB_OBJS = $(patsubst %,$(SFXSTUB_DI
$(SFXSTUB_DIR)/sfxstub$x: $(SFXSTUB_OBJS) $(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(SFXSTUB_OBJS) $(LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc$x $@ -sfx
$(BASEDIR)/nmsg_stb.c $(BASEDIR)/msg_stb.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
@@ -301,6 +308,7 @@ ARJSFXV_OBJS = $(patsubst %,$(ARJSFXV_DI
$(ARJSFXV_DIR)/arjsfxv$x: $(ARJSFXV_OBJS) $(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXV_OBJS) $(LIBS) $(DYN_LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc$x $@ -sfx
$(BASEDIR)/fmsg_sfv.c $(BASEDIR)/imsg_sfv.c $(BASEDIR)/nmsg_sfv.c \
@@ -319,6 +327,7 @@ ARJSFX_OBJS = $(patsubst %,$(ARJSFX_DIR)
$(ARJSFX_DIR)/arjsfx$x: $(ARJSFX_OBJS) $(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFX_OBJS) $(LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc$x $@ -sfx
$(BASEDIR)/fmsg_sfx.c $(BASEDIR)/imsg_sfx.c $(BASEDIR)/nmsg_sfx.c \
@@ -335,6 +344,7 @@ ARJSFXJR_OBJS = $(patsubst %,$(ARJSFXJR_
$(ARJSFXJR_DIR)/arjsfxjr$x: $(ARJSFXJR_OBJS) $(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJSFXJR_OBJS) $(LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc$x $@ -sfx
$(BASEDIR)/fmsg_sfj.c $(BASEDIR)/imsg_sfj.c $(BASEDIR)/nmsg_sfj.c \
@@ -364,6 +374,7 @@ $(ARJ_DIR)/arj$x: $(ARJ_OBJS) \
$(ARJSFX_DIR)/arjsfx$x \
$(ARJSFXJR_DIR)/arjsfxjr$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJ_OBJS) $(LIBS) $(DYN_LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFXJR_DIR)/arjsfxjr$x
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFX_DIR)/arjsfx$x
$(TOOLS_DIR)/join $(ARJ_DIR)/arj$x $(ARJSFXV_DIR)/arjsfxv$x
@@ -390,6 +401,7 @@ REARJ_OBJS = $(patsubst %,$(REARJ_DIR)/%
$(REARJ_DIR)/rearj$x: $(REARJ_OBJS) \
$(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REARJ_OBJS) $(LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc $@
$(BASEDIR)/fmsg_rej.c $(BASEDIR)/imsg_rej.c $(BASEDIR)/nmsg_rej.c \
@@ -407,6 +419,7 @@ REGISTER_OBJS = $(patsubst %,$(REGISTER_
$(REGISTER_DIR)/$(REGISTER)$x: $(REGISTER_OBJS) \
$(TOOLS_DIR)/postproc$x
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(REGISTER_OBJS) $(LIBS)
+ $(STRIP) $@
$(TOOLS_DIR)/postproc $@ -sfx
$(BASEDIR)/fmsg_reg.c $(BASEDIR)/imsg_reg.c $(BASEDIR)/nmsg_reg.c \
@@ -423,6 +436,7 @@ ARJDISP_OBJS = $(patsubst %,$(ARJDISP_DI
$(ARJDISP_DIR)/arjdisp$x: $(ARJDISP_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(ARJDISP_OBJS) $(LIBS)
+ $(STRIP) $@
$(BASEDIR)/fmsg_adi.c $(BASEDIR)/imsg_adi.c $(BASEDIR)/nmsg_adi.c \
$(BASEDIR)/msg_adi.h: $(TOOLS_DIR)/msgbind$x $(RESFILE)
================================================
FILE: packages/arj/hurd_no_fcntl_getlk.patch
================================================
Description: Fix build failure on GNU/Hurd, by handling unimplemented
fcntl(F_GETLK). The Hurd does not implement yet fcntl(F_GETLK) and
returns ENOSYS, handle this as a non-fatal error.
Author: Guillem Jover
Origin: vendor
Forwarded: no
Last-Update: 2013-05-10
---
environ.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/environ.c
+++ b/environ.c
@@ -1775,7 +1775,8 @@ int file_test_access(char *name)
memset(&flk, 0, sizeof(flk));
rc=fcntl(handle, F_GETLK, &flk);
close(handle);
- return(((rc==-1&&errno!=EINVAL)||(rc!=1&&flk.l_type==F_RDLCK))?-1:0);
+ return(((rc==-1&&errno!=EINVAL&&errno!=ENOSYS)||
+ (rc!=1&&flk.l_type==F_RDLCK))?-1:0);
#endif
}
#endif
================================================
FILE: packages/arj/integr.patch
================================================
Declare arj_integrity_identifier as global.
Without this it's not added to resulting binary
and we need it.
--- src-orig/integr.c 2017-09-08 21:45:38.422802558 +0200
+++ src/integr.c 2017-09-08 22:25:22.853785365 +0200
@@ -5,7 +5,7 @@
*
*/
-static volatile const char intergrity_identifier[] = {
+volatile const char arj_intergrity_identifier[] = {
0xB0, 0x03, 0xB0, 0x02, 0xB0, 0x03,
0xB0, 0x04, 0xB0, 0x05,
0x90, 0x90, 0x90, 0x90,
================================================
FILE: packages/arj/mode.patch
================================================
Fix mode consts.
Use modern consts present on modern Android.
--- src-orig/arjsfxjr.c 2017-09-08 21:45:38.418802563 +0200
+++ src/arjsfxjr.c 2017-09-08 22:12:14.130184907 +0200
@@ -520,7 +520,7 @@
}
}
create_subdir_tree(filename);
- if(file_type!=ARJT_DIR&&(atstream=open(filename, O_CREAT|O_TRUNC|O_BINARY|O_RDWR, S_IREAD|S_IWRITE))<0)
+ if(file_type!=ARJT_DIR&&(atstream=open(filename, O_CREAT|O_TRUNC|O_BINARY|O_RDWR, S_IRUSR|S_IWUSR))<0)
{
skip_file(M_CANTOPEN_F);
errors++;
================================================
FILE: packages/arj/out-of-bounds-read.patch
================================================
Description: Fix out-of-bounds read
We need to handle possible overflows, by using an int instead of a short,
and terminating if after computing the index it is out-of-bounds.
Author: Guillem Jover
Origin: vendor
Bug-Debian: https://bugs.debian.org/783948
Forwarded: no
Last-Update: 2015-07-01
---
--- arj-3.10.22.orig/decode.c
+++ arj-3.10.22/decode.c
@@ -416,10 +416,10 @@ static void NEAR decode_end()
void decode(int action)
{
- short i;
- short r;
- short c;
- static short j;
+ int i;
+ int r;
+ int c;
+ static int j;
#if SFX_LEVEL>=ARJSFXV
if(!setjmp(decode_proc))
@@ -450,9 +450,12 @@ void decode(int action)
{
j=c-(UCHAR_MAX+1-THRESHOLD);
count-=(unsigned long)j;
- i=r-decode_p()-1;
+ int P = decode_p();
+ i=r-P-1;
if(i<0)
i+=DICSIZ;
+ if(i<0)
+ goto termination;
if(r>i&&r=0)
================================================
FILE: packages/arj/security-afl.patch
================================================
Description: Fix buffer overflow causing an invalid pointer free().
Author: Guillem Jover