~rattab/autoconf-upstream

8ae2c2af4a2f4a0baf1785e222b83dc491a4e852 — RĂ©mi Attab 3 years ago 3e7cd06
Add pull.sh
2 files changed, 250 insertions(+), 0 deletions(-)

A list.log
A pull.sh
A list.log => list.log +68 -0
@@ 0,0 1,68 @@
arch/0001-autoconf-2.69-perl-5.22-autoscan.patch
arch/0002-autoconf-2.69-perl-5.28.patch
arch/0003-autoconf-2.69-libtool-compatibility.patch
arch/0004-Port-tests-to-Bash-5.patch
debian/add-runstatedir.patch
debian/AM_PROG_LIBTOOL.patch
debian/atomic.patch
debian/avoid-undefined-behavior-for-32bit-off_t.patch
debian/mmap-leak-fix.patch
debian/stricter-versioning.patch
debian/texinfo.patch
debian/unescaped-left-brace-warning-fix.patch
fedora/autoconf-2.69-bash-5-LINENO.patch
fedora/autoconf-2.69-perl-5.22-autoscan.patch
freebsd/patch-bin-autoscan.in
freebsd/patch-bison
freebsd/patch-doc_autoconf.texi
freebsd/patch-doc-Makefile.in
netbsd/patch-aa
netbsd/patch-lib_autoconf_fortran.m4
oe/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
oe/add_musl_config.patch
oe/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch
oe/autoreconf-exclude.patch
oe/autoreconf-gnuconfigize.patch
oe/autotest-automake-result-format.patch
oe/check-automake-cross-warning.patch
oe/config_site.patch
oe/fix_path_xtra.patch
oe/performance.patch
oe/preferbash.patch
oe/program_prefix.patch
oe/remove-usr-local-lib-from-m4.patch
openbsd/patch-bin_autom4te_in
openbsd/patch-bin_autoupdate_in
openbsd/patch-configure
openbsd/patch-doc_autoconf_texi
openbsd/patch-doc_Makefile_in
openbsd/patch-lib_autoconf_Makefile_in
openbsd/patch-lib_autotest_Makefile_in
openbsd/patch-lib_m4sugar_m4sugar_m4
openbsd/patch-lib_m4sugar_Makefile_in
openbsd/patch-Makefile_in
openbsd/patch-tests_c_at
openbsd/patch-tests_local_at
openbsd/patch-tests_Makefile_in
openbsd/patch-tests_tools_at
ubuntu/add-runstatedir.patch
ubuntu/AM_PROG_LIBTOOL.patch
ubuntu/atomic.patch
ubuntu/avoid-undefined-behavior-for-32bit-off_t.patch
ubuntu/mmap-leak-fix.patch
ubuntu/stricter-versioning.patch
ubuntu/texinfo.patch
ubuntu/unescaped-left-brace-warning-fix.patch
yocto/AC_HEADER_MAJOR-port-to-glibc-2.25.patch
yocto/add_musl_config.patch
yocto/autoconf-replace-w-option-in-shebangs-with-modern-use-warnings.patch
yocto/autoreconf-exclude.patch
yocto/autoreconf-gnuconfigize.patch
yocto/autotest-automake-result-format.patch
yocto/check-automake-cross-warning.patch
yocto/config_site.patch
yocto/fix_path_xtra.patch
yocto/performance.patch
yocto/preferbash.patch
yocto/program_prefix.patch
yocto/remove-usr-local-lib-from-m4.patch

A pull.sh => pull.sh +182 -0
@@ 0,0 1,182 @@
#! /usr/bin/env bash
set -o errexit -o nounset -o pipefail

set -o xtrace

repos=(
    debian
    ubuntu
    arch
    fedora
    oe
    yocto
    openbsd
    freebsd
    netbsd
)

