From acaeb102aee13f921d65e61c96a689fd43f9d8f5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 20 Mar 2024 18:30:45 +0800 Subject: [PATCH 1/2] packages: Fix and simplify for vim tags page Vladimir has reported that the link target of this is wrong. Note that the link target and the displayed text should be the same, thus use instead of ... to simplify it. --- chapter03/packages.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chapter03/packages.xml b/chapter03/packages.xml index edc5cd611..dbbb43eae 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -822,8 +822,7 @@ The version of vim changes daily. To get the latest version, go to - - https://github.com/vim/vim/tags. + . From c3a956946d0d4849b45f1a39aeb1998ceaff08db Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Wed, 20 Mar 2024 09:46:44 -0500 Subject: [PATCH 2/2] Fix currency and cleanup Fix currency for upstream changes for Python psmisc Add currency for lz Remove a lot of old commented code. --- lfs-latest-git.php | 58 ++++++---------------------------------------- 1 file changed, 7 insertions(+), 51 deletions(-) diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 30d960b8e..95abb7c28 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -77,6 +77,7 @@ function http_get_file( $url ) } if ( preg_match( "/sourceforge/", $url ) || + preg_match( "/python/", $url ) || preg_match( "/psmisc/", $url ) ) { exec( "lynx -dump $url 2>/dev/null", $lines ); @@ -134,6 +135,7 @@ if ( $package == "iana-etc" ) $dirpath = github("Mic92/iana-etc"); if ( $package == "intltool" ) $dirpath = "https://launchpad.net/intltool/trunk"; if ( $package == "libffi" ) $dirpath = github("libffi/libffi"); if ( $package == "libxcrypt" ) $dirpath = github("besser82/libxcrypt"); +if ( $package == "lz" ) $dirpath = github("lz4/lz4"); if ( $package == "meson" ) $dirpath = github("mesonbuild/meson"); if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc"; if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current"; @@ -160,53 +162,6 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); if ( preg_match( "/^ftp/", $dirpath ) ) { echo "ftp should not occur\n"; - /* - $dirpath = substr( $dirpath, 6 ); // Remove ftp:// - $dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash - $position = strpos( $dirpath, "/" ); // Divide at first slash - $server = substr( $dirpath, 0, $position ); - $path = substr( $dirpath, $position ); - - $conn = ftp_connect( $server ); - ftp_login( $conn, "anonymous", "" ); - - // See if we need special handling - if ( isset( $exceptions[ $package ] ) ) - { - $specials = explode( ":", $exceptions[ $package ] ); - - foreach ( $specials as $i ) - { - list( $op, $regexp ) = explode( "=", $i ); - - switch ($op) - { - case "UPDIR": - // Remove last dir from $path - $position = strrpos( $path, "/" ); - $path = substr( $path, 0, $position ); - - // Get dir listing - $lines = ftp_rawlist ($conn, $path); - $max = find_max( $lines, $regexp, $regexp ); - break; - - case "DOWNDIR": - // Append found directory - $path .= "/$max"; - break; - - default: - echo "Error in specials array for $package\n"; - return -5; - break; - } - } - } - - $lines = ftp_rawlist ($conn, $path); - ftp_close( $conn ); -*/ } else // http(s) { @@ -303,7 +258,7 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" ); if ( $package == "psmisc" ) - return find_max( $lines, "/v\d/", "/^.*v([\d\.]+).tar.*$/" ); + return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" ); if ( $package == "grub" ) return find_max( $lines, "/grub/", "/^.*grub-([\d\.]+).tar.xz.*$/" ); @@ -311,11 +266,14 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd"); if ( $package == "Jinja" ) return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" ); + if ( $package == "lz" ) + return find_max( $lines, "/name.:/", '/^.*LZ4 v([\d\.]+)".*$/' ); + if ( $package == "openssl" ) return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" ); if ( $package == "Python" ) - return find_max( $lines, "/Python 3/", "/^.*Python (3[\d\]*\d) .*$/" ); + return find_max( $lines, "/Python 3/", "/^.*Python (3[\d\.]*\d) .*$/" ); if ( $package == "vim" ) return find_max( $lines, "/v\d\./", "/^.*v([\d\.]+).*$/" ); @@ -335,7 +293,6 @@ function get_current() // Fetech from git and get wget-list $current = array(); - #$lfssvn = "svn://svn.linuxfromscratch.org/LFS/trunk"; $lfsgit = "https://git.linuxfromscratch.org/lfs.git"; $tmpdir = exec( "mktemp -d /tmp/lfscheck.XXXXXX" ); @@ -367,7 +324,6 @@ function get_current() $file = rtrim( $file ); $pkg_pattern = "/(\D*).*/"; - //$pattern = "/\D*(\d.*\d)\D*/"; $pattern = "/\D*(\d.*\d)\D*/"; if ( preg_match( "/e2fsprogs/", $file ) )