# Debian
#
# URL:
# - http://deb.debian.org/debian/pool/main/a/autoconf/
# - https://packages.debian.org/sid/autoconf
#
# Notes: 2.69-11.1 is used by their unstable release. Hasn't made it's
# way into their stable releases yet.
function debian() {
    local dir="http://deb.debian.org/debian/pool/main/a/autoconf/"

    echo "Available versions:"
    curl -s "$dir" |\
        grep 'autoconf[[:alnum:]\._-]*\.tar\.xz' | \
        sed -r 's/.*(autoconf[[:alnum:]\._-]*\.tar\.xz).*/\1/' | \
        sort

    local version="2.69-11.1"
    local file="autoconf_${version}.debian.tar.xz"

    echo "Pulling: ${file}"
    mkdir -p debian
    wget -P debian/ "${dir}/${file}"
    tar -C debian/ -xf "debian/${file}"
    cp debian/debian/patches/*.patch debian
}

# Ubuntu
#
# URL:
# - https://packages.ubuntu.com/focal/autoconf
# - http://archive.ubuntu.com/ubuntu/pool/main/a/autoconf/
function ubuntu() {
    echo "Available versions:"
    local dir="http://archive.ubuntu.com/ubuntu/pool/main/a/autoconf/"
    curl -s "$dir" |\
        grep 'autoconf[[:alnum:]\._-]*\.tar\.xz' | \
        sed -r 's/.*(autoconf[[:alnum:]\._-]*\.tar\.xz).*/\1/' | \
        sort

    local version="2.69-11.1"
    local file="autoconf_${version}.debian.tar.xz"

    echo "Pulling: ${file}"
    mkdir ubuntu
    wget -P ubuntu/ "${dir}/${file}"
    tar -C ubuntu/ -xf "ubuntu/${file}"
    cp ubuntu/debian/patches/*.patch ubuntu
}

# Arch
#
# URL:
# - https://www.archlinux.org/packages/core/any/autoconf/
# - https://github.com/archlinux/svntogit-packages/tree/packages/autoconf/trunk
function arch() {
    mkdir arch
    git clone https://github.com/archlinux/svntogit-packages -b packages/autoconf --single-branch arch/git
    cp arch/git/trunk/*.patch arch/
}

# Fedora
#
# URL:
# - https://src.fedoraproject.org/rpms/autoconf
function fedora() {
    mkdir fedora
    git clone https://src.fedoraproject.org/rpms/autoconf.git fedora/git
    cp fedora/git/*.patch fedora
}

# OpenEmbedded
#
# URL:
# - http://layers.openembedded.org/layerindex/recipe/217/
# - http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/autoconf/autoconf
function oe() {
    mkdir oe
    git clone git://git.openembedded.org/openembedded-core --depth=1 oe/git
    cp oe/git/meta/recipes-devtools/autoconf/autoconf/*.patch oe/
}

# Yocto - Porky (???)
#
# URL:
# - https://lists.gnu.org/archive/html/autoconf/2020-03/msg00070.html
# - http://git.yoctoproject.org/cgit.cgi/poky-contrib/
# - http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ross/newautoconf
#
# Notes: Yocto's patch set is the exact same as the one for OE. The
# two projects seem very much linked.
function yocto() {
    mkdir yocto
    git clone https://git.yoctoproject.org/git/poky-contrib --depth=1 yocto/git
    cp yocto/git/meta/recipes-devtools/autoconf/autoconf/*.patch yocto/
}

# OpenBSD
#
# URL:
# - https://openports.se/devel/autoconf/2.69
# - http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/devel/autoconf/2.69/
#
# Notes: Uses CVS as their canonical version control but had trouble
# accessing it. Used one of their uploaded mirrors instead.
function openbsd() {
    local bsd_version="6.7"
    local mirror="https://cloudflare.cdn.openbsd.org/pub/OpenBSD"

    mkdir openbsd

    wget -P openbsd/ "${mirror}/${bsd_version}/ports.tar.gz"
    tar -C openbsd -xzf openbsd/ports.tar.gz

    cp openbsd/ports/devel/autoconf/2.69/patches/patch-* openbsd/
}

# FreeBSD
#
# URL:
# - https://github.com/freebsd/freebsd-ports
# - https://svnweb.freebsd.org/ports/head/devel/autoconf/files/
#
# Notes: SVN is their canonical repo but their git mirror is easier to
# work with. Git mirror seems pretty up to date.
function freebsd() {
    mkdir freebsd
    git clone https://github.com/freebsd/freebsd-ports.git --depth=1 freebsd/git
    cp freebsd/git/devel/autoconf/files/patch-* freebsd/
}

# NetBSD
#
# URL:
# - https://pkgsrc.se/devel/autoconf
# - http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/autoconf/patches/?only_with_tag=MAIN
#
# Notes: Mercurial or CVS seems to be their canonical repo but their
# git mirror is up to do date. Easier to stick to that.
function netbsd() {
    mkdir netbsd
    git clone https://github.com/NetBSD/pkgsrc --depth=1 netbsd/git
    cp netbsd/git/devel/autoconf/patches/patch-* netbsd/
}

# GNU
#
# URL:
# - http://savannah.gnu.org/git/?group=autoconf
function origin() {
    git clone https://git.savannah.gnu.org/git/autoconf.git origin
}


function main() {
    for repo in "${repos[@]}"; do
        if [ ! -d "./${repo}" ]; then
            "$repo"
        fi
    done

    ls */*.patch */patch-* > list.log
}

main