From 7b0628f037dcbf85cfb381d5e05dea39a2059d33 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 25 May 2022 22:50:03 +0100 Subject: fixed various broken dependencies --- auto/create_meta.sh | 11 +- repo/apps/firefox/allow-custom-rust-vendor.patch | 564 ++++++++++++++ repo/apps/firefox/avoid-redefinition.patch | 15 + repo/apps/firefox/disable-moz-stackwalk.patch | 18 + repo/apps/firefox/disable-neon-in-aom.patch | 39 + repo/apps/firefox/firefox-safe.desktop | 11 + repo/apps/firefox/firefox.desktop | 81 ++ repo/apps/firefox/firefox.xibuild | 138 ++++ .../apps/firefox/fix-fortify-system-wrappers.patch | 13 + repo/apps/firefox/fix-rust-target.patch | 31 + repo/apps/firefox/fix-webrtc-glibcisms.patch | 20 + repo/apps/firefox/mallinfo.patch | 20 + repo/apps/firefox/sandbox-fork.patch | 15 + repo/apps/firefox/sandbox-largefile.patch | 17 + repo/apps/firefox/sandbox-sched_setscheduler.patch | 16 + repo/apps/firefox/stab.h | 71 ++ repo/apps/vim/vim.xibuild | 2 +- repo/apps/xlinks/xlinks.xibuild | 2 +- repo/apps/xterm/xterm.xibuild | 2 +- repo/devel/gdb/gdb.xibuild | 2 +- repo/devel/llvm/clang.xibuild | 1 + ...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 + .../0007-do-not-install-libunwind-source.patch | 19 + .../rust/alpine-move-py-scripts-to-share.patch | 23 + repo/devel/rust/alpine-target.patch | 191 +++++ repo/devel/rust/cargo.xibuild | 8 + repo/devel/rust/check-rustc | 109 +++ repo/devel/rust/install-template-shebang.patch | 10 + repo/devel/rust/link-musl-dynamically.patch | 17 + repo/devel/rust/musl-fix-linux_musl_base.patch | 23 + repo/devel/rust/need-rpath.patch | 62 ++ repo/devel/rust/need-ssp_nonshared.patch | 13 + repo/devel/rust/rust.xibuild | 75 ++ repo/devel/rustc/files/check-rustc | 109 --- ...-Prefer-libgcc_eh-over-libunwind-for-musl.patch | 24 - .../0007-do-not-install-libunwind-source.patch | 19 - .../patches/alpine-move-py-scripts-to-share.patch | 23 - repo/devel/rustc/patches/alpine-target.patch | 191 ----- .../rustc/patches/install-template-shebang.patch | 10 - .../rustc/patches/link-musl-dynamically.patch | 17 - .../rustc/patches/musl-fix-linux_musl_base.patch | 23 - repo/devel/rustc/patches/need-rpath.patch | 62 -- repo/devel/rustc/patches/need-ssp_nonshared.patch | 13 - repo/devel/rustc/rustc.xibuild | 94 --- repo/devel/strace/strace.xibuild | 2 +- repo/devel/vala/vala.xibuild | 2 +- repo/linux/linux/linux-src.xibuild | 20 +- repo/linux/linux/linux.xibuild | 4 +- repo/media/alsa-lib/alsa-lib.xibuild | 2 +- ...de-Thumb-2-alternative-code-for-MAD_F_MLN.patch | 34 + repo/media/libmad/automake.patch | 11 + repo/media/libmad/length-check.patch | 817 +++++++++++++++++++++ repo/media/libmad/libmad-0.15.1b-cflags-O2.patch | 12 + repo/media/libmad/libmad-0.15.1b-cflags.patch | 146 ++++ repo/media/libmad/libmad.thumb.patch | 12 + repo/media/libmad/libmad.xibuild | 28 + repo/media/libmad/mad.pc | 11 + repo/media/libmad/md_size.patch | 58 ++ repo/media/librsvg/librsvg.xibuild | 40 + .../rsvg-h-dont-use-comments-in-comments.patch | 31 + repo/media/librsvg/target.patch | 26 + repo/media/pulseaudio/pulseaudio.xibuild | 4 +- repo/meta/all/all.xibuild | 2 +- repo/meta/repo-apps/repo-apps.xibuild | 2 +- repo/meta/repo-devel/repo-devel.xibuild | 2 +- repo/meta/repo-font/repo-font.xibuild | 2 +- repo/meta/repo-games/repo-games.xibuild | 5 + repo/meta/repo-linux/repo-linux.xibuild | 2 +- repo/meta/repo-media/repo-media.xibuild | 2 +- repo/meta/repo-python/repo-python.xibuild | 2 +- repo/meta/repo-system/repo-system.xibuild | 2 +- repo/meta/repo-util/repo-util.xibuild | 2 +- repo/meta/repo-x11/repo-x11.xibuild | 2 +- repo/meta/repo-xi/repo-xi.xibuild | 2 +- repo/meta/skip/skip.xibuild | 5 - repo/system/dbus/dbus.xibuild | 4 +- repo/system/elfutils/elfutils.xibuild | 14 +- repo/system/elfutils/error.h | 27 + repo/system/elfutils/files/error.h | 27 - repo/system/elfutils/fix-aarch64_fregs.patch | 14 + repo/system/elfutils/fix-uninitialized.patch | 17 + repo/system/elfutils/musl-asm-ptrace-h.patch | 10 + repo/system/elfutils/musl-macros.patch | 87 +++ repo/system/elfutils/musl-strndupa.patch | 18 + .../elfutils/patches/fix-aarch64_fregs.patch | 14 - .../elfutils/patches/fix-uninitialized.patch | 17 - .../elfutils/patches/musl-asm-ptrace-h.patch | 10 - repo/system/elfutils/patches/musl-macros.patch | 87 --- repo/system/elfutils/patches/musl-strndupa.patch | 18 - repo/system/glew/glew.xibuild | 6 +- repo/system/glu/glu.xibuild | 2 +- repo/system/imlib2/imlib2.xibuild | 2 +- repo/system/js78/disable-jslint.patch | 17 + .../fd6847c9416f9eebde636e21d794d25d1be8791d.patch | 37 + repo/system/js78/fix-musl-build.patch | 16 + repo/system/js78/fix-python3.10-compilation.patch | 312 ++++++++ repo/system/js78/fix-rust-target.patch | 15 + repo/system/js78/fix-rust-target.patch.1 | 15 + repo/system/js78/js78.xibuild | 18 +- repo/system/js78/patches/disable-jslint.patch | 17 - .../fd6847c9416f9eebde636e21d794d25d1be8791d.patch | 37 - repo/system/js78/patches/fix-musl-build.patch | 16 - .../js78/patches/fix-python3.10-compilation.patch | 312 -------- repo/system/js78/patches/fix-rust-target.patch | 15 - repo/system/libgudev/libgudev.xibuild | 2 +- repo/system/libptytty/libptytty.xibuild | 6 +- repo/system/mime-types/mime-types.xibuild | 19 + repo/system/pahole/pahole.xibuild | 2 +- repo/system/pcsc-lite/pcsc-lite.xibuild | 2 +- repo/system/polkit/CVE-2021-4034.patch | 79 ++ repo/system/polkit/files/polkit-1 | 9 - repo/system/polkit/make-innetgr-optional.patch | 239 ++++++ repo/system/polkit/patches/CVE-2021-4034.patch | 79 -- .../polkit/patches/make-innetgr-optional.patch | 239 ------ repo/system/polkit/polkit-1 | 9 + .../shared-mime-info/shared-mime-info.xibuild | 2 +- repo/system/syslinux/gcc-10.patch | 109 --- repo/util/usbutils/usbutils.xibuild | 2 +- repo/util/wget/wget.xibuild | 2 +- repo/x11/gtk2/gtk2.xibuild | 2 +- repo/x11/gtk3/gtk3.xibuild | 2 +- repo/x11/libva/libva.xibuild | 2 +- repo/x11/libwacom/libwacom.xibuild | 2 +- repo/x11/mesa/mesa.xibuild | 2 +- repo/x11/motif/motif.xibuild | 17 +- repo/x11/motif/update-automake.patch | 18 + repo/x11/picom/picom.xibuild | 5 +- repo/x11/xcursor-themes/xcursor-themes.xibuild | 2 +- repo/x11/xorg-server/xorg-server.xibuild | 2 +- repo/xi/geninitramfs/geninitramfs.xibuild | 12 - repo/xi/sysconfigs/sysconfigs.xibuild | 2 +- repo/xi/xib/xib.xibuild | 3 +- repo/xi/xibuild/xibuild.xibuild | 7 +- skip/rust-wasm.xibuild | 8 + skip/wasi-compiler-rt.xibuild | 45 -- skip/wasi-compiler-rt/wasi-compiler-rt.xibuild | 45 ++ skip/wasi-libc.xibuild | 21 - skip/wasi-libc/wasi-libc.xibuild | 21 + skip/wasi-libcxx.xibuild | 98 --- skip/wasi-libcxx/wasi-libcxx.xibuild | 96 +++ skip/wasi-sdk.xibuild | 13 - skip/wasi-sdk/wasi-sdk.xibuild | 13 + 142 files changed, 4101 insertions(+), 1878 deletions(-) create mode 100644 repo/apps/firefox/allow-custom-rust-vendor.patch create mode 100644 repo/apps/firefox/avoid-redefinition.patch create mode 100644 repo/apps/firefox/disable-moz-stackwalk.patch create mode 100644 repo/apps/firefox/disable-neon-in-aom.patch create mode 100644 repo/apps/firefox/firefox-safe.desktop create mode 100644 repo/apps/firefox/firefox.desktop create mode 100644 repo/apps/firefox/firefox.xibuild create mode 100644 repo/apps/firefox/fix-fortify-system-wrappers.patch create mode 100644 repo/apps/firefox/fix-rust-target.patch create mode 100644 repo/apps/firefox/fix-webrtc-glibcisms.patch create mode 100644 repo/apps/firefox/mallinfo.patch create mode 100644 repo/apps/firefox/sandbox-fork.patch create mode 100644 repo/apps/firefox/sandbox-largefile.patch create mode 100644 repo/apps/firefox/sandbox-sched_setscheduler.patch create mode 100644 repo/apps/firefox/stab.h create mode 100644 repo/devel/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch create mode 100644 repo/devel/rust/0007-do-not-install-libunwind-source.patch create mode 100644 repo/devel/rust/alpine-move-py-scripts-to-share.patch create mode 100644 repo/devel/rust/alpine-target.patch create mode 100644 repo/devel/rust/cargo.xibuild create mode 100644 repo/devel/rust/check-rustc create mode 100644 repo/devel/rust/install-template-shebang.patch create mode 100644 repo/devel/rust/link-musl-dynamically.patch create mode 100644 repo/devel/rust/musl-fix-linux_musl_base.patch create mode 100644 repo/devel/rust/need-rpath.patch create mode 100644 repo/devel/rust/need-ssp_nonshared.patch create mode 100644 repo/devel/rust/rust.xibuild delete mode 100644 repo/devel/rustc/files/check-rustc delete mode 100644 repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch delete mode 100644 repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch delete mode 100644 repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch delete mode 100644 repo/devel/rustc/patches/alpine-target.patch delete mode 100644 repo/devel/rustc/patches/install-template-shebang.patch delete mode 100644 repo/devel/rustc/patches/link-musl-dynamically.patch delete mode 100644 repo/devel/rustc/patches/musl-fix-linux_musl_base.patch delete mode 100644 repo/devel/rustc/patches/need-rpath.patch delete mode 100644 repo/devel/rustc/patches/need-ssp_nonshared.patch delete mode 100644 repo/devel/rustc/rustc.xibuild create mode 100644 repo/media/libmad/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch create mode 100644 repo/media/libmad/automake.patch create mode 100644 repo/media/libmad/length-check.patch create mode 100644 repo/media/libmad/libmad-0.15.1b-cflags-O2.patch create mode 100644 repo/media/libmad/libmad-0.15.1b-cflags.patch create mode 100644 repo/media/libmad/libmad.thumb.patch create mode 100644 repo/media/libmad/libmad.xibuild create mode 100644 repo/media/libmad/mad.pc create mode 100644 repo/media/libmad/md_size.patch create mode 100644 repo/media/librsvg/librsvg.xibuild create mode 100644 repo/media/librsvg/rsvg-h-dont-use-comments-in-comments.patch create mode 100644 repo/media/librsvg/target.patch create mode 100644 repo/meta/repo-games/repo-games.xibuild delete mode 100644 repo/meta/skip/skip.xibuild create mode 100644 repo/system/elfutils/error.h delete mode 100644 repo/system/elfutils/files/error.h create mode 100644 repo/system/elfutils/fix-aarch64_fregs.patch create mode 100644 repo/system/elfutils/fix-uninitialized.patch create mode 100644 repo/system/elfutils/musl-asm-ptrace-h.patch create mode 100644 repo/system/elfutils/musl-macros.patch create mode 100644 repo/system/elfutils/musl-strndupa.patch delete mode 100644 repo/system/elfutils/patches/fix-aarch64_fregs.patch delete mode 100644 repo/system/elfutils/patches/fix-uninitialized.patch delete mode 100644 repo/system/elfutils/patches/musl-asm-ptrace-h.patch delete mode 100644 repo/system/elfutils/patches/musl-macros.patch delete mode 100644 repo/system/elfutils/patches/musl-strndupa.patch create mode 100644 repo/system/js78/disable-jslint.patch create mode 100644 repo/system/js78/fd6847c9416f9eebde636e21d794d25d1be8791d.patch create mode 100644 repo/system/js78/fix-musl-build.patch create mode 100644 repo/system/js78/fix-python3.10-compilation.patch create mode 100644 repo/system/js78/fix-rust-target.patch create mode 100644 repo/system/js78/fix-rust-target.patch.1 delete mode 100644 repo/system/js78/patches/disable-jslint.patch delete mode 100644 repo/system/js78/patches/fd6847c9416f9eebde636e21d794d25d1be8791d.patch delete mode 100644 repo/system/js78/patches/fix-musl-build.patch delete mode 100644 repo/system/js78/patches/fix-python3.10-compilation.patch delete mode 100644 repo/system/js78/patches/fix-rust-target.patch create mode 100644 repo/system/mime-types/mime-types.xibuild create mode 100644 repo/system/polkit/CVE-2021-4034.patch delete mode 100644 repo/system/polkit/files/polkit-1 create mode 100644 repo/system/polkit/make-innetgr-optional.patch delete mode 100644 repo/system/polkit/patches/CVE-2021-4034.patch delete mode 100644 repo/system/polkit/patches/make-innetgr-optional.patch create mode 100644 repo/system/polkit/polkit-1 delete mode 100644 repo/system/syslinux/gcc-10.patch create mode 100644 repo/x11/motif/update-automake.patch delete mode 100644 repo/xi/geninitramfs/geninitramfs.xibuild create mode 100644 skip/rust-wasm.xibuild delete mode 100644 skip/wasi-compiler-rt.xibuild create mode 100644 skip/wasi-compiler-rt/wasi-compiler-rt.xibuild delete mode 100644 skip/wasi-libc.xibuild create mode 100644 skip/wasi-libc/wasi-libc.xibuild delete mode 100644 skip/wasi-libcxx.xibuild create mode 100644 skip/wasi-libcxx/wasi-libcxx.xibuild delete mode 100644 skip/wasi-sdk.xibuild create mode 100644 skip/wasi-sdk/wasi-sdk.xibuild diff --git a/auto/create_meta.sh b/auto/create_meta.sh index 80428a3..04c7e84 100755 --- a/auto/create_meta.sh +++ b/auto/create_meta.sh @@ -11,16 +11,16 @@ create() { printf "DEPS=\"" while read repo; do [ -d repo/$repo ] && [ ! "$repo" = "meta" ] && - for file in $(ls repo/$repo/*.xibuild); do - local name=$(basename -s ".xibuild" $file) - printf " $name" + for name in $(ls -d repo/$repo/*); do + printf " $(basename $name)" done done printf "\"\n" } -ls repo | create 'AlL tHe pacKageS!!' > repo/meta/all.xibuild +mkdir -p repo/meta/all/ +ls repo | create 'AlL tHe pacKageS!!' > repo/meta/all/all.xibuild skip="skip meta" @@ -29,7 +29,8 @@ for repo in $(ls repo); do if echo $skip | grep -q $repo; then echo "Skipping $repo" else - echo $repo | create "All the the packages available in $repo" > repo/meta/$pkg_name.xibuild + mkdir -p repo/meta/$pkg_name + echo $repo | create "All the the packages available in $repo" > repo/meta/$pkg_name/$pkg_name.xibuild echo "Generated $pkg_name.xibuild" fi done diff --git a/repo/apps/firefox/allow-custom-rust-vendor.patch b/repo/apps/firefox/allow-custom-rust-vendor.patch new file mode 100644 index 0000000..218650f --- /dev/null +++ b/repo/apps/firefox/allow-custom-rust-vendor.patch @@ -0,0 +1,564 @@ +From a5a3db2d32ff1d359aef5ec586b91164570c1685 Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Tue, 5 Nov 2019 09:56:15 -0800 +Subject: [PATCH 1/7] Support custom vendor strings. + +Add support for custom vendors, as in "x86_64-gentoo-linux-musl". + +Fixes #33. +--- + src/targets.rs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++- + src/triple.rs | 4 -- + 2 files changed, 106 insertions(+), 6 deletions(-) + +diff --git a/src/targets.rs b/src/targets.rs +index 6ae570e..90b2736 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs +@@ -1,6 +1,8 @@ + // This file defines all the identifier enums and target-aware logic. + + use crate::triple::{Endianness, PointerWidth, Triple}; ++use alloc::boxed::Box; ++use alloc::string::String; + use core::fmt; + use core::str::FromStr; + +@@ -292,7 +294,7 @@ impl Aarch64Architecture { + + /// The "vendor" field, which in practice is little more than an arbitrary + /// modifier. +-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] ++#[derive(Clone, Debug, PartialEq, Eq, Hash)] + #[allow(missing_docs)] + pub enum Vendor { + Unknown, +@@ -306,6 +308,15 @@ pub enum Vendor { + Sun, + Uwp, + Wrs, ++ ++ /// A custom vendor. "Custom" in this context means that the vendor is ++ /// not specifically recognized by upstream Autotools, LLVM, Rust, or other ++ /// relevant authorities on triple naming. It's useful for people building ++ /// and using locally patched toolchains. ++ /// ++ /// Outside of such patched environments, users of `target-lexicon` should ++ /// treat `Custom` the same as `Unknown` and ignore the string. ++ Custom(Box), + } + + /// The "operating system" field, which sometimes implies an environment, and +@@ -717,6 +728,7 @@ impl fmt::Display for Vendor { + Vendor::Sun => "sun", + Vendor::Uwp => "uwp", + Vendor::Wrs => "wrs", ++ Vendor::Custom(ref name) => name, + }; + f.write_str(s) + } +@@ -738,7 +750,46 @@ impl FromStr for Vendor { + "sun" => Vendor::Sun, + "uwp" => Vendor::Uwp, + "wrs" => Vendor::Wrs, +- _ => return Err(()), ++ custom => { ++ use alloc::borrow::ToOwned; ++ ++ // A custom vendor. Since triple syntax is so loosely defined, ++ // be as conservative as we can to avoid potential ambiguities. ++ // We err on the side of being too strict here, as we can ++ // always relax it if needed. ++ ++ // Don't allow empty string names. ++ if custom.is_empty() { ++ return Err(()); ++ } ++ ++ // Don't allow any other recognized name as a custom vendor, ++ // since vendors can be omitted in some contexts. ++ if Architecture::from_str(custom).is_ok() ++ || OperatingSystem::from_str(custom).is_ok() ++ || Environment::from_str(custom).is_ok() ++ || BinaryFormat::from_str(custom).is_ok() ++ { ++ return Err(()); ++ } ++ ++ // Require the first character to be an ascii lowercase. ++ if !custom.chars().nth(0).unwrap().is_ascii_lowercase() { ++ return Err(()); ++ } ++ ++ // Restrict the set of characters permitted in a custom vendor. ++ if custom ++ .find(|c: char| { ++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') ++ }) ++ .is_some() ++ { ++ return Err(()); ++ } ++ ++ Vendor::Custom(Box::new(custom.to_owned())) ++ } + }) + } + } +@@ -1120,4 +1171,57 @@ mod tests { + assert_eq!(t.environment, Environment::Eabihf); + assert_eq!(t.binary_format, BinaryFormat::Elf); + } ++ ++ #[test] ++ fn custom_vendors() { ++ assert!(Triple::from_str("x86_64--linux").is_err()); ++ assert!(Triple::from_str("x86_64-42-linux").is_err()); ++ assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err()); ++ assert!(Triple::from_str("x86_64-^-linux").is_err()); ++ assert!(Triple::from_str("x86_64- -linux").is_err()); ++ assert!(Triple::from_str("x86_64-CustomVendor-linux").is_err()); ++ assert!(Triple::from_str("x86_64-linux-linux").is_err()); ++ assert!(Triple::from_str("x86_64-x86_64-linux").is_err()); ++ assert!(Triple::from_str("x86_64-elf-linux").is_err()); ++ assert!(Triple::from_str("x86_64-gnu-linux").is_err()); ++ assert!(Triple::from_str("x86_64-linux-customvendor").is_err()); ++ assert!(Triple::from_str("customvendor").is_err()); ++ assert!(Triple::from_str("customvendor-x86_64").is_err()); ++ assert!(Triple::from_str("x86_64-").is_err()); ++ assert!(Triple::from_str("x86_64--").is_err()); ++ ++ let t = Triple::from_str("x86_64-customvendor-linux") ++ .expect("can't parse target with custom vendor"); ++ assert_eq!(t.architecture, Architecture::X86_64); ++ assert_eq!( ++ t.vendor, ++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) ++ ); ++ assert_eq!(t.operating_system, OperatingSystem::Linux); ++ assert_eq!(t.environment, Environment::Unknown); ++ assert_eq!(t.binary_format, BinaryFormat::Elf); ++ assert_eq!(t.to_string(), "x86_64-customvendor-linux"); ++ ++ let t = Triple::from_str("x86_64-customvendor") ++ .expect("can't parse target with custom vendor"); ++ assert_eq!(t.architecture, Architecture::X86_64); ++ assert_eq!( ++ t.vendor, ++ Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) ++ ); ++ assert_eq!(t.operating_system, OperatingSystem::Unknown); ++ assert_eq!(t.environment, Environment::Unknown); ++ assert_eq!(t.binary_format, BinaryFormat::Unknown); ++ ++ assert_eq!( ++ Triple::from_str("unknown-foo"), ++ Ok(Triple { ++ architecture: Architecture::Unknown, ++ vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())), ++ operating_system: OperatingSystem::Unknown, ++ environment: Environment::Unknown, ++ binary_format: BinaryFormat::Unknown, ++ }) ++ ); ++ } + } +diff --git a/src/triple.rs b/src/triple.rs +index 36dcd9a..1abda26 100644 +--- a/third_party/rust/target-lexicon.0.9.0/src/triple.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/triple.rs +@@ -322,10 +322,6 @@ mod tests { + Triple::from_str("foo"), + Err(ParseError::UnrecognizedArchitecture("foo".to_owned())) + ); +- assert_eq!( +- Triple::from_str("unknown-foo"), +- Err(ParseError::UnrecognizedVendor("foo".to_owned())) +- ); + assert_eq!( + Triple::from_str("unknown-unknown-foo"), + Err(ParseError::UnrecognizedOperatingSystem("foo".to_owned())) + +From 6f90d7274dce4e7f9bb120f6b36cf26881bde9a7 Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Tue, 5 Nov 2019 10:33:56 -0800 +Subject: [PATCH 2/7] Add more tests. + +--- + src/targets.rs | 30 ++++++++++++++++++++++++++++-- + 1 file changed, 28 insertions(+), 2 deletions(-) + +diff --git a/src/targets.rs b/src/targets.rs +index 90b2736..7d1f069 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs +@@ -1174,6 +1174,7 @@ mod tests { + + #[test] + fn custom_vendors() { ++ // Test various invalid cases. + assert!(Triple::from_str("x86_64--linux").is_err()); + assert!(Triple::from_str("x86_64-42-linux").is_err()); + assert!(Triple::from_str("x86_64-__customvendor__-linux").is_err()); +@@ -1190,6 +1191,31 @@ mod tests { + assert!(Triple::from_str("x86_64-").is_err()); + assert!(Triple::from_str("x86_64--").is_err()); + ++ // Test various Unicode things. ++ assert!( ++ Triple::from_str("x86_64-𝓬𝓾𝓼𝓽𝓸𝓶𝓿𝓮𝓷𝓭𝓸𝓻-linux").is_err(), ++ "unicode font hazard" ++ ); ++ assert!( ++ Triple::from_str("x86_64-ćúśtőḿvéńdőŕ-linux").is_err(), ++ "diacritical mark stripping hazard" ++ ); ++ assert!( ++ Triple::from_str("x86_64-customvendοr-linux").is_err(), ++ "homoglyph hazard" ++ ); ++ assert!(Triple::from_str("x86_64-customvendor-linux").is_ok()); ++ assert!( ++ Triple::from_str("x86_64-ffi-linux").is_err(), ++ "normalization hazard" ++ ); ++ assert!(Triple::from_str("x86_64-ffi-linux").is_ok()); ++ assert!( ++ Triple::from_str("x86_64-custom‍vendor-linux").is_err(), ++ "zero-width character hazard" ++ ); ++ ++ // Test some valid cases. + let t = Triple::from_str("x86_64-customvendor-linux") + .expect("can't parse target with custom vendor"); + assert_eq!(t.architecture, Architecture::X86_64); +@@ -1202,8 +1228,8 @@ mod tests { + assert_eq!(t.binary_format, BinaryFormat::Elf); + assert_eq!(t.to_string(), "x86_64-customvendor-linux"); + +- let t = Triple::from_str("x86_64-customvendor") +- .expect("can't parse target with custom vendor"); ++ let t = ++ Triple::from_str("x86_64-customvendor").expect("can't parse target with custom vendor"); + assert_eq!(t.architecture, Architecture::X86_64); + assert_eq!( + t.vendor, + +From c0e318b3c1be2d1965579f07dd563fb9cc0c4eb1 Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Tue, 5 Nov 2019 12:56:31 -0800 +Subject: [PATCH 3/7] Use `.chars().any(...)` instead of + `.find(...).is_some()`. + +--- + src/targets.rs | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/targets.rs b/src/targets.rs +index 7d1f069..1078dd3 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs ++++ b/third_party/rust/target-lexicon/src-0.9.0/targets.rs +@@ -779,12 +779,9 @@ impl FromStr for Vendor { + } + + // Restrict the set of characters permitted in a custom vendor. +- if custom +- .find(|c: char| { +- !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') +- }) +- .is_some() +- { ++ if custom.chars().any(|c: char| { ++ !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') ++ }) { + return Err(()); + } + + +From f319950528654c772193d9eb3bf40bc8df35fcae Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Thu, 7 Nov 2019 15:15:48 -0800 +Subject: [PATCH 4/7] Fix build.rs to generate the correct code to build + Vendors. + +--- + build.rs | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/build.rs b/build.rs +index a0ba3b7..446f9e7 100644 +--- a/third_party/rust/target-lexicon-0.9.0/build.rs ++++ b/third_party/rust/target-lexicon-0.9.0/build.rs +@@ -32,6 +32,7 @@ mod parse_error { + } + } + ++use self::targets::Vendor; + use self::triple::Triple; + + fn main() { +@@ -60,7 +61,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { + " architecture: Architecture::{:?},", + triple.architecture + )?; +- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?; ++ writeln!(out, " vendor: {},", vendor_display(&triple.vendor))?; + writeln!( + out, + " operating_system: OperatingSystem::{:?},", +@@ -90,7 +91,7 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { + writeln!(out, "impl Vendor {{")?; + writeln!(out, " /// Return the vendor for the current host.")?; + writeln!(out, " pub const fn host() -> Self {{")?; +- writeln!(out, " Vendor::{:?}", triple.vendor)?; ++ writeln!(out, " {}", vendor_display(&triple.vendor))?; + writeln!(out, " }}")?; + writeln!(out, "}}")?; + writeln!(out)?; +@@ -160,3 +161,12 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { + + Ok(()) + } ++ ++fn vendor_display(vendor: &Vendor) -> String { ++ match vendor { ++ Vendor::Custom(custom) => { ++ format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom) ++ } ++ known => format!("Vendor::{:?}", known), ++ } ++} + +From e558f6934535be3b8ccc9a99a33e861cb7431dfe Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Fri, 8 Nov 2019 12:10:34 -0800 +Subject: [PATCH 5/7] Fix custom vendors in `const fn` contexts. + +--- + build.rs | 15 +++++++++++---- + src/lib.rs | 4 ++-- + src/targets.rs | 51 ++++++++++++++++++++++++++++++++++++++++++-------- + 3 files changed, 56 insertions(+), 14 deletions(-) + +diff --git a/build.rs b/build.rs +index 446f9e7..e88206e 100644 +--- a/third_party/rust/target-lexicon-0.9.0/build.rs ++++ b/third_party/rust/target-lexicon-0.9.0/build.rs +@@ -53,6 +53,8 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { + writeln!(out, "use crate::Aarch64Architecture::*;")?; + writeln!(out, "#[allow(unused_imports)]")?; + writeln!(out, "use crate::ArmArchitecture::*;")?; ++ writeln!(out, "#[allow(unused_imports)]")?; ++ writeln!(out, "use crate::CustomVendor;")?; + writeln!(out)?; + writeln!(out, "/// The `Triple` of the current host.")?; + writeln!(out, "pub const HOST: Triple = Triple {{")?; +@@ -139,7 +141,11 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { + " architecture: Architecture::{:?},", + triple.architecture + )?; +- writeln!(out, " vendor: Vendor::{:?},", triple.vendor)?; ++ writeln!( ++ out, ++ " vendor: {},", ++ vendor_display(&triple.vendor) ++ )?; + writeln!( + out, + " operating_system: OperatingSystem::{:?},", +@@ -164,9 +170,10 @@ fn write_host_rs(mut out: File, triple: Triple) -> io::Result<()> { + + fn vendor_display(vendor: &Vendor) -> String { + match vendor { +- Vendor::Custom(custom) => { +- format!("Vendor::Custom(Box::new(String::from_str({:?})))", custom) +- } ++ Vendor::Custom(custom) => format!( ++ "Vendor::Custom(CustomVendor::Static({:?}))", ++ custom.as_str() ++ ), + known => format!("Vendor::{:?}", known), + } + } +diff --git a/src/lib.rs b/src/lib.rs +index 8d6da8d..70f6488 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/lib.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/lib.rs +@@ -28,7 +28,7 @@ mod triple; + pub use self::host::HOST; + pub use self::parse_error::ParseError; + pub use self::targets::{ +- Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, Environment, OperatingSystem, +- Vendor, ++ Aarch64Architecture, Architecture, ArmArchitecture, BinaryFormat, CustomVendor, Environment, ++ OperatingSystem, Vendor, + }; + pub use self::triple::{CallingConvention, Endianness, PointerWidth, Triple}; +diff --git a/src/targets.rs b/src/targets.rs +index 1078dd3..7152020 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs +@@ -4,6 +4,7 @@ use crate::triple::{Endianness, PointerWidth, Triple}; + use alloc::boxed::Box; + use alloc::string::String; + use core::fmt; ++use core::hash::{Hash, Hasher}; + use core::str::FromStr; + + /// The "architecture" field, which in some cases also specifies a specific +@@ -292,6 +293,39 @@ impl Aarch64Architecture { + } + } + ++/// A string for a `Vendor::Custom` that can either be used in `const` ++/// contexts or hold dynamic strings. ++#[derive(Clone, Debug, Eq)] ++pub enum CustomVendor { ++ /// An owned `String`. This supports the general case. ++ Owned(Box), ++ /// A static `str`, so that `CustomVendor` can be constructed in `const` ++ /// contexts. ++ Static(&'static str), ++} ++ ++impl CustomVendor { ++ /// Extracts a string slice. ++ pub fn as_str(&self) -> &str { ++ match self { ++ CustomVendor::Owned(s) => s, ++ CustomVendor::Static(s) => s, ++ } ++ } ++} ++ ++impl PartialEq for CustomVendor { ++ fn eq(&self, other: &Self) -> bool { ++ self.as_str() == other.as_str() ++ } ++} ++ ++impl Hash for CustomVendor { ++ fn hash(&self, state: &mut H) { ++ self.as_str().hash(state) ++ } ++} ++ + /// The "vendor" field, which in practice is little more than an arbitrary + /// modifier. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] +@@ -316,7 +350,7 @@ pub enum Vendor { + /// + /// Outside of such patched environments, users of `target-lexicon` should + /// treat `Custom` the same as `Unknown` and ignore the string. +- Custom(Box), ++ Custom(CustomVendor), + } + + /// The "operating system" field, which sometimes implies an environment, and +@@ -728,7 +762,7 @@ impl fmt::Display for Vendor { + Vendor::Sun => "sun", + Vendor::Uwp => "uwp", + Vendor::Wrs => "wrs", +- Vendor::Custom(ref name) => name, ++ Vendor::Custom(ref name) => name.as_str(), + }; + f.write_str(s) + } +@@ -779,13 +813,14 @@ impl FromStr for Vendor { + } + + // Restrict the set of characters permitted in a custom vendor. +- if custom.chars().any(|c: char| { ++ fn is_prohibited_char(c: char) -> bool { + !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') +- }) { ++ } ++ if custom.chars().any(is_prohibited_char) { + return Err(()); + } + +- Vendor::Custom(Box::new(custom.to_owned())) ++ Vendor::Custom(CustomVendor::Owned(Box::new(custom.to_owned()))) + } + }) + } +@@ -1218,7 +1253,7 @@ mod tests { + assert_eq!(t.architecture, Architecture::X86_64); + assert_eq!( + t.vendor, +- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) ++ Vendor::Custom(CustomVendor::Static("customvendor")) + ); + assert_eq!(t.operating_system, OperatingSystem::Linux); + assert_eq!(t.environment, Environment::Unknown); +@@ -1230,7 +1265,7 @@ mod tests { + assert_eq!(t.architecture, Architecture::X86_64); + assert_eq!( + t.vendor, +- Vendor::Custom(Box::new(String::from_str("customvendor").unwrap())) ++ Vendor::Custom(CustomVendor::Static("customvendor")) + ); + assert_eq!(t.operating_system, OperatingSystem::Unknown); + assert_eq!(t.environment, Environment::Unknown); +@@ -1240,7 +1275,7 @@ mod tests { + Triple::from_str("unknown-foo"), + Ok(Triple { + architecture: Architecture::Unknown, +- vendor: Vendor::Custom(Box::new(String::from_str("foo").unwrap())), ++ vendor: Vendor::Custom(CustomVendor::Static("foo")), + operating_system: OperatingSystem::Unknown, + environment: Environment::Unknown, + binary_format: BinaryFormat::Unknown, + +From bc4b444133b8a5e56602f7c77c10ef3f1e7a7c78 Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Mon, 18 Nov 2019 13:45:58 -0800 +Subject: [PATCH 6/7] Add a testcase with a BOM too, just in case. + +--- + src/targets.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/targets.rs b/src/targets.rs +index 7152020..9a4d990 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs +@@ -1246,6 +1246,10 @@ mod tests { + Triple::from_str("x86_64-custom‍vendor-linux").is_err(), + "zero-width character hazard" + ); ++ assert!( ++ Triple::from_str("x86_64-customvendor-linux").is_err(), ++ "BOM hazard" ++ ); + + // Test some valid cases. + let t = Triple::from_str("x86_64-customvendor-linux") + +From 721fbbe1c9cfd3adc9aaf011c62d6a36078f4133 Mon Sep 17 00:00:00 2001 +From: Dan Gohman +Date: Mon, 18 Nov 2019 20:56:40 -0800 +Subject: [PATCH 7/7] Use an anonymous function instead of just a local + function. + +--- + src/targets.rs | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/targets.rs b/src/targets.rs +index 9a4d990..eb5a088 100644 +--- a/third_party/rust/target-lexicon-0.9.0/src/targets.rs ++++ b/third_party/rust/target-lexicon-0.9.0/src/targets.rs +@@ -813,10 +813,9 @@ impl FromStr for Vendor { + } + + // Restrict the set of characters permitted in a custom vendor. +- fn is_prohibited_char(c: char) -> bool { ++ if custom.chars().any(|c: char| { + !(c.is_ascii_lowercase() || c.is_ascii_digit() || c == '_' || c == '.') +- } +- if custom.chars().any(is_prohibited_char) { ++ }) { + return Err(()); + } + diff --git a/repo/apps/firefox/avoid-redefinition.patch b/repo/apps/firefox/avoid-redefinition.patch new file mode 100644 index 0000000..af11c50 --- /dev/null +++ b/repo/apps/firefox/avoid-redefinition.patch @@ -0,0 +1,15 @@ +Author: Rasmus Thomsen +Reason: FF is mixing userspace net headers (net/if.h) and kernelspace ones +(linux/if.h), leading to redefinitions. We need to include net/if.h before +linux/if.h because linux/if.h has redifinition guards whereas net/if.h doesnt +Upstream: No +--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c.orig 2020-07-28 19:24:32.359751046 +0200 ++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c 2020-07-28 19:24:37.856343751 +0200 +@@ -31,6 +31,7 @@ + */ + + #if defined(LINUX) ++#include + #include "addrs-netlink.h" + #include + #include diff --git a/repo/apps/firefox/disable-moz-stackwalk.patch b/repo/apps/firefox/disable-moz-stackwalk.patch new file mode 100644 index 0000000..b6bc756 --- /dev/null +++ b/repo/apps/firefox/disable-moz-stackwalk.patch @@ -0,0 +1,18 @@ +diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp +index 7d62921..adcfa44 100644 +--- a/mozglue/misc/StackWalk.cpp ++++ b/mozglue/misc/StackWalk.cpp +@@ -33,13 +33,7 @@ using namespace mozilla; + # define MOZ_STACKWALK_SUPPORTS_MACOSX 0 + #endif + +-#if (defined(linux) && \ +- ((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \ +- defined(HAVE__UNWIND_BACKTRACE))) +-# define MOZ_STACKWALK_SUPPORTS_LINUX 1 +-#else + # define MOZ_STACKWALK_SUPPORTS_LINUX 0 +-#endif + + #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) + # define HAVE___LIBC_STACK_END 1 diff --git a/repo/apps/firefox/disable-neon-in-aom.patch b/repo/apps/firefox/disable-neon-in-aom.patch new file mode 100644 index 0000000..6df05a1 --- /dev/null +++ b/repo/apps/firefox/disable-neon-in-aom.patch @@ -0,0 +1,39 @@ +Firefox (75) and AOM itself fail to build with NEON enabled. As such +we should disable it for now. + +In file included from /home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/aom_dsp/arm/blend_a64_mask_neon.c:12: +/home/buildozer/aports/community/firefox/src/firefox-75.0/third_party/aom/av1/common/arm/mem_neon.h: In function 'load_u8_8x8': +/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/include/arm_neon.h:10303:1: error: inlining failed in call to always_inline 'vld1_u8': target specific option mismatch +10303 | vld1_u8 (const uint8_t * __a) + | ^~~~~~~ +--- a/media/libaom/moz.build 2020-04-09 08:20:14.608439591 +0200 ++++ b/media/libaom/moz.build 2020-04-09 08:20:21.801745246 +0200 +@@ -42,26 +42,6 @@ + ASFLAGS += [ '-I%s/media/libaom/config/linux/ia32/' % TOPSRCDIR ] + LOCAL_INCLUDES += [ '/media/libaom/config/linux/ia32/' ] + EXPORTS.aom += [ 'config/linux/ia32/config/aom_config.h' ] +-elif CONFIG['CPU_ARCH'] == 'arm': +- EXPORTS.aom += files['ARM_EXPORTS'] +- ASFLAGS += [ +- '-I%s/media/libaom/config/linux/arm/' % TOPSRCDIR, +- '-I%s/libaom' % OBJDIR, +- ] +- LOCAL_INCLUDES += [ '/media/libaom/config/linux/arm/' ] +- EXPORTS.aom += [ 'config/linux/arm/config/aom_config.h' ] +- +- SOURCES += files['ARM_SOURCES'] +- +- for f in SOURCES: +- if f.endswith('neon.c'): +- SOURCES[f].flags += CONFIG['VPX_ASFLAGS'] +- +- if CONFIG['OS_TARGET'] == 'Android': +- # For cpu-features.h +- LOCAL_INCLUDES += [ +- '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'], +- ] + else: + # Generic C-only configuration + EXPORTS.aom += files['GENERIC_EXPORTS'] + + diff --git a/repo/apps/firefox/firefox-safe.desktop b/repo/apps/firefox/firefox-safe.desktop new file mode 100644 index 0000000..1538fc6 --- /dev/null +++ b/repo/apps/firefox/firefox-safe.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Exec=firefox -safe-mode %u +Icon=firefox +Type=Application +Terminal=false +MultipleArgs=false +Name=Firefox - Safe Mode +GenericName=Web Browser - Safe Mode +StartupNotify=false +Categories=Network;WebBrowser; diff --git a/repo/apps/firefox/firefox.desktop b/repo/apps/firefox/firefox.desktop new file mode 100644 index 0000000..d048ce4 --- /dev/null +++ b/repo/apps/firefox/firefox.desktop @@ -0,0 +1,81 @@ +[Desktop Entry] +Exec=firefox %u +Icon=firefox +Type=Application +Terminal=false +Name=Firefox +Name[bn]=ফায়ারফক্স3 +Name[eo]=Fajrovulpo3 +Name[fi]=Firefox3 +Name[pa]=ਫਾਇਰਫੋਕਸ3 +Name[tg]=Рӯбоҳи оташин3 +GenericName=Web Browser +GenericName[af]=Web Blaaier +GenericName[ar]=متصفح ويب +GenericName[az]=Veb Səyyahı +GenericName[bg]=Браузър +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[br]=Furcher ar Gwiad +GenericName[bs]=WWW Preglednik +GenericName[ca]=Fullejador web +GenericName[cs]=WWW prohlížeč +GenericName[cy]=Porydd Gwe +GenericName[da]=Browser +GenericName[de]=Web-Browser +GenericName[el]=Περιηγητής Ιστού +GenericName[eo]=TTT-legilo +GenericName[es]=Navegador web +GenericName[et]=Veebilehitseja +GenericName[eu]=Web arakatzailea +GenericName[fa]=مرورگر وب +GenericName[fi]=WWW-selain +GenericName[fo]=Alnótsfar +GenericName[fr]=Navigateur web +GenericName[gl]=Navegador Web +GenericName[he]=דפדפן אינטרנט +GenericName[hi]=वेब ब्राउज़र +GenericName[hr]=Web preglednik +GenericName[hu]=Webböngésző +GenericName[is]=Vafri +GenericName[it]=Browser Web +GenericName[ja]=ウェブブラウザ +GenericName[ko]=웹 브라우저 +GenericName[lo]=ເວັບບຣາວເຊີ +GenericName[lt]=Žiniatinklio naršyklė +GenericName[lv]=Web Pārlūks +GenericName[mk]=Прелистувач на Интернет +GenericName[mn]=Веб-Хөтөч +GenericName[nb]=Nettleser +GenericName[nds]=Nettkieker +GenericName[nl]=Webbrowser +GenericName[nn]=Nettlesar +GenericName[nso]=Seinyakisi sa Web +GenericName[pa]=ਵੈਬ ਝਲਕਾਰਾ +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador Web +GenericName[ro]=Navigator de web +GenericName[ru]=Веб-браузер +GenericName[se]=Fierpmádatlogan +GenericName[sk]=Webový prehliadač +GenericName[sl]=Spletni brskalnik +GenericName[sr]=Веб претраживач +GenericName[sr@Latn]=Veb pretraživač +GenericName[ss]=Ibrawuza yeWeb +GenericName[sv]=Webbläsare +GenericName[ta]=வலை உலாவி +GenericName[tg]=Тафсиргари вэб +GenericName[th]=เว็บบราวเซอร์ +GenericName[tr]=Web Tarayıcı +GenericName[uk]=Навігатор Тенет +GenericName[uz]=Веб-браузер +GenericName[ven]=Buronza ya Webu +GenericName[vi]=Trình duyệt Web +GenericName[wa]=Betchteu waibe +GenericName[xh]=Umkhangeli zincwadi we Web +GenericName[zh_CN]=网页浏览器 +GenericName[zh_TW]=網頁瀏覽器 +GenericName[zu]=Umcingi we-Web +MimeType=text/html; +StartupNotify=true +Categories=Network;WebBrowser; diff --git a/repo/apps/firefox/firefox.xibuild b/repo/apps/firefox/firefox.xibuild new file mode 100644 index 0000000..a24eb51 --- /dev/null +++ b/repo/apps/firefox/firefox.xibuild @@ -0,0 +1,138 @@ +#!/bin/sh + +NAME="firefox" +DESC="Firefox web browser" + +MAKEDEPS="make rustc cbindgen wasi-sdk" +DEPS="alsa-lib atk cairo dbus ffmpeg fontconfig freetype2 gdk-pixbuf glib gtk3 icu libevent libffi libpng libvpx libwebp libx11 libxcb libxcomposite libxdamage libxext libxfixes libxrandr musl nspr nss pango pixman zlib " + +PKG_VER=99.0.1 +releasedate=2022-04-12 + +SOURCE="https://ftp.mozilla.org/pub/firefox/releases/$PKG_VER/source/firefox-$PKG_VER.source.tar.xz" +ADDITIONAL="stab.h sandbox-sched_setscheduler.patch sandbox-largefile.patch sandbox-fork.patch mallinfo.patch fix-webrtc-glibcisms.patch fix-rust-target.patch fix-fortify-system-wrappers.patch firefox-safe.desktop disable-neon-in-aom.patch disable-moz-stackwalk.patch avoid-redefinition.patch allow-custom-rust-vendor.patch " + +prepare () { + apply_patches + + cp stab.h toolkit/crashreporter/google-breakpad/src/ + + sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/audio_thread_priority/.cargo-checksum.json + sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/target-lexicon-0.9.0/.cargo-checksum.json +} + +build () { + mkdir -p objdir + cd objdir + export SHELL=/bin/sh + export BUILD_OFFICIAL=1 + export MOZILLA_OFFICIAL=1 + export USE_SHORT_LIBNAME=1 + export MACH_USE_SYSTEM_PYTHON=1 + export MOZBUILD_STATE_PATH=$BUILD_ROOT/mozbuild + # disable desktop notifications + export MOZ_NOSPAM=1 + # Find our triplet JSON + export RUST_TARGET="x86_64-unknown-linux-musl" + # Build with Clang, takes less RAM + export CC="clang" + export CXX="clang++" + + export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/firefox" + ../mach configure \ + --prefix=/usr \ + --disable-elf-hack \ + --enable-rust-simd \ + --enable-sandbox \ + \ + --disable-cargo-incremental \ + --disable-crashreporter \ + --disable-install-strip \ + --disable-jemalloc \ + --disable-minify \ + --disable-profiling \ + --disable-strip \ + --disable-tests \ + --disable-updater \ + \ + --enable-alsa \ + --enable-dbus \ + --enable-default-toolkit=cairo-gtk3-wayland \ + --enable-dom-streams \ + --enable-ffmpeg \ + --enable-hardening \ + --enable-linker=lld \ + --enable-necko-wifi \ + --enable-official-branding \ + --enable-optimize="$CFLAGS -O2" \ + --enable-pulseaudio \ + --enable-release \ + --enable-system-ffi \ + --enable-system-pixman \ + \ + --with-distribution-id=xilinux \ + --with-libclang-path=/usr/lib \ + --with-system-ffi \ + --with-system-icu \ + --with-system-jpeg \ + --with-system-libevent \ + --with-system-libvpx \ + --with-system-nspr \ + --with-system-nss \ + --with-system-pixman \ + --with-system-png \ + --with-system-webp \ + --with-system-zlib \ + --with-unsigned-addon-scopes=app,system \ + --without-wasm-sandboxed-libraries + ../mach build +} + +package () { + + DESTDIR="$PKG_DEST" MOZ_MAKE_FLAGS="$MAKEOPTS" ../mach install + + install -m755 -d "$PKG_DEST"/usr/share/applications + install -m755 -d "$PKG_DEST"/usr/share/pixmaps + + local _png + for _png in ../browser/branding/official/default*.png; do + local i=${_png%.png} + i=${i##*/default} + install -D -m644 "$_png" "$PKG_DEST"/usr/share/icons/hicolor/"$i"x"$i"/apps/firefox.png + done + + install -m644 ../browser/branding/official/default48.png \ + "$PKG_DEST"/usr/share/pixmaps/firefox.png + install -m644 ../firefox.desktop "$PKG_DEST"/usr/share/applications/org.mozilla.firefox.desktop + install -m644 ../firefox-safe.desktop "$PKG_DEST"/usr/share/applications/org.mozilla.firefox-safe.desktop + + # Add StartupWMClass=firefox on the .desktop files so Desktop Environments + # correctly associate the window with their icon, the correct fix is to have + # firefox sets its own AppID but this will work for the meantime + # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1607399 + echo "StartupWMClass=firefox" >> $PKG_DEST/usr/share/applications/org.mozilla.firefox.desktop + echo "StartupWMClass=firefox" >> $PKG_DEST/usr/share/applications/org.mozilla.firefox-safe.desktop + + # install our vendor prefs + install -d $PKG_DEST/usr/lib/firefox/browser/defaults/preferences + + cat >> $PKG_DEST/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js <<- EOF + // Use LANG environment variable to choose locale + pref("intl.locale.requested", ""); + + // Disable default browser checking. + pref("browser.shell.checkDefaultBrowser", false); + + // Don't disable our bundled extensions in the application directory + pref("extensions.autoDisableScopes", 11); + pref("extensions.shownSelectionUI", true); + EOF + + # Generate appdata file + mkdir "$PKG_DEST"/usr/share/metainfo/ + export VERSION="$PKG_VER" + export DATE="$releasedate" + envsubst < "$builddir"/taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in > "$PKG_DEST"/usr/share/metainfo/org.mozilla.firefox.appdata.xml + +} diff --git a/repo/apps/firefox/fix-fortify-system-wrappers.patch b/repo/apps/firefox/fix-fortify-system-wrappers.patch new file mode 100644 index 0000000..17cf7e3 --- /dev/null +++ b/repo/apps/firefox/fix-fortify-system-wrappers.patch @@ -0,0 +1,13 @@ +The wrapper features.h gets pulled in by system headers causing thigns to +break. We work around it by simply not wrap features.h + +--- ./config/system-headers.mozbuild.orig ++++ ./config/system-headers.mozbuild +@@ -229,7 +229,6 @@ + 'execinfo.h', + 'extras.h', + 'fcntl.h', +- 'features.h', + 'fenv.h', + 'ffi.h', + 'fibdef.h', diff --git a/repo/apps/firefox/fix-rust-target.patch b/repo/apps/firefox/fix-rust-target.patch new file mode 100644 index 0000000..9342063 --- /dev/null +++ b/repo/apps/firefox/fix-rust-target.patch @@ -0,0 +1,31 @@ +Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's +weird custom build system... + +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -225,7 +225,9 @@ + data.setdefault(key, []).append(namespace(rust_target=t, target=info)) + return data + +- ++@imports('os') ++@imports(_from='mozbuild.util', _import='ensure_unicode') ++@imports(_from='mozbuild.util', _import='system_encoding') + def detect_rustc_target( + host_or_target, compiler_info, arm_target, rust_supported_targets + ): +@@ -340,13 +342,13 @@ + + return None + +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ['RUST_TARGET'] + + if rustc_target is None: + die("Don't know how to translate {} for rustc".format(host_or_target.alias)) + +- return rustc_target ++ return ensure_unicode(rustc_target, system_encoding) + + + @imports('os') diff --git a/repo/apps/firefox/fix-webrtc-glibcisms.patch b/repo/apps/firefox/fix-webrtc-glibcisms.patch new file mode 100644 index 0000000..4f9043b --- /dev/null +++ b/repo/apps/firefox/fix-webrtc-glibcisms.patch @@ -0,0 +1,20 @@ +--- a/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc ++++ b/third_party/libwebrtc/system_wrappers/source/cpu_features_linux.cc +@@ -18,7 +18,7 @@ + #define WEBRTC_GLIBC_PREREQ(a, b) 0 + #endif + +-#if WEBRTC_GLIBC_PREREQ(2, 16) ++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16) + #include + #else + #include +@@ -40,7 +40,7 @@ + int architecture = 0; + uint64_t hwcap = 0; + const char* platform = NULL; +-#if WEBRTC_GLIBC_PREREQ(2, 16) ++#if !__GLIBC__ || WEBRTC_GLIBC_PREREQ(2, 16) + hwcap = getauxval(AT_HWCAP); + platform = (const char*)getauxval(AT_PLATFORM); + #else diff --git a/repo/apps/firefox/mallinfo.patch b/repo/apps/firefox/mallinfo.patch new file mode 100644 index 0000000..7916a20 --- /dev/null +++ b/repo/apps/firefox/mallinfo.patch @@ -0,0 +1,20 @@ +diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp +index 865e1b5430..9a00dafecb 100644 +--- a/xpcom/base/nsMemoryReporterManager.cpp ++++ b/xpcom/base/nsMemoryReporterManager.cpp +@@ -124,6 +124,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) { + return GetProcSelfSmapsPrivate(aN); + } + ++#ifdef __GLIBC__ + # ifdef HAVE_MALLINFO + # define HAVE_SYSTEM_HEAP_REPORTER 1 + static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) { +@@ -143,6 +144,7 @@ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) { + return NS_OK; + } + # endif ++#endif + + #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__OpenBSD__) || defined(__FreeBSD_kernel__) diff --git a/repo/apps/firefox/sandbox-fork.patch b/repo/apps/firefox/sandbox-fork.patch new file mode 100644 index 0000000..c7222ab --- /dev/null +++ b/repo/apps/firefox/sandbox-fork.patch @@ -0,0 +1,15 @@ +make SYS_fork non-fatal, musl uses it for fork(2) + +--- a/security/sandbox/linux/SandboxFilter.cpp ++++ b/security/sandbox/linux/SandboxFilter.cpp +@@ -1253,6 +1253,10 @@ + // usually do something reasonable on error. + case __NR_clone: + return ClonePolicy(Error(EPERM)); ++#ifdef __NR_fork ++ case __NR_fork: ++ return Error(ENOSYS); ++#endif + + # ifdef __NR_fadvise64 + case __NR_fadvise64: diff --git a/repo/apps/firefox/sandbox-largefile.patch b/repo/apps/firefox/sandbox-largefile.patch new file mode 100644 index 0000000..f1cf28b --- /dev/null +++ b/repo/apps/firefox/sandbox-largefile.patch @@ -0,0 +1,17 @@ +--- a/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100 ++++ b/security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100 +@@ -68,7 +68,13 @@ + + // The headers define O_LARGEFILE as 0 on x86_64, but we need the + // actual value because it shows up in file flags. +-#define O_LARGEFILE_REAL 00100000 ++#if defined(__x86_64__) || defined(__i386__) || defined(__mips__) ++#define O_LARGEFILE_REAL 0100000 ++#elif defined(__powerpc__) ++#define O_LARGEFILE_REAL 0200000 ++#else ++#define O_LARGEFILE_REAL O_LARGEFILE ++#endif + + // Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751. + #define FMODE_NONOTIFY 0x4000000 diff --git a/repo/apps/firefox/sandbox-sched_setscheduler.patch b/repo/apps/firefox/sandbox-sched_setscheduler.patch new file mode 100644 index 0000000..3163c9e --- /dev/null +++ b/repo/apps/firefox/sandbox-sched_setscheduler.patch @@ -0,0 +1,16 @@ +upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849 +--- a/security/sandbox/linux/SandboxFilter.cpp ++++ b/security/sandbox/linux/SandboxFilter.cpp +@@ -1694,10 +1694,10 @@ + return Allow(); + case __NR_sched_get_priority_min: + case __NR_sched_get_priority_max: ++ case __NR_sched_setscheduler: + return Allow(); + case __NR_sched_getparam: +- case __NR_sched_getscheduler: +- case __NR_sched_setscheduler: { ++ case __NR_sched_getscheduler: { + Arg pid(0); + return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr)); + } diff --git a/repo/apps/firefox/stab.h b/repo/apps/firefox/stab.h new file mode 100644 index 0000000..6f70af3 --- /dev/null +++ b/repo/apps/firefox/stab.h @@ -0,0 +1,71 @@ +/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ +/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */ + +/*- + * Copyright (c) 1991 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. + * + * @(#)stab.h 5.2 (Berkeley) 4/4/91 + */ + +#ifndef _STAB_H_ +#define _STAB_H_ + +/* + * The following are symbols used by various debuggers and by the Pascal + * compiler. Each of them must have one (or more) of the bits defined by + * the N_STAB mask set. + */ + +#define N_GSYM 0x20 /* global symbol */ +#define N_FNAME 0x22 /* F77 function name */ +#define N_FUN 0x24 /* procedure name */ +#define N_STSYM 0x26 /* data segment variable */ +#define N_LCSYM 0x28 /* bss segment variable */ +#define N_MAIN 0x2a /* main function name */ +#define N_PC 0x30 /* global Pascal symbol */ +#define N_RSYM 0x40 /* register variable */ +#define N_SLINE 0x44 /* text segment line number */ +#define N_DSLINE 0x46 /* data segment line number */ +#define N_BSLINE 0x48 /* bss segment line number */ +#define N_SSYM 0x60 /* structure/union element */ +#define N_SO 0x64 /* main source file name */ +#define N_LSYM 0x80 /* stack variable */ +#define N_BINCL 0x82 /* include file beginning */ +#define N_SOL 0x84 /* included source file name */ +#define N_PSYM 0xa0 /* parameter variable */ +#define N_EINCL 0xa2 /* include file end */ +#define N_ENTRY 0xa4 /* alternate entry point */ +#define N_LBRAC 0xc0 /* left bracket */ +#define N_EXCL 0xc2 /* deleted include file */ +#define N_RBRAC 0xe0 /* right bracket */ +#define N_BCOMM 0xe2 /* begin common */ +#define N_ECOMM 0xe4 /* end common */ +#define N_ECOML 0xe8 /* end common (local name) */ +#define N_LENG 0xfe /* length of preceding entry */ + +#endif /* !_STAB_H_ */ diff --git a/repo/apps/vim/vim.xibuild b/repo/apps/vim/vim.xibuild index d396eb2..8f7adf4 100644 --- a/repo/apps/vim/vim.xibuild +++ b/repo/apps/vim/vim.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make " -DEPS="gpm acl musl libgcrypt pcre2 zlib" +DEPS="acl musl libgcrypt pcre2 zlib" PKG_VER=8.2.4656 SOURCE=https://github.com/vim/vim/archive/refs/tags/v$PKG_VER.tar.gz diff --git a/repo/apps/xlinks/xlinks.xibuild b/repo/apps/xlinks/xlinks.xibuild index 992c6a3..13ff3f7 100644 --- a/repo/apps/xlinks/xlinks.xibuild +++ b/repo/apps/xlinks/xlinks.xibuild @@ -4,7 +4,7 @@ NAME="xlinks" DESC="Web browser running in both graphics and text mode" MAKEDEPS="make " -DEPS="bzip2 openssl libevent musl zlib zstd libx11 tiff libpng librsvg" +DEPS="bzip2 openssl libevent musl zlib zstd libx11 tiff libpng " PKG_VER=2.25 SOURCE="http://links.twibright.com/download/links-$PKG_VER.tar.bz2" diff --git a/repo/apps/xterm/xterm.xibuild b/repo/apps/xterm/xterm.xibuild index bceb89d..6350155 100644 --- a/repo/apps/xterm/xterm.xibuild +++ b/repo/apps/xterm/xterm.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make" -DEPS="libxft libxaw ncurses luit xbitmaps libutempter libxkbfile" +DEPS="libxft libxaw ncurses luit xbitmaps libxkbfile" DESC="X Terminal Emulator" diff --git a/repo/devel/gdb/gdb.xibuild b/repo/devel/gdb/gdb.xibuild index 31d9b7c..5b3b3a8 100644 --- a/repo/devel/gdb/gdb.xibuild +++ b/repo/devel/gdb/gdb.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make expat guile ncurses python xz texinfo" -DEPS="python-six doxygen gcc guile rustc python valgrind systemtap" +DEPS="python-six doxygen gcc guile rust python valgrind systemtap" PKG_VER=11.2 SOURCE=https://ftp.gnu.org/gnu/gdb/gdb-$PKG_VER.tar.xz diff --git a/repo/devel/llvm/clang.xibuild b/repo/devel/llvm/clang.xibuild index f00b98c..4a3f4f4 100644 --- a/repo/devel/llvm/clang.xibuild +++ b/repo/devel/llvm/clang.xibuild @@ -1,6 +1,7 @@ #!/bin/sh DESC="$DESC - C language frontend" +DEPS="libclang" package () { add_from_main usr/include/clang diff --git a/repo/devel/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/repo/devel/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch new file mode 100644 index 0000000..30cb66f --- /dev/null +++ b/repo/devel/rust/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch @@ -0,0 +1,24 @@ +Additions for build.rs by q66, necessary for our musl setup. + +From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001 +From: Samuel Holland +Date: Sat, 9 Sep 2017 00:14:16 -0500 +Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl + +--- + src/libunwind/lib.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs +index 9182e349b19..0377fbb58fc 100644 +--- a/library/unwind/src/lib.rs ++++ b/library/unwind/src/lib.rs +@@ -51,7 +51,7 @@ + #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] + extern "C" {} + } else { +- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] ++ #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))] + #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))] + extern "C" {} + } diff --git a/repo/devel/rust/0007-do-not-install-libunwind-source.patch b/repo/devel/rust/0007-do-not-install-libunwind-source.patch new file mode 100644 index 0000000..e8ff8b7 --- /dev/null +++ b/repo/devel/rust/0007-do-not-install-libunwind-source.patch @@ -0,0 +1,19 @@ +From: Dominic Meiser +Date: Tue, 22 Dec 2020 23:31:28 +0100 +Subject: [PATCH] Do not install libunwind source + +This was added in rustc 1.48, but is incompatible with the Alpine Linux package since it removes all bundled +dependencies prior to building. + +diff -Naur rustc-1.48.0-src.orig/src/bootstrap/dist.rs rustc-1.48.0-src/src/bootstrap/dist.rs +--- rustc-1.48.0-src.orig/src/bootstrap/dist.rs 2020-12-22 16:39:30.504249113 +0100 ++++ rustc-1.48.0-src/src/bootstrap/dist.rs 2020-12-22 16:42:08.663006830 +0100 +@@ -1016,7 +1016,7 @@ + copy_src_dirs( + builder, + &builder.src, +- &["library", "src/llvm-project/libunwind"], ++ &["library"], + &[ + // not needed and contains symlinks which rustup currently + // chokes on when unpacking. diff --git a/repo/devel/rust/alpine-move-py-scripts-to-share.patch b/repo/devel/rust/alpine-move-py-scripts-to-share.patch new file mode 100644 index 0000000..21be36f --- /dev/null +++ b/repo/devel/rust/alpine-move-py-scripts-to-share.patch @@ -0,0 +1,23 @@ +--- a/src/etc/rust-gdb ++++ b/src/etc/rust-gdb +@@ -12,7 +12,7 @@ + + # Find out where the pretty printer Python module is + RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" +-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" ++GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust/etc" + + # Run GDB with the additional arguments that load the pretty printers + # Set the environment variable `RUST_GDB` to overwrite the call to a + # Set the environment variable `RUST_GDB` to overwrite the call to a +--- a/src/etc/rust-lldb ++++ b/src/etc/rust-lldb +@@ -8,7 +8,7 @@ + + # Find out where to look for the pretty printer Python module + RUSTC_SYSROOT=$(rustc --print sysroot) +-RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" ++RUST_LLDB="$RUSTC_SYSROOT/share/rust/etc" + + lldb=lldb + if [ -f "$RUST_LLDB" ]; then diff --git a/repo/devel/rust/alpine-target.patch b/repo/devel/rust/alpine-target.patch new file mode 100644 index 0000000..2392cdd --- /dev/null +++ b/repo/devel/rust/alpine-target.patch @@ -0,0 +1,191 @@ +From: Shiz +Updated by Rasmus Thomsen on 28th of July 2019 +Updated again by Ariadne Conill on 31 October 2020 +Date: Thu, 20 Aug 2017 01:52:36 +0200 +Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200 +Subject: [PATCH] Add Alpine targets + +This adds `$arch-alpine-linux-musl` targets to Rust to encode our toolchain +and distribution-specific quirks instead of polluting the main musl target of +`$arch-unknown-linux-musl`. + +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/aarch64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::aarch64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "aarch64-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv6_alpine_linux_musleabihf.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::arm_unknown_linux_musleabihf::target(); ++ ++ base.llvm_target = "armv6-alpine-linux-musleabihf".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv7_alpine_linux_musleabihf.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::armv7_unknown_linux_musleabihf::target(); ++ ++ base.llvm_target = "armv7-alpine-linux-musleabihf".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/i586_alpine_linux_musl.rs +@@ -0,0 +1,14 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::i686_unknown_linux_musl::target(); ++ ++ base.options.cpu = "pentium4".to_string(); ++ base.llvm_target = "i586-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- rustc-1.48.0-src.orig/compiler/rustc_target/src/spec/mod.rs ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/mod.rs +@@ -490,6 +490,16 @@ + } + + supported_targets! { ++ ("i586-alpine-linux-musl", i586_alpine_linux_musl), ++ ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl), ++ ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl), ++ ("armv6-alpine-linux-musleabihf", armv6_alpine_linux_musleabihf), ++ ("armv7-alpine-linux-musleabihf", armv7_alpine_linux_musleabihf), ++ ("powerpc-alpine-linux-musl", powerpc_alpine_linux_musl), ++ ("powerpc64-alpine-linux-musl", powerpc64_alpine_linux_musl), ++ ("powerpc64le-alpine-linux-musl", powerpc64le_alpine_linux_musl), ++ ("s390x-alpine-linux-musl", s390x_alpine_linux_musl), ++ ("riscv64-alpine-linux-musl", riscv64_alpine_linux_musl), + ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), + ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), + ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::powerpc64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "powerpc64-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64le_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::powerpc64le_unknown_linux_musl::target(); ++ ++ base.llvm_target = "powerpc64le-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::powerpc_unknown_linux_musl::target(); ++ ++ base.llvm_target = "powerpc-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/s390x_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::s390x_unknown_linux_musl::target(); ++ ++ base.llvm_target = "s390x-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/x86_64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::x86_64_unknown_linux_musl::target(); ++ ++ base.llvm_target = "x86_64-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} +--- /dev/null ++++ rustc-1.52.1-src/compiler/rustc_target/src/spec/riscv64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::Target; ++ ++pub fn target() -> Target { ++ let mut base = super::riscv64gc_unknown_linux_musl::target(); ++ ++ base.llvm_target = "riscv64-alpine-linux-musl".to_string(); ++ base.options.vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ base ++} diff --git a/repo/devel/rust/cargo.xibuild b/repo/devel/rust/cargo.xibuild new file mode 100644 index 0000000..8a9f47e --- /dev/null +++ b/repo/devel/rust/cargo.xibuild @@ -0,0 +1,8 @@ +#!/bin/sh + +DEPS="rust" +DESC="Rust package manager" + +package () { + add_from_main "usr/bin/cargo" +} diff --git a/repo/devel/rust/check-rustc b/repo/devel/rust/check-rustc new file mode 100644 index 0000000..d4b85be --- /dev/null +++ b/repo/devel/rust/check-rustc @@ -0,0 +1,109 @@ +#!/bin/sh +# vim: set ts=4: +set -eu + +RUSTC="$1" +TMPDIR="$(pwd)/.tmp-${0##*/}-$RANDOM" +failed=0 + +unset RUST_BACKTRACE +unset RUSTC_CRT_STATIC + + +_rustc() { + printf '\n$ rustc %s\n' "$*" + "$RUSTC" "$@" +} + +die() { + printf '\033[1;31mERROR:\033[0m %s\n' "$1" >&2 # bold red + exit 1 +} + +fail() { + printf '\033[1;31mFAIL:\033[0m %s\n' "$1" >&2 # bold red + failed=$(( failed + 1 )) +} + +assert_dynamic() { + readelf -l "$1" | grep -Fqw INTERP \ + && readelf -d "$1" | grep -Fqw NEEDED || { + fail "$1 is not a dynamic executable!" + readelf -ld "$1" + } +} + +assert_ok() { + "$1" || fail "$1 exited with status $?" +} + +assert_panic() { + local status=0 + "$1" || status=$? && [ "$status" = 101 ] \ + || fail "$1 exited with status $status, but expected 101" +} + +assert_pie() { + readelf -d "$1" | grep -Fw FLAGS_1 | grep -Fqw PIE || { + fail "$1 is not a PIE executable!" + readelf -d "$1" + } +} + +assert_static() { + test -f "$1" \ + && ! readelf -l "$1" | grep -Fqw INTERP \ + && ! readelf -d "$1" | grep -Fqw NEEDED || { + fail "$1 is not a static executable!" + readelf -ld "$1" + } +} + + +#-------------------- M a i n -------------------- + +test -d "$TMPDIR" && die "$TMPDIR already exists!" +mkdir -p "$TMPDIR" +trap "rm -R '$TMPDIR'" EXIT + +cd "$TMPDIR" + +cat >> hello_world.rs <<-EOF + fn main() { + println!("Hello, world!"); + } +EOF + +_rustc hello_world.rs +assert_ok ./hello_world +assert_dynamic hello_world +assert_pie hello_world +rm -f hello_world + +_rustc -C target-feature=-crt-static hello_world.rs +assert_ok ./hello_world +assert_dynamic hello_world +assert_pie hello_world +rm -f hello_world + +_rustc -C target-feature=+crt-static hello_world.rs +assert_ok ./hello_world +assert_static hello_world +assert_pie hello_world +rm -f hello_world + + +cat >> panic.rs <<-EOF + fn main() { + panic!("This should panic"); + } +EOF + +_rustc -C target-feature=-crt-static panic.rs +assert_panic ./panic + +_rustc -C target-feature=+crt-static panic.rs +assert_panic ./panic + + +[ "$failed" -eq 0 ] || die "$failed assertion(s) has failed" diff --git a/repo/devel/rust/install-template-shebang.patch b/repo/devel/rust/install-template-shebang.patch new file mode 100644 index 0000000..e81b579 --- /dev/null +++ b/repo/devel/rust/install-template-shebang.patch @@ -0,0 +1,10 @@ +The script seems to be POSIX-sh (+ local) compatible. + +--- a/src/tools/rust-installer/install-template.sh ++++ b/src/tools/rust-installer/install-template.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # Copyright 2014 The Rust Project Developers. See the COPYRIGHT + # file at the top-level directory of this distribution and at + # http://rust-lang.org/COPYRIGHT. diff --git a/repo/devel/rust/link-musl-dynamically.patch b/repo/devel/rust/link-musl-dynamically.patch new file mode 100644 index 0000000..55d02a3 --- /dev/null +++ b/repo/devel/rust/link-musl-dynamically.patch @@ -0,0 +1,17 @@ +--- rustc-1.58.0-src.orig/vendor/libc/src/unix/mod.rs ++++ rustc-1.58.0-src/vendor/libc/src/unix/mod.rs +@@ -329,11 +329,11 @@ + #[link(name = "c", cfg(not(target_feature = "crt-static")))] + extern {} + } else if #[cfg(target_env = "musl")] { ++ #[link(name = "c")] ++ extern {} + #[cfg_attr(feature = "rustc-dep-of-std", +- link(name = "c", kind = "static", modifiers = "-bundle", ++ link(name = "gcc", kind = "static", modifiers = "-bundle", + cfg(target_feature = "crt-static")))] +- #[cfg_attr(feature = "rustc-dep-of-std", +- link(name = "c", cfg(not(target_feature = "crt-static"))))] + extern {} + } else if #[cfg(target_os = "emscripten")] { + #[link(name = "c")] diff --git a/repo/devel/rust/musl-fix-linux_musl_base.patch b/repo/devel/rust/musl-fix-linux_musl_base.patch new file mode 100644 index 0000000..1771ffe --- /dev/null +++ b/repo/devel/rust/musl-fix-linux_musl_base.patch @@ -0,0 +1,23 @@ +From: Jakub Jirutka +Date: Sat, 08 Aug 2016 15:06:00 +0200 +Subject: [PATCH] Fix linux_musl_base for native musl host + +See https://github.com/rust-lang/rust/pull/40113 + +--- a/compiler/rustc_target/src/spec/linux_musl_base.rs ++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs +@@ -5,12 +5,9 @@ + let mut base = super::linux_base::opts(); + + base.env = "musl".to_string(); +- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback(); +- base.post_link_objects_fallback = crt_objects::post_musl_fallback(); +- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl); + + // These targets statically link libc by default +- base.crt_static_default = true; ++ base.crt_static_default = false; + + base + } + diff --git a/repo/devel/rust/need-rpath.patch b/repo/devel/rust/need-rpath.patch new file mode 100644 index 0000000..5ab8377 --- /dev/null +++ b/repo/devel/rust/need-rpath.patch @@ -0,0 +1,62 @@ +From: Shiz +Date: Thu, 20 Aug 2017 01:48:22 +0200 +Subject: [PATCH] Add need_rpath target option to force RPATH generation + +This adds a `need_rpath` option to the target options in order to implicitly +have the equivalent of `-C rpath` specified by default for final products +(executables and dynamic libraries), so that RPATHs are always added. + +We have to skip this step in the bootstrap phase as it does its own manual +RPATH additions, but unfortunately there's no clean way to detect this. +As such, we have to resort to checking the `RUSTC_BOOTSTRAP` variable. +Hacky hacky! + +--- a/compiler/rustc_target/src/spec/mod.rs ++++ b/compiler/rustc_target/src/spec/mod.rs +@@ -379,6 +379,8 @@ + pub allows_weak_linkage: bool, + /// Whether the linker support rpaths or not. Defaults to false. + pub has_rpath: bool, ++ /// Whether to force rpath support on by default. Defaults to false. ++ pub need_rpath: bool, + /// Whether to disable linking to the default libraries, typically corresponds + /// to `-nodefaultlibs`. Defaults to true. + pub no_default_libraries: bool, +@@ -519,6 +519,7 @@ + linker_is_gnu: false, + allows_weak_linkage: true, + has_rpath: false, ++ need_rpath: false, + no_default_libraries: true, + position_independent_executables: false, + static_position_independent_executables: false, +@@ -776,6 +776,7 @@ + key!(linker_is_gnu, bool); + key!(allows_weak_linkage, bool); + key!(has_rpath, bool); ++ key!(need_rpath, bool); + key!(no_default_libraries, bool); + key!(position_independent_executables, bool); + key!(static_position_independent_executables, bool); +@@ -980,6 +980,7 @@ + target_option_val!(linker_is_gnu); + target_option_val!(allows_weak_linkage); + target_option_val!(has_rpath); ++ target_option_val!(need_rpath); + target_option_val!(no_default_libraries); + target_option_val!(position_independent_executables); + target_option_val!(static_position_independent_executables); +--- a/compiler/rustc_codegen_ssa/src/back/link.rs.orig ++++ b/compiler/rustc_codegen_ssa/src/back/link.rs +@@ -1675,7 +1675,10 @@ + // FIXME (#2397): At some point we want to rpath our guesses as to + // where extern libraries might live, based on the + // add_lib_search_paths +- if sess.opts.cg.rpath { ++ // XXX: hacky hacky ++ let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok(); ++ if !bootstrap && !sess.crt_static(None) && ++ (sess.opts.cg.rpath || sess.target.options.need_rpath) { + let libs = codegen_results + .crate_info + .used_crates diff --git a/repo/devel/rust/need-ssp_nonshared.patch b/repo/devel/rust/need-ssp_nonshared.patch new file mode 100644 index 0000000..f1adf20 --- /dev/null +++ b/repo/devel/rust/need-ssp_nonshared.patch @@ -0,0 +1,13 @@ +--- a/library/std/src/sys/unix/mod.rs.orig 2021-02-11 18:34:14.479832268 +0100 ++++ b/library/std/src/sys/unix/mod.rs 2021-02-11 18:38:28.078987749 +0100 +@@ -243,6 +243,9 @@ + #[link(name = "log")] + #[link(name = "gcc")] + extern "C" {} ++ } else if #[cfg(all(target_os = "linux", target_env = "musl"))] { ++ #[link(name = "ssp_nonshared")] ++ extern "C" {} + } else if #[cfg(target_os = "freebsd")] { + #[link(name = "execinfo")] + #[link(name = "pthread")] + diff --git a/repo/devel/rust/rust.xibuild b/repo/devel/rust/rust.xibuild new file mode 100644 index 0000000..a3075e3 --- /dev/null +++ b/repo/devel/rust/rust.xibuild @@ -0,0 +1,75 @@ +#!/bin/sh + +MAKEDEPS="cmake libclang clang llvm curl" +DEPS="libssh2 openssl" + +PKG_VER=1.59.0 +SOURCE=https://static.rust-lang.org/dist/rustc-$PKG_VER-src.tar.gz +DESC="Systems programming language focused on safety, speed and concurrency" + +ADDITIONAL=" + 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch + 0007-do-not-install-libunwind-source.patch + install-template-shebang.patch + link-musl-dynamically.patch + musl-fix-linux_musl_base.patch + need-rpath.patch + need-ssp_nonshared.patch +" + +prepare () { + apply_patches + sed -i /LD_LIBRARY_PATH/d src/bootstrap/bootstrap.py + sed -i 's/\("files":{\)[^}]*/\1/' vendor/libc/.cargo-checksum.json +} + +build () { + target=x86_64-unknown-linux-musl + build=x86_64-unknown-linux-musl + ./configure \ + --build="$build" \ + --host="$target" \ + --target="$target" \ + --prefix="/usr" \ + --release-channel="stable" \ + --llvm-root="/usr/lib/" \ + --disable-docs \ + --enable-extended \ + --tools="analysis,cargo,src,rustfmt" \ + --enable-llvm-link-shared \ + --enable-option-checking \ + --enable-locked-deps \ + --enable-vendor \ + --set="rust.musl-root=/usr" \ + --set="rust.codegen-units=1" \ + --set="rust.codegen-units-std=1" \ + --set="rust.parallel-compiler=true" \ + --set="target.$target.llvm-config=/usr/bin/llvm-config" \ + --set="target.$target.musl-root=/usr" \ + --set="target.$target.crt-static=false" \ + --set="target.$target.cc=gcc" \ + --set="target.$target.cxx=g++" \ + --set="target.$target.ar=ar" \ + --set="target.$target.linker=gcc" \ + --set="target.$build.musl-root=/usr" \ + --set="target.$build.crt-static=false" \ + --set="target.$build.cc=gcc" \ + --set="target.$build.cxx=g++" \ + --set="target.$build.ar=ar" \ + --set="target.$build.linker=gcc" \ + + sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml + sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs + + python ./x.py dist -v --jobs $JOBS + +} + +package () { + export LIBSSH2_SYS_USE_PKG_CONFIG=1 && + DESTDIR=${PWD}/install python3 ./x.py install && + unset LIBSSH2_SYS_USE_PKG_CONFIG + + chown -R root:root install && + cp -a install/* $PKG_DEST +} diff --git a/repo/devel/rustc/files/check-rustc b/repo/devel/rustc/files/check-rustc deleted file mode 100644 index d4b85be..0000000 --- a/repo/devel/rustc/files/check-rustc +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# vim: set ts=4: -set -eu - -RUSTC="$1" -TMPDIR="$(pwd)/.tmp-${0##*/}-$RANDOM" -failed=0 - -unset RUST_BACKTRACE -unset RUSTC_CRT_STATIC - - -_rustc() { - printf '\n$ rustc %s\n' "$*" - "$RUSTC" "$@" -} - -die() { - printf '\033[1;31mERROR:\033[0m %s\n' "$1" >&2 # bold red - exit 1 -} - -fail() { - printf '\033[1;31mFAIL:\033[0m %s\n' "$1" >&2 # bold red - failed=$(( failed + 1 )) -} - -assert_dynamic() { - readelf -l "$1" | grep -Fqw INTERP \ - && readelf -d "$1" | grep -Fqw NEEDED || { - fail "$1 is not a dynamic executable!" - readelf -ld "$1" - } -} - -assert_ok() { - "$1" || fail "$1 exited with status $?" -} - -assert_panic() { - local status=0 - "$1" || status=$? && [ "$status" = 101 ] \ - || fail "$1 exited with status $status, but expected 101" -} - -assert_pie() { - readelf -d "$1" | grep -Fw FLAGS_1 | grep -Fqw PIE || { - fail "$1 is not a PIE executable!" - readelf -d "$1" - } -} - -assert_static() { - test -f "$1" \ - && ! readelf -l "$1" | grep -Fqw INTERP \ - && ! readelf -d "$1" | grep -Fqw NEEDED || { - fail "$1 is not a static executable!" - readelf -ld "$1" - } -} - - -#-------------------- M a i n -------------------- - -test -d "$TMPDIR" && die "$TMPDIR already exists!" -mkdir -p "$TMPDIR" -trap "rm -R '$TMPDIR'" EXIT - -cd "$TMPDIR" - -cat >> hello_world.rs <<-EOF - fn main() { - println!("Hello, world!"); - } -EOF - -_rustc hello_world.rs -assert_ok ./hello_world -assert_dynamic hello_world -assert_pie hello_world -rm -f hello_world - -_rustc -C target-feature=-crt-static hello_world.rs -assert_ok ./hello_world -assert_dynamic hello_world -assert_pie hello_world -rm -f hello_world - -_rustc -C target-feature=+crt-static hello_world.rs -assert_ok ./hello_world -assert_static hello_world -assert_pie hello_world -rm -f hello_world - - -cat >> panic.rs <<-EOF - fn main() { - panic!("This should panic"); - } -EOF - -_rustc -C target-feature=-crt-static panic.rs -assert_panic ./panic - -_rustc -C target-feature=+crt-static panic.rs -assert_panic ./panic - - -[ "$failed" -eq 0 ] || die "$failed assertion(s) has failed" diff --git a/repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch deleted file mode 100644 index 30cb66f..0000000 --- a/repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch +++ /dev/null @@ -1,24 +0,0 @@ -Additions for build.rs by q66, necessary for our musl setup. - -From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Sat, 9 Sep 2017 00:14:16 -0500 -Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl - ---- - src/libunwind/lib.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs -index 9182e349b19..0377fbb58fc 100644 ---- a/library/unwind/src/lib.rs -+++ b/library/unwind/src/lib.rs -@@ -51,7 +51,7 @@ - #[link(name = "unwind", cfg(not(target_feature = "crt-static")))] - extern "C" {} - } else { -- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] -+ #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))] - #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))] - extern "C" {} - } diff --git a/repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch b/repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch deleted file mode 100644 index e8ff8b7..0000000 --- a/repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Dominic Meiser -Date: Tue, 22 Dec 2020 23:31:28 +0100 -Subject: [PATCH] Do not install libunwind source - -This was added in rustc 1.48, but is incompatible with the Alpine Linux package since it removes all bundled -dependencies prior to building. - -diff -Naur rustc-1.48.0-src.orig/src/bootstrap/dist.rs rustc-1.48.0-src/src/bootstrap/dist.rs ---- rustc-1.48.0-src.orig/src/bootstrap/dist.rs 2020-12-22 16:39:30.504249113 +0100 -+++ rustc-1.48.0-src/src/bootstrap/dist.rs 2020-12-22 16:42:08.663006830 +0100 -@@ -1016,7 +1016,7 @@ - copy_src_dirs( - builder, - &builder.src, -- &["library", "src/llvm-project/libunwind"], -+ &["library"], - &[ - // not needed and contains symlinks which rustup currently - // chokes on when unpacking. diff --git a/repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch b/repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch deleted file mode 100644 index 21be36f..0000000 --- a/repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/etc/rust-gdb -+++ b/src/etc/rust-gdb -@@ -12,7 +12,7 @@ - - # Find out where the pretty printer Python module is - RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" --GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" -+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust/etc" - - # Run GDB with the additional arguments that load the pretty printers - # Set the environment variable `RUST_GDB` to overwrite the call to a - # Set the environment variable `RUST_GDB` to overwrite the call to a ---- a/src/etc/rust-lldb -+++ b/src/etc/rust-lldb -@@ -8,7 +8,7 @@ - - # Find out where to look for the pretty printer Python module - RUSTC_SYSROOT=$(rustc --print sysroot) --RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" -+RUST_LLDB="$RUSTC_SYSROOT/share/rust/etc" - - lldb=lldb - if [ -f "$RUST_LLDB" ]; then diff --git a/repo/devel/rustc/patches/alpine-target.patch b/repo/devel/rustc/patches/alpine-target.patch deleted file mode 100644 index 2392cdd..0000000 --- a/repo/devel/rustc/patches/alpine-target.patch +++ /dev/null @@ -1,191 +0,0 @@ -From: Shiz -Updated by Rasmus Thomsen on 28th of July 2019 -Updated again by Ariadne Conill on 31 October 2020 -Date: Thu, 20 Aug 2017 01:52:36 +0200 -Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200 -Subject: [PATCH] Add Alpine targets - -This adds `$arch-alpine-linux-musl` targets to Rust to encode our toolchain -and distribution-specific quirks instead of polluting the main musl target of -`$arch-unknown-linux-musl`. - ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/aarch64_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::aarch64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "aarch64-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv6_alpine_linux_musleabihf.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::arm_unknown_linux_musleabihf::target(); -+ -+ base.llvm_target = "armv6-alpine-linux-musleabihf".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv7_alpine_linux_musleabihf.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::armv7_unknown_linux_musleabihf::target(); -+ -+ base.llvm_target = "armv7-alpine-linux-musleabihf".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/i586_alpine_linux_musl.rs -@@ -0,0 +1,14 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::i686_unknown_linux_musl::target(); -+ -+ base.options.cpu = "pentium4".to_string(); -+ base.llvm_target = "i586-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- rustc-1.48.0-src.orig/compiler/rustc_target/src/spec/mod.rs -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/mod.rs -@@ -490,6 +490,16 @@ - } - - supported_targets! { -+ ("i586-alpine-linux-musl", i586_alpine_linux_musl), -+ ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl), -+ ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl), -+ ("armv6-alpine-linux-musleabihf", armv6_alpine_linux_musleabihf), -+ ("armv7-alpine-linux-musleabihf", armv7_alpine_linux_musleabihf), -+ ("powerpc-alpine-linux-musl", powerpc_alpine_linux_musl), -+ ("powerpc64-alpine-linux-musl", powerpc64_alpine_linux_musl), -+ ("powerpc64le-alpine-linux-musl", powerpc64le_alpine_linux_musl), -+ ("s390x-alpine-linux-musl", s390x_alpine_linux_musl), -+ ("riscv64-alpine-linux-musl", riscv64_alpine_linux_musl), - ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), - ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), - ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::powerpc64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "powerpc64-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64le_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::powerpc64le_unknown_linux_musl::target(); -+ -+ base.llvm_target = "powerpc64le-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::powerpc_unknown_linux_musl::target(); -+ -+ base.llvm_target = "powerpc-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/s390x_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::s390x_unknown_linux_musl::target(); -+ -+ base.llvm_target = "s390x-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.48.0-src/compiler/rustc_target/src/spec/x86_64_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::x86_64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "x86_64-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} ---- /dev/null -+++ rustc-1.52.1-src/compiler/rustc_target/src/spec/riscv64_alpine_linux_musl.rs -@@ -0,0 +1,13 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::riscv64gc_unknown_linux_musl::target(); -+ -+ base.llvm_target = "riscv64-alpine-linux-musl".to_string(); -+ base.options.vendor = "alpine".to_string(); -+ base.options.crt_static_default = false; -+ base.options.static_position_independent_executables = true; -+ base.options.need_rpath = true; -+ -+ base -+} diff --git a/repo/devel/rustc/patches/install-template-shebang.patch b/repo/devel/rustc/patches/install-template-shebang.patch deleted file mode 100644 index e81b579..0000000 --- a/repo/devel/rustc/patches/install-template-shebang.patch +++ /dev/null @@ -1,10 +0,0 @@ -The script seems to be POSIX-sh (+ local) compatible. - ---- a/src/tools/rust-installer/install-template.sh -+++ b/src/tools/rust-installer/install-template.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # Copyright 2014 The Rust Project Developers. See the COPYRIGHT - # file at the top-level directory of this distribution and at - # http://rust-lang.org/COPYRIGHT. diff --git a/repo/devel/rustc/patches/link-musl-dynamically.patch b/repo/devel/rustc/patches/link-musl-dynamically.patch deleted file mode 100644 index 55d02a3..0000000 --- a/repo/devel/rustc/patches/link-musl-dynamically.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- rustc-1.58.0-src.orig/vendor/libc/src/unix/mod.rs -+++ rustc-1.58.0-src/vendor/libc/src/unix/mod.rs -@@ -329,11 +329,11 @@ - #[link(name = "c", cfg(not(target_feature = "crt-static")))] - extern {} - } else if #[cfg(target_env = "musl")] { -+ #[link(name = "c")] -+ extern {} - #[cfg_attr(feature = "rustc-dep-of-std", -- link(name = "c", kind = "static", modifiers = "-bundle", -+ link(name = "gcc", kind = "static", modifiers = "-bundle", - cfg(target_feature = "crt-static")))] -- #[cfg_attr(feature = "rustc-dep-of-std", -- link(name = "c", cfg(not(target_feature = "crt-static"))))] - extern {} - } else if #[cfg(target_os = "emscripten")] { - #[link(name = "c")] diff --git a/repo/devel/rustc/patches/musl-fix-linux_musl_base.patch b/repo/devel/rustc/patches/musl-fix-linux_musl_base.patch deleted file mode 100644 index 1771ffe..0000000 --- a/repo/devel/rustc/patches/musl-fix-linux_musl_base.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Jakub Jirutka -Date: Sat, 08 Aug 2016 15:06:00 +0200 -Subject: [PATCH] Fix linux_musl_base for native musl host - -See https://github.com/rust-lang/rust/pull/40113 - ---- a/compiler/rustc_target/src/spec/linux_musl_base.rs -+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs -@@ -5,12 +5,9 @@ - let mut base = super::linux_base::opts(); - - base.env = "musl".to_string(); -- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback(); -- base.post_link_objects_fallback = crt_objects::post_musl_fallback(); -- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl); - - // These targets statically link libc by default -- base.crt_static_default = true; -+ base.crt_static_default = false; - - base - } - diff --git a/repo/devel/rustc/patches/need-rpath.patch b/repo/devel/rustc/patches/need-rpath.patch deleted file mode 100644 index 5ab8377..0000000 --- a/repo/devel/rustc/patches/need-rpath.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Shiz -Date: Thu, 20 Aug 2017 01:48:22 +0200 -Subject: [PATCH] Add need_rpath target option to force RPATH generation - -This adds a `need_rpath` option to the target options in order to implicitly -have the equivalent of `-C rpath` specified by default for final products -(executables and dynamic libraries), so that RPATHs are always added. - -We have to skip this step in the bootstrap phase as it does its own manual -RPATH additions, but unfortunately there's no clean way to detect this. -As such, we have to resort to checking the `RUSTC_BOOTSTRAP` variable. -Hacky hacky! - ---- a/compiler/rustc_target/src/spec/mod.rs -+++ b/compiler/rustc_target/src/spec/mod.rs -@@ -379,6 +379,8 @@ - pub allows_weak_linkage: bool, - /// Whether the linker support rpaths or not. Defaults to false. - pub has_rpath: bool, -+ /// Whether to force rpath support on by default. Defaults to false. -+ pub need_rpath: bool, - /// Whether to disable linking to the default libraries, typically corresponds - /// to `-nodefaultlibs`. Defaults to true. - pub no_default_libraries: bool, -@@ -519,6 +519,7 @@ - linker_is_gnu: false, - allows_weak_linkage: true, - has_rpath: false, -+ need_rpath: false, - no_default_libraries: true, - position_independent_executables: false, - static_position_independent_executables: false, -@@ -776,6 +776,7 @@ - key!(linker_is_gnu, bool); - key!(allows_weak_linkage, bool); - key!(has_rpath, bool); -+ key!(need_rpath, bool); - key!(no_default_libraries, bool); - key!(position_independent_executables, bool); - key!(static_position_independent_executables, bool); -@@ -980,6 +980,7 @@ - target_option_val!(linker_is_gnu); - target_option_val!(allows_weak_linkage); - target_option_val!(has_rpath); -+ target_option_val!(need_rpath); - target_option_val!(no_default_libraries); - target_option_val!(position_independent_executables); - target_option_val!(static_position_independent_executables); ---- a/compiler/rustc_codegen_ssa/src/back/link.rs.orig -+++ b/compiler/rustc_codegen_ssa/src/back/link.rs -@@ -1675,7 +1675,10 @@ - // FIXME (#2397): At some point we want to rpath our guesses as to - // where extern libraries might live, based on the - // add_lib_search_paths -- if sess.opts.cg.rpath { -+ // XXX: hacky hacky -+ let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok(); -+ if !bootstrap && !sess.crt_static(None) && -+ (sess.opts.cg.rpath || sess.target.options.need_rpath) { - let libs = codegen_results - .crate_info - .used_crates diff --git a/repo/devel/rustc/patches/need-ssp_nonshared.patch b/repo/devel/rustc/patches/need-ssp_nonshared.patch deleted file mode 100644 index f1adf20..0000000 --- a/repo/devel/rustc/patches/need-ssp_nonshared.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/library/std/src/sys/unix/mod.rs.orig 2021-02-11 18:34:14.479832268 +0100 -+++ b/library/std/src/sys/unix/mod.rs 2021-02-11 18:38:28.078987749 +0100 -@@ -243,6 +243,9 @@ - #[link(name = "log")] - #[link(name = "gcc")] - extern "C" {} -+ } else if #[cfg(all(target_os = "linux", target_env = "musl"))] { -+ #[link(name = "ssp_nonshared")] -+ extern "C" {} - } else if #[cfg(target_os = "freebsd")] { - #[link(name = "execinfo")] - #[link(name = "pthread")] - diff --git a/repo/devel/rustc/rustc.xibuild b/repo/devel/rustc/rustc.xibuild deleted file mode 100644 index 090aa01..0000000 --- a/repo/devel/rustc/rustc.xibuild +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh - -MAKEDEPS="cmake clang llvm-ar" -DEPS="curl libssh2 openssl" - -PKG_VER=1.58.1 -SOURCE=https://static.rust-lang.org/dist/rustc-$PKG_VER-src.tar.gz -DESC="Systems programming language focused on safety, speed and concurrency" - -ADDITIONAL=" - patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch - patches/0007-do-not-install-libunwind-source.patch - patches/install-template-shebang.patch - patches/link-musl-dynamically.patch - patches/musl-fix-linux_musl_base.patch - patches/need-rpath.patch - patches/need-ssp_nonshared.patch -" - -prepare () { - apply_patches - sed -i /LD_LIBRARY_PATH/d src/bootstrap/bootstrap.py - sed -i 's/\("files":{\)[^}]*/\1/' vendor/libc/.cargo-checksum.json - -} - -build () { - target=x86_64-unknown-linux-musl - build=x86_64-unknown-linux-musl - ./configure \ - --build="$build" \ - --host="$target" \ - --target="$target" \ - --prefix="/usr" \ - --release-channel="stable" \ - --llvm-root="/usr/lib/" \ - --disable-docs \ - --enable-extended \ - --tools="analysis,cargo,src,rustfmt" \ - --enable-llvm-link-shared \ - --enable-option-checking \ - --enable-locked-deps \ - --enable-vendor \ - --set="rust.musl-root=/usr" \ - --set="rust.codegen-units=1" \ - --set="rust.codegen-units-std=1" \ - --set="rust.parallel-compiler=true" \ - --set="target.$target.llvm-config=/usr/bin/llvm-config" \ - --set="target.$target.musl-root=/usr" \ - --set="target.$target.crt-static=false" \ - --set="target.$target.cc=clang" \ - --set="target.$target.cxx=clang++" \ - --set="target.$target.ar=llvm-ar" \ - --set="target.$target.linker=clang" \ - --set="target.$build.musl-root=/usr" \ - --set="target.$build.crt-static=false" \ - --set="target.$build.cc=clang" \ - --set="target.$build.cxx=clang++" \ - --set="target.$build.ar=llvm-ar" \ - --set="target.$build.linker=clang" - - sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml - sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs - - python ./x.py dist -v --jobs $JOBS - -} - -package () { - export LIBSSH2_SYS_USE_PKG_CONFIG=1 && - DESTDIR=${PWD}/install python3 ./x.py install && - unset LIBSSH2_SYS_USE_PKG_CONFIG - - chown -R root:root install && - cp -a install/* $PKG_DEST - - mkdir -p $PKG_DEST/etc/profile.d/ - cat > $PKG_DEST/etc/profile.d/rustc.sh << "EOF" -# Begin /etc/profile.d/rustc.sh - -pathprepend /opt/rustc/bin PATH - -# End /etc/profile.d/rustc.sh -EOF - mkdir -p $PKG_DEST/etc/ld.so.conf.d -cat >> $PKG_DEST/etc/ld.so.conf.d/rustc.conf << EOF -# Begin rustc addition - -/opt/rustc/lib - -# End rustc addition -EOF - -} diff --git a/repo/devel/strace/strace.xibuild b/repo/devel/strace/strace.xibuild index e523146..2c925ba 100644 --- a/repo/devel/strace/strace.xibuild +++ b/repo/devel/strace/strace.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="autoconf automake binutils-dev elfutils-dev gawk linux-headers" +MAKEDEPS="autoconf automake binutils elfutils gawk linux-headers" DEPS="libelf musl" PKG_VER=5.17 diff --git a/repo/devel/vala/vala.xibuild b/repo/devel/vala/vala.xibuild index a457cca..c9736a3 100644 --- a/repo/devel/vala/vala.xibuild +++ b/repo/devel/vala/vala.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="libxslt bash flex bison gobject-introspection graphviz" -DEPS="glib graphviz musl pkgconf" +DEPS="glib graphviz musl pkg-config" PKG_VER=0.54.7 SOURCE=https://download.gnome.org/sources/vala/${PKG_VER%.*}/vala-$PKG_VER.tar.xz diff --git a/repo/linux/linux/linux-src.xibuild b/repo/linux/linux/linux-src.xibuild index 0f3a1f3..3ce3796 100644 --- a/repo/linux/linux/linux-src.xibuild +++ b/repo/linux/linux/linux-src.xibuild @@ -2,22 +2,12 @@ DESC="$DESC (source)" -prepare () { - rm linux-$PKG_VER.tar.xz - apply_patches - - make mrproper - make headers - - mv config .config - make olddefconfig - make -s kernelrelease > version -} - package () { - local kernver="$(cat version)" - srcdir=$PKG_DEST/usr/src/linux + srcdir=$PKG_DEST/usr/src/ mkdir -p $srcdir - cp -r ./ $srcdir/ + tar -xf linux-$PKG_VER.tar.xz -C $srcdir + make -C $srcdir/linux-$PKG_VER mrproper + cp config $srcdir/linux-$PKG_VER/.config + make -C $srcdir/linux-$PKG_VER olddefconfig } diff --git a/repo/linux/linux/linux.xibuild b/repo/linux/linux/linux.xibuild index 1d973d7..7bc15b4 100644 --- a/repo/linux/linux/linux.xibuild +++ b/repo/linux/linux/linux.xibuild @@ -12,7 +12,7 @@ ADDITIONAL=" prepare () { apply_patches - mv config .config + cp config .config export GREP="ggrep" @@ -22,7 +22,7 @@ prepare () { } build () { - make LLVM=1 all + make all } package () { diff --git a/repo/media/alsa-lib/alsa-lib.xibuild b/repo/media/alsa-lib/alsa-lib.xibuild index f6e9d1b..214edb3 100644 --- a/repo/media/alsa-lib/alsa-lib.xibuild +++ b/repo/media/alsa-lib/alsa-lib.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make" -DEPS="musl python alsa-topology-conf alsa-ucm-conf" +DEPS="musl python" DESC="An alternative implementation of Linux sound support" diff --git a/repo/media/libmad/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch b/repo/media/libmad/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch new file mode 100644 index 0000000..4641510 --- /dev/null +++ b/repo/media/libmad/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch @@ -0,0 +1,34 @@ +From: Dave Martin +Subject: "rsc" doesnt exist anymore in thumb2 + +diff --git a/fixed.h b/fixed.h +index 4b58abf..ba4bc26 100644 +--- a/fixed.h ++++ b/fixed.h +@@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) + : "+r" (lo), "+r" (hi) \ + : "%r" (x), "r" (y)) + ++#ifdef __thumb__ ++/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero ++ operand. If needed this code can also support Thumb-1 ++ (simply append "s" to the end of the second two instructions). */ ++# define MAD_F_MLN(hi, lo) \ ++ asm ("rsbs %0, %0, #0\n\t" \ ++ "sbc %1, %1, %1\n\t" \ ++ "sub %1, %1, %2" \ ++ : "+&r" (lo), "=&r" (hi) \ ++ : "r" (hi) \ ++ : "cc") ++#else /* ! __thumb__ */ + # define MAD_F_MLN(hi, lo) \ + asm ("rsbs %0, %2, #0\n\t" \ + "rsc %1, %3, #0" \ +- : "=r" (lo), "=r" (hi) \ ++ : "=&r" (lo), "=r" (hi) \ + : "0" (lo), "1" (hi) \ + : "cc") ++#endif /* __thumb__ */ + + # define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result; \ diff --git a/repo/media/libmad/automake.patch b/repo/media/libmad/automake.patch new file mode 100644 index 0000000..bfa1fb7 --- /dev/null +++ b/repo/media/libmad/automake.patch @@ -0,0 +1,11 @@ +--- ./configure.ac.orig 2012-12-31 20:07:03.710178583 +0000 ++++ ./configure.ac 2012-12-31 20:07:21.443663905 +0000 +@@ -28,7 +28,7 @@ + + AM_INIT_AUTOMAKE + +-AM_CONFIG_HEADER([config.h]) ++AC_CONFIG_HEADER([config.h]) + + dnl System type. + diff --git a/repo/media/libmad/length-check.patch b/repo/media/libmad/length-check.patch new file mode 100644 index 0000000..80e4846 --- /dev/null +++ b/repo/media/libmad/length-check.patch @@ -0,0 +1,817 @@ +From: Kurt Roeckx +Date: Sun, 28 Jan 2018 19:26:36 +0100 +Subject: Check the size before reading with mad_bit_read + +There are various cases where it attemps to read past the end of the buffer +using mad_bit_read(). Most functions didn't even know the size of the buffer +they were reading from. + +Index: libmad-0.15.1b/bit.c +=================================================================== +--- libmad-0.15.1b.orig/bit.c ++++ libmad-0.15.1b/bit.c +@@ -138,6 +138,9 @@ unsigned long mad_bit_read(struct mad_bi + { + register unsigned long value; + ++ if (len == 0) ++ return 0; ++ + if (bitptr->left == CHAR_BIT) + bitptr->cache = *bitptr->byte; + +Index: libmad-0.15.1b/frame.c +=================================================================== +--- libmad-0.15.1b.orig/frame.c ++++ libmad-0.15.1b/frame.c +@@ -120,11 +120,18 @@ static + int decode_header(struct mad_header *header, struct mad_stream *stream) + { + unsigned int index; ++ struct mad_bitptr bufend_ptr; + + header->flags = 0; + header->private_bits = 0; + ++ mad_bit_init(&bufend_ptr, stream->bufend); ++ + /* header() */ ++ if (mad_bit_length(&stream->ptr, &bufend_ptr) < 32) { ++ stream->error = MAD_ERROR_BUFLEN; ++ return -1; ++ } + + /* syncword */ + mad_bit_skip(&stream->ptr, 11); +@@ -225,8 +232,13 @@ int decode_header(struct mad_header *hea + /* error_check() */ + + /* crc_check */ +- if (header->flags & MAD_FLAG_PROTECTION) ++ if (header->flags & MAD_FLAG_PROTECTION) { ++ if (mad_bit_length(&stream->ptr, &bufend_ptr) < 16) { ++ stream->error = MAD_ERROR_BUFLEN; ++ return -1; ++ } + header->crc_target = mad_bit_read(&stream->ptr, 16); ++ } + + return 0; + } +@@ -338,7 +350,7 @@ int mad_header_decode(struct mad_header + stream->error = MAD_ERROR_BUFLEN; + goto fail; + } +- else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { ++ else if ((end - ptr >= 2) && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { + /* mark point where frame sync word was expected */ + stream->this_frame = ptr; + stream->next_frame = ptr + 1; +@@ -361,6 +373,8 @@ int mad_header_decode(struct mad_header + ptr = mad_bit_nextbyte(&stream->ptr); + } + ++ stream->error = MAD_ERROR_NONE; ++ + /* begin processing */ + stream->this_frame = ptr; + stream->next_frame = ptr + 1; /* possibly bogus sync word */ +@@ -413,7 +427,7 @@ int mad_header_decode(struct mad_header + /* check that a valid frame header follows this frame */ + + ptr = stream->next_frame; +- if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { ++ if ((end - ptr >= 2) && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { + ptr = stream->next_frame = stream->this_frame + 1; + goto sync; + } +Index: libmad-0.15.1b/layer12.c +=================================================================== +--- libmad-0.15.1b.orig/layer12.c ++++ libmad-0.15.1b/layer12.c +@@ -72,10 +72,18 @@ mad_fixed_t const linear_table[14] = { + * DESCRIPTION: decode one requantized Layer I sample from a bitstream + */ + static +-mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) ++mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb, struct mad_stream *stream) + { + mad_fixed_t sample; ++ struct mad_bitptr frameend_ptr; + ++ mad_bit_init(&frameend_ptr, stream->next_frame); ++ ++ if (mad_bit_length(ptr, &frameend_ptr) < nb) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return 0; ++ } + sample = mad_bit_read(ptr, nb); + + /* invert most significant bit, extend sign, then scale to fixed format */ +@@ -106,6 +114,10 @@ int mad_layer_I(struct mad_stream *strea + struct mad_header *header = &frame->header; + unsigned int nch, bound, ch, s, sb, nb; + unsigned char allocation[2][32], scalefactor[2][32]; ++ struct mad_bitptr bufend_ptr, frameend_ptr; ++ ++ mad_bit_init(&bufend_ptr, stream->bufend); ++ mad_bit_init(&frameend_ptr, stream->next_frame); + + nch = MAD_NCHANNELS(header); + +@@ -118,6 +130,11 @@ int mad_layer_I(struct mad_stream *strea + /* check CRC word */ + + if (header->flags & MAD_FLAG_PROTECTION) { ++ if (mad_bit_length(&stream->ptr, &bufend_ptr) ++ < 4 * (bound * nch + (32 - bound))) { ++ stream->error = MAD_ERROR_BADCRC; ++ return -1; ++ } + header->crc_check = + mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)), + header->crc_check); +@@ -133,6 +150,11 @@ int mad_layer_I(struct mad_stream *strea + + for (sb = 0; sb < bound; ++sb) { + for (ch = 0; ch < nch; ++ch) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 4) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + nb = mad_bit_read(&stream->ptr, 4); + + if (nb == 15) { +@@ -145,6 +167,11 @@ int mad_layer_I(struct mad_stream *strea + } + + for (sb = bound; sb < 32; ++sb) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 4) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + nb = mad_bit_read(&stream->ptr, 4); + + if (nb == 15) { +@@ -161,6 +188,11 @@ int mad_layer_I(struct mad_stream *strea + for (sb = 0; sb < 32; ++sb) { + for (ch = 0; ch < nch; ++ch) { + if (allocation[ch][sb]) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); + + # if defined(OPT_STRICT) +@@ -185,8 +217,10 @@ int mad_layer_I(struct mad_stream *strea + for (ch = 0; ch < nch; ++ch) { + nb = allocation[ch][sb]; + frame->sbsample[ch][s][sb] = nb ? +- mad_f_mul(I_sample(&stream->ptr, nb), ++ mad_f_mul(I_sample(&stream->ptr, nb, stream), + sf_table[scalefactor[ch][sb]]) : 0; ++ if (stream->error != 0) ++ return -1; + } + } + +@@ -194,7 +228,14 @@ int mad_layer_I(struct mad_stream *strea + if ((nb = allocation[0][sb])) { + mad_fixed_t sample; + +- sample = I_sample(&stream->ptr, nb); ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nb) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } ++ sample = I_sample(&stream->ptr, nb, stream); ++ if (stream->error != 0) ++ return -1; + + for (ch = 0; ch < nch; ++ch) { + frame->sbsample[ch][s][sb] = +@@ -280,13 +321,21 @@ struct quantclass { + static + void II_samples(struct mad_bitptr *ptr, + struct quantclass const *quantclass, +- mad_fixed_t output[3]) ++ mad_fixed_t output[3], struct mad_stream *stream) + { + unsigned int nb, s, sample[3]; ++ struct mad_bitptr frameend_ptr; ++ ++ mad_bit_init(&frameend_ptr, stream->next_frame); + + if ((nb = quantclass->group)) { + unsigned int c, nlevels; + ++ if (mad_bit_length(ptr, &frameend_ptr) < quantclass->bits) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return; ++ } + /* degrouping */ + c = mad_bit_read(ptr, quantclass->bits); + nlevels = quantclass->nlevels; +@@ -299,8 +348,14 @@ void II_samples(struct mad_bitptr *ptr, + else { + nb = quantclass->bits; + +- for (s = 0; s < 3; ++s) ++ for (s = 0; s < 3; ++s) { ++ if (mad_bit_length(ptr, &frameend_ptr) < nb) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return; ++ } + sample[s] = mad_bit_read(ptr, nb); ++ } + } + + for (s = 0; s < 3; ++s) { +@@ -336,6 +391,9 @@ int mad_layer_II(struct mad_stream *stre + unsigned char const *offsets; + unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3]; + mad_fixed_t samples[3]; ++ struct mad_bitptr frameend_ptr; ++ ++ mad_bit_init(&frameend_ptr, stream->next_frame); + + nch = MAD_NCHANNELS(header); + +@@ -402,13 +460,24 @@ int mad_layer_II(struct mad_stream *stre + for (sb = 0; sb < bound; ++sb) { + nbal = bitalloc_table[offsets[sb]].nbal; + +- for (ch = 0; ch < nch; ++ch) ++ for (ch = 0; ch < nch; ++ch) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nbal) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal); ++ } + } + + for (sb = bound; sb < sblimit; ++sb) { + nbal = bitalloc_table[offsets[sb]].nbal; + ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < nbal) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + allocation[0][sb] = + allocation[1][sb] = mad_bit_read(&stream->ptr, nbal); + } +@@ -417,8 +486,14 @@ int mad_layer_II(struct mad_stream *stre + + for (sb = 0; sb < sblimit; ++sb) { + for (ch = 0; ch < nch; ++ch) { +- if (allocation[ch][sb]) ++ if (allocation[ch][sb]) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 2) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); ++ } + } + } + +@@ -441,6 +516,11 @@ int mad_layer_II(struct mad_stream *stre + for (sb = 0; sb < sblimit; ++sb) { + for (ch = 0; ch < nch; ++ch) { + if (allocation[ch][sb]) { ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); + + switch (scfsi[ch][sb]) { +@@ -451,11 +531,21 @@ int mad_layer_II(struct mad_stream *stre + break; + + case 0: ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); + /* fall through */ + + case 1: + case 3: ++ if (mad_bit_length(&stream->ptr, &frameend_ptr) < 6) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); + } + +@@ -487,7 +577,9 @@ int mad_layer_II(struct mad_stream *stre + if ((index = allocation[ch][sb])) { + index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; + +- II_samples(&stream->ptr, &qc_table[index], samples); ++ II_samples(&stream->ptr, &qc_table[index], samples, stream); ++ if (stream->error != 0) ++ return -1; + + for (s = 0; s < 3; ++s) { + frame->sbsample[ch][3 * gr + s][sb] = +@@ -505,7 +597,9 @@ int mad_layer_II(struct mad_stream *stre + if ((index = allocation[0][sb])) { + index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; + +- II_samples(&stream->ptr, &qc_table[index], samples); ++ II_samples(&stream->ptr, &qc_table[index], samples, stream); ++ if (stream->error != 0) ++ return -1; + + for (ch = 0; ch < nch; ++ch) { + for (s = 0; s < 3; ++s) { +Index: libmad-0.15.1b/layer3.c +=================================================================== +--- libmad-0.15.1b.orig/layer3.c ++++ libmad-0.15.1b/layer3.c +@@ -598,7 +598,8 @@ enum mad_error III_sideinfo(struct mad_b + static + unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, + struct channel *channel, +- struct channel *gr1ch, int mode_extension) ++ struct channel *gr1ch, int mode_extension, ++ unsigned int bits_left, unsigned int *part2_length) + { + struct mad_bitptr start; + unsigned int scalefac_compress, index, slen[4], part, n, i; +@@ -644,8 +645,12 @@ unsigned int III_scalefactors_lsf(struct + + n = 0; + for (part = 0; part < 4; ++part) { +- for (i = 0; i < nsfb[part]; ++i) ++ for (i = 0; i < nsfb[part]; ++i) { ++ if (bits_left < slen[part]) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[n++] = mad_bit_read(ptr, slen[part]); ++ bits_left -= slen[part]; ++ } + } + + while (n < 39) +@@ -690,7 +695,10 @@ unsigned int III_scalefactors_lsf(struct + max = (1 << slen[part]) - 1; + + for (i = 0; i < nsfb[part]; ++i) { ++ if (bits_left < slen[part]) ++ return MAD_ERROR_BADSCFSI; + is_pos = mad_bit_read(ptr, slen[part]); ++ bits_left -= slen[part]; + + channel->scalefac[n] = is_pos; + gr1ch->scalefac[n++] = (is_pos == max); +@@ -703,7 +711,8 @@ unsigned int III_scalefactors_lsf(struct + } + } + +- return mad_bit_length(&start, ptr); ++ *part2_length = mad_bit_length(&start, ptr); ++ return MAD_ERROR_NONE; + } + + /* +@@ -712,7 +721,8 @@ unsigned int III_scalefactors_lsf(struct + */ + static + unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, +- struct channel const *gr0ch, unsigned int scfsi) ++ struct channel const *gr0ch, unsigned int scfsi, ++ unsigned int bits_left, unsigned int *part2_length) + { + struct mad_bitptr start; + unsigned int slen1, slen2, sfbi; +@@ -728,12 +738,20 @@ unsigned int III_scalefactors(struct mad + sfbi = 0; + + nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3; +- while (nsfb--) ++ while (nsfb--) { ++ if (bits_left < slen1) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1); ++ bits_left -= slen1; ++ } + + nsfb = 6 * 3; +- while (nsfb--) ++ while (nsfb--) { ++ if (bits_left < slen2) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2); ++ bits_left -= slen2; ++ } + + nsfb = 1 * 3; + while (nsfb--) +@@ -745,8 +763,12 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 0; sfbi < 6; ++sfbi) ++ for (sfbi = 0; sfbi < 6; ++sfbi) { ++ if (bits_left < slen1) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); ++ bits_left -= slen1; ++ } + } + + if (scfsi & 0x4) { +@@ -754,8 +776,12 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 6; sfbi < 11; ++sfbi) ++ for (sfbi = 6; sfbi < 11; ++sfbi) { ++ if (bits_left < slen1) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); ++ bits_left -= slen1; ++ } + } + + if (scfsi & 0x2) { +@@ -763,8 +789,12 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 11; sfbi < 16; ++sfbi) ++ for (sfbi = 11; sfbi < 16; ++sfbi) { ++ if (bits_left < slen2) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); ++ bits_left -= slen2; ++ } + } + + if (scfsi & 0x1) { +@@ -772,14 +802,19 @@ unsigned int III_scalefactors(struct mad + channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; + } + else { +- for (sfbi = 16; sfbi < 21; ++sfbi) ++ for (sfbi = 16; sfbi < 21; ++sfbi) { ++ if (bits_left < slen2) ++ return MAD_ERROR_BADSCFSI; + channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); ++ bits_left -= slen2; ++ } + } + + channel->scalefac[21] = 0; + } + +- return mad_bit_length(&start, ptr); ++ *part2_length = mad_bit_length(&start, ptr); ++ return MAD_ERROR_NONE; + } + + /* +@@ -933,19 +968,17 @@ static + enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576], + struct channel *channel, + unsigned char const *sfbwidth, +- unsigned int part2_length) ++ signed int part3_length) + { + signed int exponents[39], exp; + signed int const *expptr; + struct mad_bitptr peek; +- signed int bits_left, cachesz; ++ signed int bits_left, cachesz, fakebits; + register mad_fixed_t *xrptr; + mad_fixed_t const *sfbound; + register unsigned long bitcache; + +- bits_left = (signed) channel->part2_3_length - (signed) part2_length; +- if (bits_left < 0) +- return MAD_ERROR_BADPART3LEN; ++ bits_left = part3_length; + + III_exponents(channel, sfbwidth, exponents); + +@@ -956,8 +989,12 @@ enum mad_error III_huffdecode(struct mad + cachesz = mad_bit_bitsleft(&peek); + cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7; + ++ if (bits_left < cachesz) { ++ cachesz = bits_left; ++ } + bitcache = mad_bit_read(&peek, cachesz); + bits_left -= cachesz; ++ fakebits = 0; + + xrptr = &xr[0]; + +@@ -986,7 +1023,7 @@ enum mad_error III_huffdecode(struct mad + + big_values = channel->big_values; + +- while (big_values-- && cachesz + bits_left > 0) { ++ while (big_values-- && cachesz + bits_left - fakebits > 0) { + union huffpair const *pair; + unsigned int clumpsz, value; + register mad_fixed_t requantized; +@@ -1023,10 +1060,19 @@ enum mad_error III_huffdecode(struct mad + unsigned int bits; + + bits = ((32 - 1 - 21) + (21 - cachesz)) & ~7; ++ if (bits_left < bits) { ++ bits = bits_left; ++ } + bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); + cachesz += bits; + bits_left -= bits; + } ++ if (cachesz < 21) { ++ unsigned int bits = 21 - cachesz; ++ bitcache <<= bits; ++ cachesz += bits; ++ fakebits += bits; ++ } + + /* hcod (0..19) */ + +@@ -1041,6 +1087,8 @@ enum mad_error III_huffdecode(struct mad + } + + cachesz -= pair->value.hlen; ++ if (cachesz < fakebits) ++ return MAD_ERROR_BADHUFFDATA; + + if (linbits) { + /* x (0..14) */ +@@ -1054,10 +1102,15 @@ enum mad_error III_huffdecode(struct mad + + case 15: + if (cachesz < linbits + 2) { +- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); +- cachesz += 16; +- bits_left -= 16; ++ unsigned int bits = 16; ++ if (bits_left < 16) ++ bits = bits_left; ++ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); ++ cachesz += bits; ++ bits_left -= bits; + } ++ if (cachesz - fakebits < linbits) ++ return MAD_ERROR_BADHUFFDATA; + + value += MASK(bitcache, cachesz, linbits); + cachesz -= linbits; +@@ -1074,6 +1127,8 @@ enum mad_error III_huffdecode(struct mad + } + + x_final: ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[0] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1089,10 +1144,15 @@ enum mad_error III_huffdecode(struct mad + + case 15: + if (cachesz < linbits + 1) { +- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); +- cachesz += 16; +- bits_left -= 16; ++ unsigned int bits = 16; ++ if (bits_left < 16) ++ bits = bits_left; ++ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); ++ cachesz += bits; ++ bits_left -= bits; + } ++ if (cachesz - fakebits < linbits) ++ return MAD_ERROR_BADHUFFDATA; + + value += MASK(bitcache, cachesz, linbits); + cachesz -= linbits; +@@ -1109,6 +1169,8 @@ enum mad_error III_huffdecode(struct mad + } + + y_final: ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[1] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1128,6 +1190,8 @@ enum mad_error III_huffdecode(struct mad + requantized = reqcache[value] = III_requantize(value, exp); + } + ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[0] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1146,6 +1210,8 @@ enum mad_error III_huffdecode(struct mad + requantized = reqcache[value] = III_requantize(value, exp); + } + ++ if (cachesz - fakebits < 1) ++ return MAD_ERROR_BADHUFFDATA; + xrptr[1] = MASK1BIT(bitcache, cachesz--) ? + -requantized : requantized; + } +@@ -1155,9 +1221,6 @@ enum mad_error III_huffdecode(struct mad + } + } + +- if (cachesz + bits_left < 0) +- return MAD_ERROR_BADHUFFDATA; /* big_values overrun */ +- + /* count1 */ + { + union huffquad const *table; +@@ -1167,15 +1230,24 @@ enum mad_error III_huffdecode(struct mad + + requantized = III_requantize(1, exp); + +- while (cachesz + bits_left > 0 && xrptr <= &xr[572]) { ++ while (cachesz + bits_left - fakebits > 0 && xrptr <= &xr[572]) { + union huffquad const *quad; + + /* hcod (1..6) */ + + if (cachesz < 10) { +- bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); +- cachesz += 16; +- bits_left -= 16; ++ unsigned int bits = 16; ++ if (bits_left < 16) ++ bits = bits_left; ++ bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); ++ cachesz += bits; ++ bits_left -= bits; ++ } ++ if (cachesz < 10) { ++ unsigned int bits = 10 - cachesz; ++ bitcache <<= bits; ++ cachesz += bits; ++ fakebits += bits; + } + + quad = &table[MASK(bitcache, cachesz, 4)]; +@@ -1188,6 +1260,11 @@ enum mad_error III_huffdecode(struct mad + MASK(bitcache, cachesz, quad->ptr.bits)]; + } + ++ if (cachesz - fakebits < quad->value.hlen + quad->value.v ++ + quad->value.w + quad->value.x + quad->value.y) ++ /* We don't have enough bits to read one more entry, consider them ++ * stuffing bits. */ ++ break; + cachesz -= quad->value.hlen; + + if (xrptr == sfbound) { +@@ -1236,22 +1313,8 @@ enum mad_error III_huffdecode(struct mad + + xrptr += 2; + } +- +- if (cachesz + bits_left < 0) { +-# if 0 && defined(DEBUG) +- fprintf(stderr, "huffman count1 overrun (%d bits)\n", +- -(cachesz + bits_left)); +-# endif +- +- /* technically the bitstream is misformatted, but apparently +- some encoders are just a bit sloppy with stuffing bits */ +- +- xrptr -= 4; +- } + } + +- assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT); +- + # if 0 && defined(DEBUG) + if (bits_left < 0) + fprintf(stderr, "read %d bits too many\n", -bits_left); +@@ -2348,10 +2411,11 @@ void III_freqinver(mad_fixed_t sample[18 + */ + static + enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, +- struct sideinfo *si, unsigned int nch) ++ struct sideinfo *si, unsigned int nch, unsigned int md_len) + { + struct mad_header *header = &frame->header; + unsigned int sfreqi, ngr, gr; ++ int bits_left = md_len * CHAR_BIT; + + { + unsigned int sfreq; +@@ -2383,6 +2447,7 @@ enum mad_error III_decode(struct mad_bit + for (ch = 0; ch < nch; ++ch) { + struct channel *channel = &granule->ch[ch]; + unsigned int part2_length; ++ unsigned int part3_length; + + sfbwidth[ch] = sfbwidth_table[sfreqi].l; + if (channel->block_type == 2) { +@@ -2391,18 +2456,30 @@ enum mad_error III_decode(struct mad_bit + } + + if (header->flags & MAD_FLAG_LSF_EXT) { +- part2_length = III_scalefactors_lsf(ptr, channel, ++ error = III_scalefactors_lsf(ptr, channel, + ch == 0 ? 0 : &si->gr[1].ch[1], +- header->mode_extension); ++ header->mode_extension, bits_left, &part2_length); + } + else { +- part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], +- gr == 0 ? 0 : si->scfsi[ch]); ++ error = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], ++ gr == 0 ? 0 : si->scfsi[ch], bits_left, &part2_length); + } ++ if (error) ++ return error; ++ ++ bits_left -= part2_length; + +- error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length); ++ if (part2_length > channel->part2_3_length) ++ return MAD_ERROR_BADPART3LEN; ++ ++ part3_length = channel->part2_3_length - part2_length; ++ if (part3_length > bits_left) ++ return MAD_ERROR_BADPART3LEN; ++ ++ error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part3_length); + if (error) + return error; ++ bits_left -= part3_length; + } + + /* joint stereo processing */ +@@ -2519,11 +2596,13 @@ int mad_layer_III(struct mad_stream *str + unsigned int nch, priv_bitlen, next_md_begin = 0; + unsigned int si_len, data_bitlen, md_len; + unsigned int frame_space, frame_used, frame_free; +- struct mad_bitptr ptr; ++ struct mad_bitptr ptr, bufend_ptr; + struct sideinfo si; + enum mad_error error; + int result = 0; + ++ mad_bit_init(&bufend_ptr, stream->bufend); ++ + /* allocate Layer III dynamic structures */ + + if (stream->main_data == 0) { +@@ -2587,14 +2666,15 @@ int mad_layer_III(struct mad_stream *str + unsigned long header; + + mad_bit_init(&peek, stream->next_frame); ++ if (mad_bit_length(&peek, &bufend_ptr) >= 57) { ++ header = mad_bit_read(&peek, 32); ++ if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { ++ if (!(header & 0x00010000L)) /* protection_bit */ ++ mad_bit_skip(&peek, 16); /* crc_check */ + +- header = mad_bit_read(&peek, 32); +- if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { +- if (!(header & 0x00010000L)) /* protection_bit */ +- mad_bit_skip(&peek, 16); /* crc_check */ +- +- next_md_begin = +- mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); ++ next_md_begin = ++ mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); ++ } + } + + mad_bit_finish(&peek); +@@ -2653,7 +2733,7 @@ int mad_layer_III(struct mad_stream *str + /* decode main_data */ + + if (result == 0) { +- error = III_decode(&ptr, frame, &si, nch); ++ error = III_decode(&ptr, frame, &si, nch, md_len); + if (error) { + stream->error = error; + result = -1; diff --git a/repo/media/libmad/libmad-0.15.1b-cflags-O2.patch b/repo/media/libmad/libmad-0.15.1b-cflags-O2.patch new file mode 100644 index 0000000..61b4b13 --- /dev/null +++ b/repo/media/libmad/libmad-0.15.1b-cflags-O2.patch @@ -0,0 +1,12 @@ +diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac +--- libmad-0.15.1b-orig/configure.ac 2007-07-01 12:58:13.000000000 -0600 ++++ libmad-0.15.1b/configure.ac 2007-07-01 12:59:13.000000000 -0600 +@@ -105,7 +105,7 @@ + shift + ;; + -O2) +- optimize="-O" ++ optimize="-O2" + shift + ;; + -fomit-frame-pointer) diff --git a/repo/media/libmad/libmad-0.15.1b-cflags.patch b/repo/media/libmad/libmad-0.15.1b-cflags.patch new file mode 100644 index 0000000..2ec44e3 --- /dev/null +++ b/repo/media/libmad/libmad-0.15.1b-cflags.patch @@ -0,0 +1,146 @@ +diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac +--- libmad-0.15.1b-orig/configure.ac 2007-06-30 20:22:31.000000000 -0600 ++++ libmad-0.15.1b/configure.ac 2007-06-30 20:25:31.000000000 -0600 +@@ -122,74 +122,74 @@ + esac + done + +-if test "$GCC" = yes +-then +- if test -z "$arch" +- then +- case "$host" in +- i386-*) ;; +- i?86-*) arch="-march=i486" ;; +- arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;; +- armv4*-*) arch="-march=armv4 -mtune=strongarm" ;; +- powerpc-*) ;; +- mips*-agenda-*) arch="-mcpu=vr4100" ;; +- mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;; +- esac +- fi +- +- case "$optimize" in +- -O|"-O "*) +- optimize="-O" +- optimize="$optimize -fforce-mem" +- optimize="$optimize -fforce-addr" +- : #x optimize="$optimize -finline-functions" +- : #- optimize="$optimize -fstrength-reduce" +- optimize="$optimize -fthread-jumps" +- optimize="$optimize -fcse-follow-jumps" +- optimize="$optimize -fcse-skip-blocks" +- : #x optimize="$optimize -frerun-cse-after-loop" +- : #x optimize="$optimize -frerun-loop-opt" +- : #x optimize="$optimize -fgcse" +- optimize="$optimize -fexpensive-optimizations" +- optimize="$optimize -fregmove" +- : #* optimize="$optimize -fdelayed-branch" +- : #x optimize="$optimize -fschedule-insns" +- optimize="$optimize -fschedule-insns2" +- : #? optimize="$optimize -ffunction-sections" +- : #? optimize="$optimize -fcaller-saves" +- : #> optimize="$optimize -funroll-loops" +- : #> optimize="$optimize -funroll-all-loops" +- : #x optimize="$optimize -fmove-all-movables" +- : #x optimize="$optimize -freduce-all-givs" +- : #? optimize="$optimize -fstrict-aliasing" +- : #* optimize="$optimize -fstructure-noalias" +- +- case "$host" in +- arm*-*) +- optimize="$optimize -fstrength-reduce" +- ;; +- mips*-*) +- optimize="$optimize -fstrength-reduce" +- optimize="$optimize -finline-functions" +- ;; +- i?86-*) +- optimize="$optimize -fstrength-reduce" +- ;; +- powerpc-apple-*) +- # this triggers an internal compiler error with gcc2 +- : #optimize="$optimize -fstrength-reduce" +- +- # this is really only beneficial with gcc3 +- : #optimize="$optimize -finline-functions" +- ;; +- *) +- # this sometimes provokes bugs in gcc 2.95.2 +- : #optimize="$optimize -fstrength-reduce" +- ;; +- esac +- ;; +- esac +-fi ++#if test "$GCC" = yes ++#then ++# if test -z "$arch" ++# then ++# case "$host" in ++# i386-*) ;; ++# i?86-*) arch="-march=i486" ;; ++# arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;; ++# armv4*-*) arch="-march=armv4 -mtune=strongarm" ;; ++# powerpc-*) ;; ++# mips*-agenda-*) arch="-mcpu=vr4100" ;; ++# mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;; ++# esac ++# fi ++# ++# case "$optimize" in ++# -O|"-O "*) ++# optimize="-O" ++# optimize="$optimize -fforce-mem" ++# optimize="$optimize -fforce-addr" ++# : #x optimize="$optimize -finline-functions" ++# : #- optimize="$optimize -fstrength-reduce" ++# optimize="$optimize -fthread-jumps" ++# optimize="$optimize -fcse-follow-jumps" ++# optimize="$optimize -fcse-skip-blocks" ++# : #x optimize="$optimize -frerun-cse-after-loop" ++# : #x optimize="$optimize -frerun-loop-opt" ++# : #x optimize="$optimize -fgcse" ++# optimize="$optimize -fexpensive-optimizations" ++# optimize="$optimize -fregmove" ++# : #* optimize="$optimize -fdelayed-branch" ++# : #x optimize="$optimize -fschedule-insns" ++# optimize="$optimize -fschedule-insns2" ++# : #? optimize="$optimize -ffunction-sections" ++# : #? optimize="$optimize -fcaller-saves" ++# : #> optimize="$optimize -funroll-loops" ++# : #> optimize="$optimize -funroll-all-loops" ++# : #x optimize="$optimize -fmove-all-movables" ++# : #x optimize="$optimize -freduce-all-givs" ++# : #? optimize="$optimize -fstrict-aliasing" ++# : #* optimize="$optimize -fstructure-noalias" ++# ++# case "$host" in ++# arm*-*) ++# optimize="$optimize -fstrength-reduce" ++# ;; ++# mips*-*) ++# optimize="$optimize -fstrength-reduce" ++# optimize="$optimize -finline-functions" ++# ;; ++# i?86-*) ++# optimize="$optimize -fstrength-reduce" ++# ;; ++# powerpc-apple-*) ++# # this triggers an internal compiler error with gcc2 ++# : #optimize="$optimize -fstrength-reduce" ++# ++# # this is really only beneficial with gcc3 ++# : #optimize="$optimize -finline-functions" ++# ;; ++# *) ++# # this sometimes provokes bugs in gcc 2.95.2 ++# : #optimize="$optimize -fstrength-reduce" ++# ;; ++# esac ++# ;; ++# esac ++#fi + + case "$host" in + mips*-agenda-*) diff --git a/repo/media/libmad/libmad.thumb.patch b/repo/media/libmad/libmad.thumb.patch new file mode 100644 index 0000000..13edde2 --- /dev/null +++ b/repo/media/libmad/libmad.thumb.patch @@ -0,0 +1,12 @@ +--- ./imdct_l_arm.S.orig 2010-02-25 13:25:23.000000000 +0100 ++++ ./imdct_l_arm.S 2010-02-25 13:27:26.000000000 +0100 +@@ -468,7 +468,7 @@ + + @---- + +- add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) ++ adr r2, imdct36_long_karray + + + loop: + diff --git a/repo/media/libmad/libmad.xibuild b/repo/media/libmad/libmad.xibuild new file mode 100644 index 0000000..265aec5 --- /dev/null +++ b/repo/media/libmad/libmad.xibuild @@ -0,0 +1,28 @@ +#!/bin/sh + +NAME="libmad" +DESC="A high-quality MPEG audio decoder" + +MAKEDEPS="make" +DEPS="musl" + +PKG_VER=0.15.1b +SOURCE="https://downloads.sourceforge.net/sourceforge/mad/libmad-$PKG_VER.tar.gz" +ADDITIONAL="md_size.patch mad.pc libmad.thumb.patch libmad-0.15.1b-cflags.patch libmad-0.15.1b-cflags-O2.patch length-check.patch automake.patch Provide-Thumb-2-alternative-code-for-MAD_F_MLN.patch " + +prepare () { + apply_patches +} + +build () { + ./configure \ + --prefix=/usr \ + --bindir=/usr/bin \ + --sysconfdir=/etc \ + --disable-static + make +} + +package () { + make DESTDIR=$PKG_DEST install +} diff --git a/repo/media/libmad/mad.pc b/repo/media/libmad/mad.pc new file mode 100644 index 0000000..14a66f5 --- /dev/null +++ b/repo/media/libmad/mad.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: mad +Description: MPEG Audio Decoder +Requires: +Version: 0.15.0b +Libs: -L${libdir} -lmad -lm +Cflags: -I${includedir} diff --git a/repo/media/libmad/md_size.patch b/repo/media/libmad/md_size.patch new file mode 100644 index 0000000..657b5ff --- /dev/null +++ b/repo/media/libmad/md_size.patch @@ -0,0 +1,58 @@ +From: Kurt Roeckx +Date: Sun, 28 Jan 2018 15:44:08 +0100 +Subject: Check the size of the main data + +The main data to decode a frame can come from the current frame and part of the +previous frame, the so called bit reservoir. si.main_data_begin is the part of +the previous frame we need for this frame. frame_space is the amount of main +data that can be in this frame, and next_md_begin is the part of this frame that +is going to be used for the next frame. + +The maximum amount of data from a previous frame that the format allows is 511 +bytes. The maximum frame size for the defined bitrates is at MPEG 2.5 layer 2 +at 320 kbit/s and 8 kHz sample rate which gives 72 * (320000 / 8000) + 1 = 2881. +So those defines are not large enough: + # define MAD_BUFFER_GUARD 8 + # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) + +There is also support for a "free" bitrate which allows you to create any frame +size, which can be larger than the buffer. + +Changing the defines is not an option since it's part of the ABI, so we check +that the main data fits in the bufer. + +The previous frame data is stored in *stream->main_data and contains +stream->md_len bytes. If stream->md_len is larger than the data we +need from the previous frame (si.main_data_begin) it still wouldn't fit +in the buffer, so just keep the data that we need. + +Index: libmad-0.15.1b/layer3.c +=================================================================== +--- libmad-0.15.1b.orig/layer3.c ++++ libmad-0.15.1b/layer3.c +@@ -2608,6 +2608,11 @@ int mad_layer_III(struct mad_stream *str + next_md_begin = 0; + + md_len = si.main_data_begin + frame_space - next_md_begin; ++ if (md_len + MAD_BUFFER_GUARD > MAD_BUFFER_MDLEN) { ++ stream->error = MAD_ERROR_LOSTSYNC; ++ stream->sync = 0; ++ return -1; ++ } + + frame_used = 0; + +@@ -2625,8 +2630,11 @@ int mad_layer_III(struct mad_stream *str + } + } + else { +- mad_bit_init(&ptr, +- *stream->main_data + stream->md_len - si.main_data_begin); ++ memmove(stream->main_data, ++ *stream->main_data + stream->md_len - si.main_data_begin, ++ si.main_data_begin); ++ stream->md_len = si.main_data_begin; ++ mad_bit_init(&ptr, *stream->main_data); + + if (md_len > si.main_data_begin) { + assert(stream->md_len + md_len - diff --git a/repo/media/librsvg/librsvg.xibuild b/repo/media/librsvg/librsvg.xibuild new file mode 100644 index 0000000..7e29f04 --- /dev/null +++ b/repo/media/librsvg/librsvg.xibuild @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME="librsvg" +DESC="SAX-based renderer for SVG files into a GdkPixbuf" + +MAKEDEPS="make rust cargo vala" +DEPS="cairo gdk-pixbuf glib libxml2 musl pango " + +PKG_VER=2.54.1 +SOURCE="https://download.gnome.org/sources/librsvg/${PKG_VER%.*}/librsvg-$PKG_VER.tar.xz" +ADDITIONAL="target.patch" + +prepare () { + apply_patches + export RUSTFLAGS="$RUSTFLAGS -C debuginfo=2" + export CARGO_PROFILE_RELEASE_LTO=true + export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 +} + + +build () { + export CFLAGS="-fPIC" CXXFLAGS="-fPIC" + + ./configure --prefix=/usr \ + --libexecdir=/usr/lib/librsvg \ + --disable-static \ + --enable-vala + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool + + make -j1 + +} + +package () { + make DESTDIR=$PKG_DEST install +} + +postinstall () { + gdk-pixbuf-query-loaders --update-cache +} diff --git a/repo/media/librsvg/rsvg-h-dont-use-comments-in-comments.patch b/repo/media/librsvg/rsvg-h-dont-use-comments-in-comments.patch new file mode 100644 index 0000000..d7bb1ec --- /dev/null +++ b/repo/media/librsvg/rsvg-h-dont-use-comments-in-comments.patch @@ -0,0 +1,31 @@ +From d158d111f4b4d539a1f586bf42825c4759386fd4 Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero +Date: Wed, 6 Apr 2022 13:30:40 -0500 +Subject: [PATCH] (#856): Don't use /* as part of the text in C documentation + comments + +Compilers don't like it! + +Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/856 + +Part-of: +--- + include/librsvg/rsvg.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/librsvg/rsvg.h b/include/librsvg/rsvg.h +index 5a5c97c81..964002354 100644 +--- a/include/librsvg/rsvg.h ++++ b/include/librsvg/rsvg.h +@@ -122,7 +122,7 @@ GType rsvg_error_get_type (void); + * if the base file is `/foo/bar/baz.svg`, then librsvg will + * only try to load referenced files (from SVG's + * `` element, for example, or from content +- * included through XML entities) if those files are in `/foo/bar/*` or in `/foo/bar/*\/.../*`. ++ * included through XML entities) if those files are in `/foo/bar/` or in `/foo/bar/\/.../`. + * This is so that malicious SVG files cannot include files that are in a directory above. + * + * The full set of rules for deciding which URLs may be loaded is as follows; +-- +GitLab + diff --git a/repo/media/librsvg/target.patch b/repo/media/librsvg/target.patch new file mode 100644 index 0000000..569bc89 --- /dev/null +++ b/repo/media/librsvg/target.patch @@ -0,0 +1,26 @@ +Patch-Source: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/23495#note_202355 + +--- a/vendor/system-deps/.cargo-checksum.json.orig ++++ b/vendor/system-deps/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"c38fd96ca3233ebee3bb7e37ca8f8a7a2685cdd7fcccf0210eaa879aa91dc684","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"} +\ No newline at end of file ++{"files":{"Cargo.toml":"927df7476ebf5f5983169cfd973f4c95b84da17caeb20d33cccf50e326af5316","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"8813a7d146e91e7d3946c27f0ca1b2c2bb8800208190beecd3773cda283d3ea4","src/metadata.rs":"657bc1b77e949e4800f9dd808790ffa535820e1658d412121a1da548e0cdd02c","src/test.rs":"9d5f8c1fb7a821352d6ba75cb005ead3e36b4f359e61feb605ab8a36d4fd31f8","src/tests/lib/libteststatic.a":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/teststaticlib.pc":"77df23f6c7c1d47aff18453b47c87e53ec8a96017546e0a55c8c4d1e13b70134","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"a1a45a1c4c9015217e12347f2a411b57ce2c4fc543913b14b6fe40483328e709"} +\ No newline at end of file + +--- a/vendor/system-deps/src/lib.rs.orig ++++ b/vendor/system-deps/src/lib.rs +@@ -668,13 +668,6 @@ + let mut libraries = Dependencies::default(); + + for dep in metadata.deps.iter() { +- if let Some(cfg) = &dep.cfg { +- // Check if `cfg()` expression matches the target settings +- if !self.check_cfg(cfg)? { +- continue; +- } +- } +- + let mut enabled_feature_overrides = Vec::new(); + + for o in dep.version_overrides.iter() { diff --git a/repo/media/pulseaudio/pulseaudio.xibuild b/repo/media/pulseaudio/pulseaudio.xibuild index 14b9bcd..1df3660 100644 --- a/repo/media/pulseaudio/pulseaudio.xibuild +++ b/repo/media/pulseaudio/pulseaudio.xibuild @@ -1,7 +1,7 @@ #!/bin/sh -MAKEDEPS="make check soxr speex libx11 libxtst fftw jack speexdsp openssl eudev check libtool" -DEPS="libsndfile alsa-lib dbus elogind glib libcap speex libxtst gdbm" +MAKEDEPS="make check soxr libx11 libxtst openssl eudev check libtool gtk3" +DEPS="libsndfile alsa-lib dbus elogind glib libcap libxtst gdbm" DESC="A featureful, general-purpose sound server" diff --git a/repo/meta/all/all.xibuild b/repo/meta/all/all.xibuild index 286a254..4a57227 100644 --- a/repo/meta/all/all.xibuild +++ b/repo/meta/all/all.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="AlL tHe pacKageS!!" -DEPS=" feh lynx rxvt-unicode vim xterm asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc scdoc sgml-common swig texinfo xmlto encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 fontconfig font-ibm-type1 font-misc-ethiopic font-util font-xfree86-type1 linux-firmware linux-headers linux alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils audiofile faac faad2 fdk-aac flac libogg libsamplerate libsndfile libtheora libvorbis libvpx opus pipewire pulseaudio python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-html5lib python-idna python-imagesize python-Jinja2 python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-sphinx python-urllib3 python-webencodings python alsa-oss audit cacert-utils fakechroot fakeroot icecream-sundae polybar xf86-video-qxl xf86-video-vga acl acpid argp-standalone attr binutils brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip hwids iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openrc openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump sbase sed shadow sh skalibs slang sqlite3 sysklogd syslinux tar tcl tomlc99 ubase udev-rules utmps xxhash xz zip zlib zstd acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop ifupdown-ng inetutils iproute2 iw keyutils less lm-sensors man-db neofetch net-tools nmap openssh pciutils pm-utils procps-ng rhash rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant bspwm iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau-va-gl libvdpau libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxinerama libxi libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxtst libxt libxvmc libxv libxxf86dga libxxf86vm luit mesa mkfontscale pixman sessreg setxkbmap smproxy sxhkd wayland-protocols wayland x11perf xauth xbacklight xbitmaps xcb-proto xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util xclock xcmsdb xcursorgen xcursor-themes xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorgproto xorg-server xorg-util-macros xorg-xinit xprop xpr xrandr xrdb xrefresh xsetroot xset xtrans xvinfo xwd xwininfo xwud mkinitramfs sysconfigs xib xichroot xipkg xiutils" +DEPS=" arandr chromium feh firefox links lynx mpv ncmpcpp neovim pavucontrol pcmanfm polybar rxvt-unicode vim xclock-cat xlinks xterm asciidoc autoconf autoconf-archive autoconf2-13 automake bc bison boost cbindgen check cmake cmake-extra cmake-modules dejagnu distcc docbook-dtd docbook-xml docbook-xsl docbook4-xml doxygen expect flex gcc gdb git go gtk-doc help2man icecream imake itstool libexecinfo llvm m4 make meson mpc nasm ninja patch pkg-config rust scdoc sgml-common strace swig texinfo uthash vala waf xmlto xorg-cf-files encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 font-ibm-type1 font-misc-ethiopic font-noto font-opensans font-util font-xfree86-type1 fontconfig extremetuxracer b43-firmware b43-fwcutter linux linux-firmware linux-headers alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils aom audiofile babl dav1d exiv2 faac faad2 fdk-aac ffmpeg ffmpeg4 flac gexiv2 lame libass libcanberra libjpeg-turbo libmad libmpdclient libmypaint libogg libraw librist librsvg libsamplerate libsndfile libsrt libtheora libvorbis libvpx libwebp mpc-mpd mpd openal-soft openjpeg opus pipewire poppler pulseaudio pulsemixer sfml soxr tiff v4l-utils vidstab wavpack x264 x265 xvidcore python python-Jinja2 python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-gobject python-html5lib python-idna python-imagesize python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-urllib3 python-webencodings acl acpid argp-standalone at-spi2-atk at-spi2-core atk atkmm attr binutils brotli bzip2 c-ares cacerts cairo cryptsetup cups dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 fribidi gc gdbm gettext glew glib glibmm glm glu gmp gnutls gobject-introspection gperf grub guile gzip hwids i2pd iana-etc icu imlib2 intltool jansson js78 json-c json-glib jsoncpp kbd kmod krb5 lcms2 ldns libaio libarchive libcap libcap-ng libconfig libdwarf libedit libelf libev libevent libexif libffi libfm libfm-extra libgcrypt libgpg-error libgudev libidn libldap liblinear libluv libmbim libmpack libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libqmi libqrtr libretls libsasl libseccomp libsigc++ libsigsegv libssh2 libtasn1 libtermkey libtirpc libtool libunistring libusb libuv libvterm libxcrypt libxml2 libxslt ljx lua lua-lpeg lua-mpack lua5-1 luajit lz4 lzo menu-cache mime-types mobile-broadband-provider-info modemmanager mpfr msgpack-c mtdev musl musl-fts musl-legacy-compat musl-obstack ncurses nettle networkmanager newt nodejs nspr nss nsss openjdk11 openntpd openrc openssl pahole pam pcre pcre2 pcsc-lite perl perl-xml-parser polkit popt psmisc queue-standalone re2 readline rtmpdump sbase sed sh shadow shared-mime-info skalibs slang snappy sqlite3 startup-notification sysklogd syslinux tar tcl tomlc99 tor tree-sitter tzdata ubase udev-rules unibilium utmps xxhash xz zip zlib zstd acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file flite fmt fzf gawk genfstab graphviz grep groff htop iftop ifupdown-ng inetutils iproute2 iw iwd keyutils less lm-sensors lvm2 man-db mandoc mksh mpd-mpc mpdscribble neofetch net-tools nmap openssh pciutils pdfgrep pm-utils procps-ng rhash rsync sort stty sudo tmux unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant adwaita-icon-theme berry bspwm cairomm dmenu gdk-pixbuf graphite gsettings-desktop-schemas gtk2 gtk3 gtkmm3 harfbuzz hicolor-icon-theme iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau libvdpau-va-gl libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxi libxinerama libxkbcommon libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxt libxtst libxv libxvmc libxxf86dga libxxf86vm luit maim mesa mkfontscale motif pango pangomm picom pixman rofi sdl2 sessreg setxkbmap slock slop smproxy spice-protocol sxhkd wayland wayland-protocols x11perf xauth xautolock xbacklight xbitmaps xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xclip xclock xcmsdb xcursor-themes xcursorgen xdg-utils xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-qxl xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorg-server xorg-util-macros xorg-xinit xorgproto xpr xprop xrandr xrdb xrefresh xsel xset xsetroot xss-lock xtrans xvinfo xwd xwininfo xwud sysconfigs xib xibuild xipkg xiutils" diff --git a/repo/meta/repo-apps/repo-apps.xibuild b/repo/meta/repo-apps/repo-apps.xibuild index 08bd151..7f05da4 100644 --- a/repo/meta/repo-apps/repo-apps.xibuild +++ b/repo/meta/repo-apps/repo-apps.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in apps" -DEPS=" feh lynx rxvt-unicode vim xterm" +DEPS=" arandr chromium feh firefox links lynx mpv ncmpcpp neovim pavucontrol pcmanfm polybar rxvt-unicode vim xclock-cat xlinks xterm" diff --git a/repo/meta/repo-devel/repo-devel.xibuild b/repo/meta/repo-devel/repo-devel.xibuild index 01a0c6c..c32dc10 100644 --- a/repo/meta/repo-devel/repo-devel.xibuild +++ b/repo/meta/repo-devel/repo-devel.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in devel" -DEPS=" asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc scdoc sgml-common swig texinfo xmlto" +DEPS=" asciidoc autoconf autoconf-archive autoconf2-13 automake bc bison boost cbindgen check cmake cmake-extra cmake-modules dejagnu distcc docbook-dtd docbook-xml docbook-xsl docbook4-xml doxygen expect flex gcc gdb git go gtk-doc help2man icecream imake itstool libexecinfo llvm m4 make meson mpc nasm ninja patch pkg-config rust scdoc sgml-common strace swig texinfo uthash vala waf xmlto xorg-cf-files" diff --git a/repo/meta/repo-font/repo-font.xibuild b/repo/meta/repo-font/repo-font.xibuild index 89a90f1..ad9cabe 100644 --- a/repo/meta/repo-font/repo-font.xibuild +++ b/repo/meta/repo-font/repo-font.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in font" -DEPS=" encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 fontconfig font-ibm-type1 font-misc-ethiopic font-util font-xfree86-type1" +DEPS=" encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 font-ibm-type1 font-misc-ethiopic font-noto font-opensans font-util font-xfree86-type1 fontconfig" diff --git a/repo/meta/repo-games/repo-games.xibuild b/repo/meta/repo-games/repo-games.xibuild new file mode 100644 index 0000000..7806263 --- /dev/null +++ b/repo/meta/repo-games/repo-games.xibuild @@ -0,0 +1,5 @@ +#!/bin/sh +# This file was automatically generated, do not edit! + +DESC="All the the packages available in games" +DEPS=" extremetuxracer" diff --git a/repo/meta/repo-linux/repo-linux.xibuild b/repo/meta/repo-linux/repo-linux.xibuild index d4ab3e0..13d2f3a 100644 --- a/repo/meta/repo-linux/repo-linux.xibuild +++ b/repo/meta/repo-linux/repo-linux.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in linux" -DEPS=" linux-firmware linux-headers linux" +DEPS=" b43-firmware b43-fwcutter linux linux-firmware linux-headers" diff --git a/repo/meta/repo-media/repo-media.xibuild b/repo/meta/repo-media/repo-media.xibuild index a2aec98..1deec97 100644 --- a/repo/meta/repo-media/repo-media.xibuild +++ b/repo/meta/repo-media/repo-media.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in media" -DEPS=" alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils audiofile faac faad2 fdk-aac flac libogg libsamplerate libsndfile libtheora libvorbis libvpx opus pipewire pulseaudio" +DEPS=" alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils aom audiofile babl dav1d exiv2 faac faad2 fdk-aac ffmpeg ffmpeg4 flac gexiv2 lame libass libcanberra libjpeg-turbo libmad libmpdclient libmypaint libogg libraw librist librsvg libsamplerate libsndfile libsrt libtheora libvorbis libvpx libwebp mpc-mpd mpd openal-soft openjpeg opus pipewire poppler pulseaudio pulsemixer sfml soxr tiff v4l-utils vidstab wavpack x264 x265 xvidcore" diff --git a/repo/meta/repo-python/repo-python.xibuild b/repo/meta/repo-python/repo-python.xibuild index a06b208..e7cb860 100644 --- a/repo/meta/repo-python/repo-python.xibuild +++ b/repo/meta/repo-python/repo-python.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in python" -DEPS=" python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-html5lib python-idna python-imagesize python-Jinja2 python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-sphinx python-urllib3 python-webencodings python" +DEPS=" python python-Jinja2 python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-gobject python-html5lib python-idna python-imagesize python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-urllib3 python-webencodings" diff --git a/repo/meta/repo-system/repo-system.xibuild b/repo/meta/repo-system/repo-system.xibuild index 37ef7ae..e2b8926 100644 --- a/repo/meta/repo-system/repo-system.xibuild +++ b/repo/meta/repo-system/repo-system.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in system" -DEPS=" acl acpid argp-standalone attr binutils brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip hwids iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openrc openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump sbase sed shadow sh skalibs slang sqlite3 sysklogd syslinux tar tcl tomlc99 ubase udev-rules utmps xxhash xz zip zlib zstd" +DEPS=" acl acpid argp-standalone at-spi2-atk at-spi2-core atk atkmm attr binutils brotli bzip2 c-ares cacerts cairo cryptsetup cups dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 fribidi gc gdbm gettext glew glib glibmm glm glu gmp gnutls gobject-introspection gperf grub guile gzip hwids i2pd iana-etc icu imlib2 intltool jansson js78 json-c json-glib jsoncpp kbd kmod krb5 lcms2 ldns libaio libarchive libcap libcap-ng libconfig libdwarf libedit libelf libev libevent libexif libffi libfm libfm-extra libgcrypt libgpg-error libgudev libidn libldap liblinear libluv libmbim libmpack libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libqmi libqrtr libretls libsasl libseccomp libsigc++ libsigsegv libssh2 libtasn1 libtermkey libtirpc libtool libunistring libusb libuv libvterm libxcrypt libxml2 libxslt ljx lua lua-lpeg lua-mpack lua5-1 luajit lz4 lzo menu-cache mime-types mobile-broadband-provider-info modemmanager mpfr msgpack-c mtdev musl musl-fts musl-legacy-compat musl-obstack ncurses nettle networkmanager newt nodejs nspr nss nsss openjdk11 openntpd openrc openssl pahole pam pcre pcre2 pcsc-lite perl perl-xml-parser polkit popt psmisc queue-standalone re2 readline rtmpdump sbase sed sh shadow shared-mime-info skalibs slang snappy sqlite3 startup-notification sysklogd syslinux tar tcl tomlc99 tor tree-sitter tzdata ubase udev-rules unibilium utmps xxhash xz zip zlib zstd" diff --git a/repo/meta/repo-util/repo-util.xibuild b/repo/meta/repo-util/repo-util.xibuild index 6cc0a60..929bc49 100644 --- a/repo/meta/repo-util/repo-util.xibuild +++ b/repo/meta/repo-util/repo-util.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in util" -DEPS=" acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop ifupdown-ng inetutils iproute2 iw keyutils less lm-sensors man-db neofetch net-tools nmap openssh pciutils pm-utils procps-ng rhash rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant" +DEPS=" acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file flite fmt fzf gawk genfstab graphviz grep groff htop iftop ifupdown-ng inetutils iproute2 iw iwd keyutils less lm-sensors lvm2 man-db mandoc mksh mpd-mpc mpdscribble neofetch net-tools nmap openssh pciutils pdfgrep pm-utils procps-ng rhash rsync sort stty sudo tmux unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant" diff --git a/repo/meta/repo-x11/repo-x11.xibuild b/repo/meta/repo-x11/repo-x11.xibuild index 1191f8f..ef3b0d3 100644 --- a/repo/meta/repo-x11/repo-x11.xibuild +++ b/repo/meta/repo-x11/repo-x11.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in x11" -DEPS=" bspwm iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau-va-gl libvdpau libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxinerama libxi libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxtst libxt libxvmc libxv libxxf86dga libxxf86vm luit mesa mkfontscale pixman sessreg setxkbmap smproxy sxhkd wayland-protocols wayland x11perf xauth xbacklight xbitmaps xcb-proto xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util xclock xcmsdb xcursorgen xcursor-themes xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorgproto xorg-server xorg-util-macros xorg-xinit xprop xpr xrandr xrdb xrefresh xsetroot xset xtrans xvinfo xwd xwininfo xwud" +DEPS=" adwaita-icon-theme berry bspwm cairomm dmenu gdk-pixbuf graphite gsettings-desktop-schemas gtk2 gtk3 gtkmm3 harfbuzz hicolor-icon-theme iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau libvdpau-va-gl libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxi libxinerama libxkbcommon libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxt libxtst libxv libxvmc libxxf86dga libxxf86vm luit maim mesa mkfontscale motif pango pangomm picom pixman rofi sdl2 sessreg setxkbmap slock slop smproxy spice-protocol sxhkd wayland wayland-protocols x11perf xauth xautolock xbacklight xbitmaps xcb-proto xcb-util xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xclip xclock xcmsdb xcursor-themes xcursorgen xdg-utils xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-qxl xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorg-server xorg-util-macros xorg-xinit xorgproto xpr xprop xrandr xrdb xrefresh xsel xset xsetroot xss-lock xtrans xvinfo xwd xwininfo xwud" diff --git a/repo/meta/repo-xi/repo-xi.xibuild b/repo/meta/repo-xi/repo-xi.xibuild index a3b3160..e6ed9d5 100644 --- a/repo/meta/repo-xi/repo-xi.xibuild +++ b/repo/meta/repo-xi/repo-xi.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in xi" -DEPS=" mkinitramfs sysconfigs xib xichroot xipkg xiutils" +DEPS=" sysconfigs xib xibuild xipkg xiutils" diff --git a/repo/meta/skip/skip.xibuild b/repo/meta/skip/skip.xibuild deleted file mode 100644 index 0fd2cb5..0000000 --- a/repo/meta/skip/skip.xibuild +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# This file was automatically generated, do not edit! - -DESC="All the the packages available in skip" -DEPS=" cacert-utils fakechroot fakeroot icecream" diff --git a/repo/system/dbus/dbus.xibuild b/repo/system/dbus/dbus.xibuild index 3bbfc31..ba7869b 100644 --- a/repo/system/dbus/dbus.xibuild +++ b/repo/system/dbus/dbus.xibuild @@ -22,8 +22,8 @@ build () { --disable-doxygen-docs \ --disable-xml-docs \ --disable-static \ - --with-systemduserunitdir=no \ - --with-systemdsystemunitdir=no \ + --with-systemduserunitdir=$BUILD_ROOT/no \ + --with-systemdsystemunitdir=$BUILD_ROOT/no \ --docdir=/usr/share/doc/dbus-$PKG_VER \ --with-console-auth-dir=/run/console \ --with-system-pid-file=/run/dbus/pid \ diff --git a/repo/system/elfutils/elfutils.xibuild b/repo/system/elfutils/elfutils.xibuild index a68827f..5f7eb38 100644 --- a/repo/system/elfutils/elfutils.xibuild +++ b/repo/system/elfutils/elfutils.xibuild @@ -1,17 +1,17 @@ #!/bin/sh -MAKEDEPS="bison flex zlib bzip2 xz argp-standalone libtool fts musl-obstack" +MAKEDEPS="bison flex zlib bzip2 xz argp-standalone libtool musl-obstack" DEPS="musl zlib" PKG_VER=0.186 SOURCE=https://sourceware.org/elfutils/ftp/$PKG_VER/elfutils-$PKG_VER.tar.bz2 ADDITIONAL=" - files/error.h - patches/fix-aarch64_fregs.patch - patches/fix-uninitialized.patch - patches/musl-macros.patch - patches/musl-strndupa.patch - patches/musl-asm-ptrace-h.patch + error.h + fix-aarch64_fregs.patch + fix-uninitialized.patch + musl-macros.patch + musl-strndupa.patch + musl-asm-ptrace-h.patch " DESC="Utilities and DSOs to handle ELF files and DWARF data" diff --git a/repo/system/elfutils/error.h b/repo/system/elfutils/error.h new file mode 100644 index 0000000..ef06827 --- /dev/null +++ b/repo/system/elfutils/error.h @@ -0,0 +1,27 @@ +#ifndef _ERROR_H_ +#define _ERROR_H_ + +#include +#include +#include +#include +#include + +static unsigned int error_message_count = 0; + +static inline void error(int status, int errnum, const char* format, ...) +{ + va_list ap; + fprintf(stderr, "%s: ", program_invocation_name); + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + if (errnum) + fprintf(stderr, ": %s", strerror(errnum)); + fprintf(stderr, "\n"); + error_message_count++; + if (status) + exit(status); +} + +#endif /* _ERROR_H_ */ diff --git a/repo/system/elfutils/files/error.h b/repo/system/elfutils/files/error.h deleted file mode 100644 index ef06827..0000000 --- a/repo/system/elfutils/files/error.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _ERROR_H_ -#define _ERROR_H_ - -#include -#include -#include -#include -#include - -static unsigned int error_message_count = 0; - -static inline void error(int status, int errnum, const char* format, ...) -{ - va_list ap; - fprintf(stderr, "%s: ", program_invocation_name); - va_start(ap, format); - vfprintf(stderr, format, ap); - va_end(ap); - if (errnum) - fprintf(stderr, ": %s", strerror(errnum)); - fprintf(stderr, "\n"); - error_message_count++; - if (status) - exit(status); -} - -#endif /* _ERROR_H_ */ diff --git a/repo/system/elfutils/fix-aarch64_fregs.patch b/repo/system/elfutils/fix-aarch64_fregs.patch new file mode 100644 index 0000000..4007416 --- /dev/null +++ b/repo/system/elfutils/fix-aarch64_fregs.patch @@ -0,0 +1,14 @@ +It looks like fregs.vregs[] is an array of double? +Casting to Dwarf_Word instead of & 0xFFFFFFF should do. + +--- a/backends/aarch64_initreg.c 2015-11-27 14:36:29.000000000 +0100 ++++ b/backends/aarch64_initreg.c 2016-08-09 03:47:25.428560159 +0200 +@@ -82,7 +82,7 @@ + + Dwarf_Word dwarf_fregs[32]; + for (int r = 0; r < 32; r++) +- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; ++ dwarf_fregs[r] = (Dwarf_Word)fregs.vregs[r]; + + if (! setfunc (64, 32, dwarf_fregs, arg)) + return false; diff --git a/repo/system/elfutils/fix-uninitialized.patch b/repo/system/elfutils/fix-uninitialized.patch new file mode 100644 index 0000000..31ecd9e --- /dev/null +++ b/repo/system/elfutils/fix-uninitialized.patch @@ -0,0 +1,17 @@ + +--- a/libcpu/i386_disasm.c 2015-08-21 14:22:37.000000000 +0200 ++++ b/libcpu/i386_disasm.c 2015-11-20 06:30:59.250629957 +0100 +@@ -1,4 +1,4 @@ +-/* Disassembler for x86. ++/* Disassembler for x86. + Copyright (C) 2007, 2008, 2009, 2011 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2007. +@@ -710,6 +710,7 @@ + + case 'm': + /* Mnemonic. */ ++ str = mnebuf; + + if (unlikely (instrtab[cnt].mnemonic == MNE_INVALID)) + { diff --git a/repo/system/elfutils/musl-asm-ptrace-h.patch b/repo/system/elfutils/musl-asm-ptrace-h.patch new file mode 100644 index 0000000..fc14686 --- /dev/null +++ b/repo/system/elfutils/musl-asm-ptrace-h.patch @@ -0,0 +1,10 @@ +--- a/backends/ppc_initreg.c 2019-11-26 23:48:42.000000000 +0100 ++++ b/backends/ppc_initreg.c 2019-12-08 16:57:58.334872602 +0100 +@@ -32,6 +32,7 @@ + + #include + #if defined(__powerpc__) && defined(__linux__) ++# include + # include + # include + #endif diff --git a/repo/system/elfutils/musl-macros.patch b/repo/system/elfutils/musl-macros.patch new file mode 100644 index 0000000..0d7ec41 --- /dev/null +++ b/repo/system/elfutils/musl-macros.patch @@ -0,0 +1,87 @@ +--- a/src/arlib.h 2015-08-21 14:22:37.000000000 +0200 ++++ b/src/arlib.h 2015-11-20 08:02:55.153199611 +0100 +@@ -29,6 +29,16 @@ + #include + #include + ++#if !defined(ACCESSPERMS) ++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ ++#endif ++#if !defined(ALLPERMS) ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ ++#endif ++#if !defined(DEFFILEMODE) ++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ ++#endif ++ + + /* State of -D/-U flags. */ + extern bool arlib_deterministic_output; +--- a/src/elfcompress.c.orig 2016-04-02 12:51:26.903848894 +0200 ++++ b/src/elfcompress.c 2016-04-02 12:55:15.076996338 +0200 +@@ -35,6 +35,14 @@ + #include + #include "system.h" + ++#if !defined(FNM_EXTMATCH) ++# define FNM_EXTMATCH 0 ++#endif ++ ++#if !defined(ALLPERMS) ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ ++#endif ++ + /* Name and version of program. */ + static void print_version (FILE *stream, struct argp_state *state); + ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; +diff --git a/lib/libeu.h b/lib/libeu.h +index 69fe3d7..e5c99b8 100644 +--- a/lib/libeu.h ++++ b/lib/libeu.h +@@ -31,6 +31,27 @@ + + #include + #include ++#include ++#include ++#include ++ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ ++#ifndef strndupa ++#define strndupa(s, n) \ ++ (__extension__ ({const char *__in = (s); \ ++ size_t __len = strnlen (__in, (n)) + 1; \ ++ char *__out = (char *) alloca (__len); \ ++ __out[__len-1] = '\0'; \ ++ (char *) memcpy (__out, __in, __len-1);})) ++#endif + + extern void *xmalloc (size_t) __attribute__ ((__malloc__)); + extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); +diff --git a/src/strip.c b/src/strip.c +index 48792a7..d2f0c60 100644 +--- a/src/strip.c ++++ b/src/strip.c +@@ -46,6 +46,14 @@ + #include + #include + ++#if !defined(FNM_EXTMATCH) ++# define FNM_EXTMATCH 0 ++#endif ++ ++#if !defined(ACCESSPERMS) ++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) ++#endif ++ + typedef uint8_t GElf_Byte; + + /* Name and version of program. */ diff --git a/repo/system/elfutils/musl-strndupa.patch b/repo/system/elfutils/musl-strndupa.patch new file mode 100644 index 0000000..a520688 --- /dev/null +++ b/repo/system/elfutils/musl-strndupa.patch @@ -0,0 +1,18 @@ +--- a/src/unstrip.c.orig 2017-04-27 14:26:26.000000000 +0000 ++++ b/src/unstrip.c 2017-05-05 15:51:33.515154220 +0000 +@@ -56,6 +56,15 @@ + # define _(str) gettext (str) + #endif + ++#ifndef strndupa ++#define strndupa(s, n) \ ++ (__extension__ ({const char *__in = (s); \ ++ size_t __len = strnlen (__in, (n)) + 1; \ ++ char *__out = (char *) alloca (__len); \ ++ __out[__len-1] = '\0'; \ ++ (char *) memcpy (__out, __in, __len-1);})) ++#endif ++ + /* Name and version of program. */ + ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + diff --git a/repo/system/elfutils/patches/fix-aarch64_fregs.patch b/repo/system/elfutils/patches/fix-aarch64_fregs.patch deleted file mode 100644 index 4007416..0000000 --- a/repo/system/elfutils/patches/fix-aarch64_fregs.patch +++ /dev/null @@ -1,14 +0,0 @@ -It looks like fregs.vregs[] is an array of double? -Casting to Dwarf_Word instead of & 0xFFFFFFF should do. - ---- a/backends/aarch64_initreg.c 2015-11-27 14:36:29.000000000 +0100 -+++ b/backends/aarch64_initreg.c 2016-08-09 03:47:25.428560159 +0200 -@@ -82,7 +82,7 @@ - - Dwarf_Word dwarf_fregs[32]; - for (int r = 0; r < 32; r++) -- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; -+ dwarf_fregs[r] = (Dwarf_Word)fregs.vregs[r]; - - if (! setfunc (64, 32, dwarf_fregs, arg)) - return false; diff --git a/repo/system/elfutils/patches/fix-uninitialized.patch b/repo/system/elfutils/patches/fix-uninitialized.patch deleted file mode 100644 index 31ecd9e..0000000 --- a/repo/system/elfutils/patches/fix-uninitialized.patch +++ /dev/null @@ -1,17 +0,0 @@ - ---- a/libcpu/i386_disasm.c 2015-08-21 14:22:37.000000000 +0200 -+++ b/libcpu/i386_disasm.c 2015-11-20 06:30:59.250629957 +0100 -@@ -1,4 +1,4 @@ --/* Disassembler for x86. -+/* Disassembler for x86. - Copyright (C) 2007, 2008, 2009, 2011 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2007. -@@ -710,6 +710,7 @@ - - case 'm': - /* Mnemonic. */ -+ str = mnebuf; - - if (unlikely (instrtab[cnt].mnemonic == MNE_INVALID)) - { diff --git a/repo/system/elfutils/patches/musl-asm-ptrace-h.patch b/repo/system/elfutils/patches/musl-asm-ptrace-h.patch deleted file mode 100644 index fc14686..0000000 --- a/repo/system/elfutils/patches/musl-asm-ptrace-h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/backends/ppc_initreg.c 2019-11-26 23:48:42.000000000 +0100 -+++ b/backends/ppc_initreg.c 2019-12-08 16:57:58.334872602 +0100 -@@ -32,6 +32,7 @@ - - #include - #if defined(__powerpc__) && defined(__linux__) -+# include - # include - # include - #endif diff --git a/repo/system/elfutils/patches/musl-macros.patch b/repo/system/elfutils/patches/musl-macros.patch deleted file mode 100644 index 0d7ec41..0000000 --- a/repo/system/elfutils/patches/musl-macros.patch +++ /dev/null @@ -1,87 +0,0 @@ ---- a/src/arlib.h 2015-08-21 14:22:37.000000000 +0200 -+++ b/src/arlib.h 2015-11-20 08:02:55.153199611 +0100 -@@ -29,6 +29,16 @@ - #include - #include - -+#if !defined(ACCESSPERMS) -+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ -+#endif -+#if !defined(ALLPERMS) -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ -+#endif -+#if !defined(DEFFILEMODE) -+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ -+#endif -+ - - /* State of -D/-U flags. */ - extern bool arlib_deterministic_output; ---- a/src/elfcompress.c.orig 2016-04-02 12:51:26.903848894 +0200 -+++ b/src/elfcompress.c 2016-04-02 12:55:15.076996338 +0200 -@@ -35,6 +35,14 @@ - #include - #include "system.h" - -+#if !defined(FNM_EXTMATCH) -+# define FNM_EXTMATCH 0 -+#endif -+ -+#if !defined(ALLPERMS) -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ -+#endif -+ - /* Name and version of program. */ - static void print_version (FILE *stream, struct argp_state *state); - ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; -diff --git a/lib/libeu.h b/lib/libeu.h -index 69fe3d7..e5c99b8 100644 ---- a/lib/libeu.h -+++ b/lib/libeu.h -@@ -31,6 +31,27 @@ - - #include - #include -+#include -+#include -+#include -+ -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ -+#ifndef strndupa -+#define strndupa(s, n) \ -+ (__extension__ ({const char *__in = (s); \ -+ size_t __len = strnlen (__in, (n)) + 1; \ -+ char *__out = (char *) alloca (__len); \ -+ __out[__len-1] = '\0'; \ -+ (char *) memcpy (__out, __in, __len-1);})) -+#endif - - extern void *xmalloc (size_t) __attribute__ ((__malloc__)); - extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); -diff --git a/src/strip.c b/src/strip.c -index 48792a7..d2f0c60 100644 ---- a/src/strip.c -+++ b/src/strip.c -@@ -46,6 +46,14 @@ - #include - #include - -+#if !defined(FNM_EXTMATCH) -+# define FNM_EXTMATCH 0 -+#endif -+ -+#if !defined(ACCESSPERMS) -+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) -+#endif -+ - typedef uint8_t GElf_Byte; - - /* Name and version of program. */ diff --git a/repo/system/elfutils/patches/musl-strndupa.patch b/repo/system/elfutils/patches/musl-strndupa.patch deleted file mode 100644 index a520688..0000000 --- a/repo/system/elfutils/patches/musl-strndupa.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/src/unstrip.c.orig 2017-04-27 14:26:26.000000000 +0000 -+++ b/src/unstrip.c 2017-05-05 15:51:33.515154220 +0000 -@@ -56,6 +56,15 @@ - # define _(str) gettext (str) - #endif - -+#ifndef strndupa -+#define strndupa(s, n) \ -+ (__extension__ ({const char *__in = (s); \ -+ size_t __len = strnlen (__in, (n)) + 1; \ -+ char *__out = (char *) alloca (__len); \ -+ __out[__len-1] = '\0'; \ -+ (char *) memcpy (__out, __in, __len-1);})) -+#endif -+ - /* Name and version of program. */ - ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; - diff --git a/repo/system/glew/glew.xibuild b/repo/system/glew/glew.xibuild index 7ad27fe..fcace5f 100644 --- a/repo/system/glew/glew.xibuild +++ b/repo/system/glew/glew.xibuild @@ -11,10 +11,10 @@ SOURCE="https://downloads.sourceforge.net/glew/glew-$PKG_VER.tgz" ADDITIONAL="glew.patch " build () { - make PREFIX=/usr + make GLEW_DEST=$PKG_DEST } package () { - mkdir -p $PKG_DEST/usr/lib64 - make PREFIX=/usr DESTDIR=$PKG_DEST install + make GLEW_DEST=$PKG_DEST/usr install + mv $PKG_DEST/usr/lib64/* $PKG_DEST/usr/lib/ } diff --git a/repo/system/glu/glu.xibuild b/repo/system/glu/glu.xibuild index 54249a7..edac51c 100644 --- a/repo/system/glu/glu.xibuild +++ b/repo/system/glu/glu.xibuild @@ -4,7 +4,7 @@ NAME="glu" DESC="Mesa OpenGL Utility library" MAKEDEPS="meson ninja " -DEPS="mesa opengl" +DEPS="mesa" PKG_VER=9.0.2 SOURCE="https://mesa.freedesktop.org/archive/glu/glu-$PKG_VER.tar.xz" diff --git a/repo/system/imlib2/imlib2.xibuild b/repo/system/imlib2/imlib2.xibuild index 9ed5b15..2660b90 100644 --- a/repo/system/imlib2/imlib2.xibuild +++ b/repo/system/imlib2/imlib2.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make" -DEPS="tiff giflib bzip2 freetype2 libxext libpng libid3tag libjpeg-turbo libwebp libheif librsvg xz" +DEPS="tiff giflib bzip2 freetype2 libxext libpng libid3tag libjpeg-turbo libwebp libheif xz librsvg" PKG_VER=1.8.0 SOURCE=https://downloads.sourceforge.net/enlightenment/imlib2-$PKG_VER.tar.xz diff --git a/repo/system/js78/disable-jslint.patch b/repo/system/js78/disable-jslint.patch new file mode 100644 index 0000000..04a8b3e --- /dev/null +++ b/repo/system/js78/disable-jslint.patch @@ -0,0 +1,17 @@ +--- a/js/src/build/moz.build ++++ b/js/src/build/moz.build +@@ -80,14 +80,3 @@ + NO_EXPAND_LIBS = True + + DIST_INSTALL = True +- +-# Run SpiderMonkey style checker after linking the static library. This avoids +-# running the script for no-op builds. +-GeneratedFile( +- 'spidermonkey_checks', script='/config/run_spidermonkey_checks.py', +- inputs=[ +- '!%sjs_static.%s' % (CONFIG['LIB_PREFIX'], CONFIG['LIB_SUFFIX']), +- '/config/check_spidermonkey_style.py', +- '/config/check_macroassembler_style.py', +- '/config/check_js_opcode.py' +- ]) diff --git a/repo/system/js78/fd6847c9416f9eebde636e21d794d25d1be8791d.patch b/repo/system/js78/fd6847c9416f9eebde636e21d794d25d1be8791d.patch new file mode 100644 index 0000000..1af68d9 --- /dev/null +++ b/repo/system/js78/fd6847c9416f9eebde636e21d794d25d1be8791d.patch @@ -0,0 +1,37 @@ +See https://bugzilla.mozilla.org/show_bug.cgi?id=1539739 + +From fd6847c9416f9eebde636e21d794d25d1be8791d Mon Sep 17 00:00:00 2001 +From: Mike Hommey +Date: Sat, 1 Jun 2019 09:06:01 +0900 +Subject: [PATCH] Bug 1526653 - Include struct definitions for user_vfp and + user_vfp_exc. + +--- + js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp +index 636537f8478..383c380f04c 100644 +--- a/js/src/wasm/WasmSignalHandlers.cpp ++++ b/js/src/wasm/WasmSignalHandlers.cpp +@@ -248,7 +248,16 @@ using mozilla::DebugOnly; + #endif + + #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS +-# include ++struct user_vfp { ++ unsigned long long fpregs[32]; ++ unsigned long fpscr; ++}; ++ ++struct user_vfp_exc { ++ unsigned long fpexc; ++ unsigned long fpinst; ++ unsigned long fpinst2; ++}; + #endif + + #if defined(ANDROID) +-- +2.20.1 + diff --git a/repo/system/js78/fix-musl-build.patch b/repo/system/js78/fix-musl-build.patch new file mode 100644 index 0000000..af39467 --- /dev/null +++ b/repo/system/js78/fix-musl-build.patch @@ -0,0 +1,16 @@ +Upstream: No +Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD: +https://github.com/void-linux/void-packages/issues/2598 +diff --git a/js/src/old-configure.in b/js/src/old-configure.in +--- a/js/src/old-configure.in ++++ b/js/src/old-configure.in +@@ -1272,6 +1272,9 @@ + *-android*|*-linuxandroid*) + : + ;; ++ *-musl*) ++ : ++ ;; + *) + AC_DEFINE(HAVE_THREAD_TLS_KEYWORD) + ;; diff --git a/repo/system/js78/fix-python3.10-compilation.patch b/repo/system/js78/fix-python3.10-compilation.patch new file mode 100644 index 0000000..4473d9b --- /dev/null +++ b/repo/system/js78/fix-python3.10-compilation.patch @@ -0,0 +1,312 @@ +#https://src.fedoraproject.org/rpms/mozjs78/blob/rawhide/f/Fixup-compatibility-of-mozbuild-with-Python-3.10.patch + +m a88d0c8e27b48344942187c2611bb121bde9332d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= +Date: Tue, 13 Jul 2021 11:46:20 +0200 +Subject: [PATCH] Fixup compatibility of mozbuild with Python 3.10 + +--- + python/mach/mach/config.py | 4 ++-- + python/mach/mach/main.py | 4 ++-- + python/mach/mach/decorators.py | 2 +- + python/mozbuild/mozbuild/backend/configenvironment.py | 3 ++- + python/mozbuild/mozbuild/makeutil.py | 2 +- + python/mozbuild/mozbuild/util.py | 2 +- + testing/marionette/client/marionette_driver/wait.py | 2 +- + testing/mozbase/manifestparser/manifestparser/filters.py | 3 ++- + testing/mozbase/versioninfo.py | 2 +- + testing/web-platform/tests/tools/manifest/vcs.py | 2 +- + .../web-platform/tests/tools/third_party/h2/h2/settings.py | 2 +- + .../tests/tools/third_party/html5lib/html5lib/_trie/_base.py | 2 +- + .../tools/third_party/html5lib/html5lib/treebuilders/dom.py | 2 +- + .../tests/tools/third_party/hyper/hyper/common/headers.py | 2 +- + .../tests/tools/third_party/hyper/hyper/h2/settings.py | 2 +- + .../tests/tools/third_party/hyper/hyper/http11/connection.py | 4 ++-- + .../third_party/hyper/hyper/packages/hyperframe/flags.py | 2 +- + .../tests/tools/third_party/hyperframe/hyperframe/flags.py | 2 +- + testing/web-platform/tests/tools/wptserve/wptserve/config.py | 3 ++- + testing/web-platform/tests/webdriver/tests/support/sync.py | 2 +- + 19 files changed, 24 insertions(+), 21 deletions(-) + +diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py +index 7210eca82..edb4d2e93 100644 +--- a/python/mach/mach/config.py ++++ b/python/mach/mach/config.py +@@ -144,7 +144,7 @@ def reraise_attribute_error(func): + return _ + + +-class ConfigSettings(collections.Mapping): ++class ConfigSettings(collections.abc.Mapping): + """Interface for configuration settings. + + This is the main interface to the configuration. +@@ -190,7 +190,7 @@ class ConfigSettings(collections.Mapping): + will result in exceptions being raised. + """ + +- class ConfigSection(collections.MutableMapping, object): ++ class ConfigSection(collections.abc.MutableMapping, object): + """Represents an individual config section.""" + def __init__(self, config, name, settings): + object.__setattr__(self, '_config', config) +diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py +index 27f7f34a6..5f63271a3 100644 +--- a/python/mach/mach/decorators.py ++++ b/python/mach/mach/decorators.py +@@ -140,7 +140,7 @@ def CommandProvider(cls): + 'Conditions argument must take a list ' + \ + 'of functions. Found %s instead.' + +- if not isinstance(command.conditions, collections.Iterable): ++ if not isinstance(command.conditions, collections.abc.Iterable): + msg = msg % (command.name, type(command.conditions)) + raise MachError(msg) + +--- a/python/mach/mach/main.py ++++ b/python/mach/mach/main.py +@@ -16,7 +16,7 @@ + import sys + import traceback + import uuid +-from collections import Iterable ++from collections.abc import Iterable + + from six import string_types + +diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py +index 20d1a9fa6..8747958bd 100644 +--- a/python/mozbuild/mozbuild/backend/configenvironment.py ++++ b/python/mozbuild/mozbuild/backend/configenvironment.py +@@ -9,7 +9,8 @@ import six + import sys + import json + +-from collections import Iterable, OrderedDict ++from collections import OrderedDict ++from collections.abc import Iterable + from types import ModuleType + + import mozpack.path as mozpath +diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py +index 4da1a3b26..4ce56848c 100644 +--- a/python/mozbuild/mozbuild/makeutil.py ++++ b/python/mozbuild/mozbuild/makeutil.py +@@ -7,7 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals + import os + import re + import six +-from collections import Iterable ++from collections.abc import Iterable + + + class Makefile(object): +diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py +index 044cf645c..98ed3ef52 100644 +--- a/python/mozbuild/mozbuild/util.py ++++ b/python/mozbuild/mozbuild/util.py +@@ -782,7 +782,7 @@ class HierarchicalStringList(object): + self._strings = StrictOrderingOnAppendList() + self._children = {} + +- class StringListAdaptor(collections.Sequence): ++ class StringListAdaptor(collections.abc.Sequence): + def __init__(self, hsl): + self._hsl = hsl + +diff --git a/testing/marionette/client/marionette_driver/wait.py b/testing/marionette/client/marionette_driver/wait.py +index eeaa1e23d..c147f463f 100644 +--- a/testing/marionette/client/marionette_driver/wait.py ++++ b/testing/marionette/client/marionette_driver/wait.py +@@ -82,7 +82,7 @@ class Wait(object): + + exceptions = [] + if ignored_exceptions is not None: +- if isinstance(ignored_exceptions, collections.Iterable): ++ if isinstance(ignored_exceptions, collections.abc.Iterable): + exceptions.extend(iter(ignored_exceptions)) + else: + exceptions.append(ignored_exceptions) +diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py +index 287ee033b..b1d608003 100644 +--- a/testing/mozbase/manifestparser/manifestparser/filters.py ++++ b/testing/mozbase/manifestparser/manifestparser/filters.py +@@ -12,7 +12,8 @@ from __future__ import absolute_import + + import itertools + import os +-from collections import defaultdict, MutableSequence ++from collections import defaultdict ++from collections.abc import MutableSequence + + import six + from six import string_types +diff --git a/testing/mozbase/versioninfo.py b/testing/mozbase/versioninfo.py +index 91d1a0473..8c1680069 100755 +--- a/testing/mozbase/versioninfo.py ++++ b/testing/mozbase/versioninfo.py +@@ -11,7 +11,7 @@ from commit messages. + + from __future__ import absolute_import, print_function + +-from collections import Iterable ++from collections.abc import Iterable + from distutils.version import StrictVersion + import argparse + import os +diff --git a/testing/web-platform/tests/tools/manifest/vcs.py b/testing/web-platform/tests/tools/manifest/vcs.py +index 7c0feeb81..05ee19c7c 100644 +--- a/testing/web-platform/tests/tools/manifest/vcs.py ++++ b/testing/web-platform/tests/tools/manifest/vcs.py +@@ -3,7 +3,7 @@ import json + import os + import stat + from collections import deque +-from collections import MutableMapping ++from collections.abc import MutableMapping + + from six import with_metaclass, PY2 + +diff --git a/testing/web-platform/tests/tools/third_party/h2/h2/settings.py b/testing/web-platform/tests/tools/third_party/h2/h2/settings.py +index 3da720329..e097630e9 100644 +--- a/testing/web-platform/tests/tools/third_party/h2/h2/settings.py ++++ b/testing/web-platform/tests/tools/third_party/h2/h2/settings.py +@@ -88,7 +88,7 @@ class ChangedSetting: + ) + + +-class Settings(collections.MutableMapping): ++class Settings(collections.abc.MutableMapping): + """ + An object that encapsulates HTTP/2 settings state. + +diff --git a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py +index a1158bbbf..a9295a2ba 100644 +--- a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py ++++ b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py +@@ -1,6 +1,6 @@ + from __future__ import absolute_import, division, unicode_literals + +-from collections import Mapping ++from collections.abc import Mapping + + + class Trie(Mapping): +diff --git a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py +index dcfac220b..818a33433 100644 +--- a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py ++++ b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py +@@ -1,7 +1,7 @@ + from __future__ import absolute_import, division, unicode_literals + + +-from collections import MutableMapping ++from collections.abc import MutableMapping + from xml.dom import minidom, Node + import weakref + +diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py +index 655a591ac..6454f550a 100644 +--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py ++++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py +@@ -10,7 +10,7 @@ import collections + from hyper.common.util import to_bytestring, to_bytestring_tuple + + +-class HTTPHeaderMap(collections.MutableMapping): ++class HTTPHeaderMap(collections.abc.MutableMapping): + """ + A structure that contains HTTP headers. + +diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py +index fedc5e3c4..040afea92 100755 +--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py ++++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py +@@ -151,7 +151,7 @@ class ChangedSetting: + ) + + +-class Settings(collections.MutableMapping): ++class Settings(collections.abc.MutableMapping): + """ + An object that encapsulates HTTP/2 settings state. + +diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py +index 61361c358..a214311d2 100644 +--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py ++++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py +@@ -10,7 +10,7 @@ import os + import socket + import base64 + +-from collections import Iterable, Mapping ++from collections.abc import Iterable, Mapping + + import collections + from hyperframe.frame import SettingsFrame +@@ -295,7 +295,7 @@ class HTTP11Connection(object): + return + + # Iterables that set a specific content length. +- elif isinstance(body, collections.Iterable): ++ elif isinstance(body, collections.abc.Iterable): + for item in body: + try: + self._sock.send(item) +diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py +index e8f630056..8f2ea689b 100644 +--- a/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py ++++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py +@@ -11,7 +11,7 @@ import collections + Flag = collections.namedtuple("Flag", ["name", "bit"]) + + +-class Flags(collections.MutableSet): ++class Flags(collections.abc.MutableSet): + """ + A simple MutableSet implementation that will only accept known flags as elements. + +diff --git a/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py b/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py +index 05b35017e..14c352e10 100644 +--- a/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py ++++ b/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py +@@ -11,7 +11,7 @@ import collections + Flag = collections.namedtuple("Flag", ["name", "bit"]) + + +-class Flags(collections.MutableSet): ++class Flags(collections.abc.MutableSet): + """ + A simple MutableSet implementation that will only accept known flags as + elements. +diff --git a/testing/web-platform/tests/tools/wptserve/wptserve/config.py b/testing/web-platform/tests/tools/wptserve/wptserve/config.py +index 7766565fe..3c1c36d6f 100644 +--- a/testing/web-platform/tests/tools/wptserve/wptserve/config.py ++++ b/testing/web-platform/tests/tools/wptserve/wptserve/config.py +@@ -2,7 +2,8 @@ import copy + import logging + import os + +-from collections import defaultdict, Mapping ++from collections import defaultdict ++from collections.abc import Mapping + from six import integer_types, iteritems, itervalues, string_types + + from . import sslutils +diff --git a/testing/web-platform/tests/webdriver/tests/support/sync.py b/testing/web-platform/tests/webdriver/tests/support/sync.py +index 3fc77131c..8e8f6b819 100644 +--- a/testing/web-platform/tests/webdriver/tests/support/sync.py ++++ b/testing/web-platform/tests/webdriver/tests/support/sync.py +@@ -81,7 +81,7 @@ class Poll(object): + + exceptions = [] + if ignored_exceptions is not None: +- if isinstance(ignored_exceptions, collections.Iterable): ++ if isinstance(ignored_exceptions, collections.abc.Iterable): + exceptions.extend(iter(ignored_exceptions)) + else: + exceptions.append(ignored_exceptions) +-- +2.31.1 + + diff --git a/repo/system/js78/fix-rust-target.patch b/repo/system/js78/fix-rust-target.patch new file mode 100644 index 0000000..f1a98df --- /dev/null +++ b/repo/system/js78/fix-rust-target.patch @@ -0,0 +1,15 @@ +Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's +weird custom build system... + +diff -upr firefox-68.9.0.orig/build/moz.configure/rust.configure firefox-68.9.0/build/moz.configure/rust.configure +--- firefox-68.9.0.orig/build/moz.configure/rust.configure 2020-06-02 22:54:39.982616128 +0200 ++++ firefox-68.9.0/build/moz.configure/rust.configure 2020-06-02 23:08:37.656332899 +0200 +@@ -345,7 +345,7 @@ def rust_triple_alias(host_or_target): + + return None + +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ['RUST_TARGET'] + + if rustc_target is None: + die("Don't know how to translate {} for rustc".format( diff --git a/repo/system/js78/fix-rust-target.patch.1 b/repo/system/js78/fix-rust-target.patch.1 new file mode 100644 index 0000000..f1a98df --- /dev/null +++ b/repo/system/js78/fix-rust-target.patch.1 @@ -0,0 +1,15 @@ +Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's +weird custom build system... + +diff -upr firefox-68.9.0.orig/build/moz.configure/rust.configure firefox-68.9.0/build/moz.configure/rust.configure +--- firefox-68.9.0.orig/build/moz.configure/rust.configure 2020-06-02 22:54:39.982616128 +0200 ++++ firefox-68.9.0/build/moz.configure/rust.configure 2020-06-02 23:08:37.656332899 +0200 +@@ -345,7 +345,7 @@ def rust_triple_alias(host_or_target): + + return None + +- rustc_target = find_candidate(candidates) ++ rustc_target = os.environ['RUST_TARGET'] + + if rustc_target is None: + die("Don't know how to translate {} for rustc".format( diff --git a/repo/system/js78/js78.xibuild b/repo/system/js78/js78.xibuild index 199740a..9e553ed 100644 --- a/repo/system/js78/js78.xibuild +++ b/repo/system/js78/js78.xibuild @@ -1,15 +1,16 @@ #!/bin/sh -MAKEDEPS="gcc autoconf2-13 icu rustc zlib which zip clang llvm patch make python-six python-mach" +MAKEDEPS="gcc autoconf2-13 icu rust zlib which zip clang llvm patch make python-six python-mach" DEPS="readline nspr bash zlib" PKG_VER=78.15.0 SOURCE=https://archive.mozilla.org/pub/firefox/releases/${PKG_VER}esr/source/firefox-${PKG_VER}esr.source.tar.xz ADDITIONAL=" - patches/disable-jslint.patch - patches/fd6847c9416f9eebde636e21d794d25d1be8791d.patch - patches/fix-musl-build.patch - patches/fix-python3.10-compilation.patch + disable-jslint.patch + fd6847c9416f9eebde636e21d794d25d1be8791d.patch + fix-musl-build.patch + fix-python3.10-compilation.patch + fix-rust-target.patch " DESC="JavaScript interpreter and libraries - Version 78" @@ -19,9 +20,8 @@ prepare () { export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576" mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm - export PATH=/opt/rustc/bin:$PATH - export LD_LIBRARY_PATH=/opt/rustc/lib:$LD_LIBRARY_PATH - export RUST_TARGET="x86_64" + export RUST_TARGET="x86_64-unknown-linux-musl" + export CFLAGS="$CFLAGS -no-pie" CXXFLAGS="$CXXFLAGS -no-pie" } build () { @@ -31,7 +31,6 @@ build () { SHELL=/bin/bash PYTHON=/usr/bin/python3 \ ../js/src/configure --prefix=/usr \ --with-intl-api \ - --with-libclang-path=/usr/lib \ --with-system-icu \ --with-system-nspr \ --with-system-zlib \ @@ -48,7 +47,6 @@ build () { --disable-jemalloc \ --disable-strip - make } diff --git a/repo/system/js78/patches/disable-jslint.patch b/repo/system/js78/patches/disable-jslint.patch deleted file mode 100644 index 04a8b3e..0000000 --- a/repo/system/js78/patches/disable-jslint.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/js/src/build/moz.build -+++ b/js/src/build/moz.build -@@ -80,14 +80,3 @@ - NO_EXPAND_LIBS = True - - DIST_INSTALL = True -- --# Run SpiderMonkey style checker after linking the static library. This avoids --# running the script for no-op builds. --GeneratedFile( -- 'spidermonkey_checks', script='/config/run_spidermonkey_checks.py', -- inputs=[ -- '!%sjs_static.%s' % (CONFIG['LIB_PREFIX'], CONFIG['LIB_SUFFIX']), -- '/config/check_spidermonkey_style.py', -- '/config/check_macroassembler_style.py', -- '/config/check_js_opcode.py' -- ]) diff --git a/repo/system/js78/patches/fd6847c9416f9eebde636e21d794d25d1be8791d.patch b/repo/system/js78/patches/fd6847c9416f9eebde636e21d794d25d1be8791d.patch deleted file mode 100644 index 1af68d9..0000000 --- a/repo/system/js78/patches/fd6847c9416f9eebde636e21d794d25d1be8791d.patch +++ /dev/null @@ -1,37 +0,0 @@ -See https://bugzilla.mozilla.org/show_bug.cgi?id=1539739 - -From fd6847c9416f9eebde636e21d794d25d1be8791d Mon Sep 17 00:00:00 2001 -From: Mike Hommey -Date: Sat, 1 Jun 2019 09:06:01 +0900 -Subject: [PATCH] Bug 1526653 - Include struct definitions for user_vfp and - user_vfp_exc. - ---- - js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp -index 636537f8478..383c380f04c 100644 ---- a/js/src/wasm/WasmSignalHandlers.cpp -+++ b/js/src/wasm/WasmSignalHandlers.cpp -@@ -248,7 +248,16 @@ using mozilla::DebugOnly; - #endif - - #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS --# include -+struct user_vfp { -+ unsigned long long fpregs[32]; -+ unsigned long fpscr; -+}; -+ -+struct user_vfp_exc { -+ unsigned long fpexc; -+ unsigned long fpinst; -+ unsigned long fpinst2; -+}; - #endif - - #if defined(ANDROID) --- -2.20.1 - diff --git a/repo/system/js78/patches/fix-musl-build.patch b/repo/system/js78/patches/fix-musl-build.patch deleted file mode 100644 index af39467..0000000 --- a/repo/system/js78/patches/fix-musl-build.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream: No -Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD: -https://github.com/void-linux/void-packages/issues/2598 -diff --git a/js/src/old-configure.in b/js/src/old-configure.in ---- a/js/src/old-configure.in -+++ b/js/src/old-configure.in -@@ -1272,6 +1272,9 @@ - *-android*|*-linuxandroid*) - : - ;; -+ *-musl*) -+ : -+ ;; - *) - AC_DEFINE(HAVE_THREAD_TLS_KEYWORD) - ;; diff --git a/repo/system/js78/patches/fix-python3.10-compilation.patch b/repo/system/js78/patches/fix-python3.10-compilation.patch deleted file mode 100644 index 4473d9b..0000000 --- a/repo/system/js78/patches/fix-python3.10-compilation.patch +++ /dev/null @@ -1,312 +0,0 @@ -#https://src.fedoraproject.org/rpms/mozjs78/blob/rawhide/f/Fixup-compatibility-of-mozbuild-with-Python-3.10.patch - -m a88d0c8e27b48344942187c2611bb121bde9332d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= -Date: Tue, 13 Jul 2021 11:46:20 +0200 -Subject: [PATCH] Fixup compatibility of mozbuild with Python 3.10 - ---- - python/mach/mach/config.py | 4 ++-- - python/mach/mach/main.py | 4 ++-- - python/mach/mach/decorators.py | 2 +- - python/mozbuild/mozbuild/backend/configenvironment.py | 3 ++- - python/mozbuild/mozbuild/makeutil.py | 2 +- - python/mozbuild/mozbuild/util.py | 2 +- - testing/marionette/client/marionette_driver/wait.py | 2 +- - testing/mozbase/manifestparser/manifestparser/filters.py | 3 ++- - testing/mozbase/versioninfo.py | 2 +- - testing/web-platform/tests/tools/manifest/vcs.py | 2 +- - .../web-platform/tests/tools/third_party/h2/h2/settings.py | 2 +- - .../tests/tools/third_party/html5lib/html5lib/_trie/_base.py | 2 +- - .../tools/third_party/html5lib/html5lib/treebuilders/dom.py | 2 +- - .../tests/tools/third_party/hyper/hyper/common/headers.py | 2 +- - .../tests/tools/third_party/hyper/hyper/h2/settings.py | 2 +- - .../tests/tools/third_party/hyper/hyper/http11/connection.py | 4 ++-- - .../third_party/hyper/hyper/packages/hyperframe/flags.py | 2 +- - .../tests/tools/third_party/hyperframe/hyperframe/flags.py | 2 +- - testing/web-platform/tests/tools/wptserve/wptserve/config.py | 3 ++- - testing/web-platform/tests/webdriver/tests/support/sync.py | 2 +- - 19 files changed, 24 insertions(+), 21 deletions(-) - -diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py -index 7210eca82..edb4d2e93 100644 ---- a/python/mach/mach/config.py -+++ b/python/mach/mach/config.py -@@ -144,7 +144,7 @@ def reraise_attribute_error(func): - return _ - - --class ConfigSettings(collections.Mapping): -+class ConfigSettings(collections.abc.Mapping): - """Interface for configuration settings. - - This is the main interface to the configuration. -@@ -190,7 +190,7 @@ class ConfigSettings(collections.Mapping): - will result in exceptions being raised. - """ - -- class ConfigSection(collections.MutableMapping, object): -+ class ConfigSection(collections.abc.MutableMapping, object): - """Represents an individual config section.""" - def __init__(self, config, name, settings): - object.__setattr__(self, '_config', config) -diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py -index 27f7f34a6..5f63271a3 100644 ---- a/python/mach/mach/decorators.py -+++ b/python/mach/mach/decorators.py -@@ -140,7 +140,7 @@ def CommandProvider(cls): - 'Conditions argument must take a list ' + \ - 'of functions. Found %s instead.' - -- if not isinstance(command.conditions, collections.Iterable): -+ if not isinstance(command.conditions, collections.abc.Iterable): - msg = msg % (command.name, type(command.conditions)) - raise MachError(msg) - ---- a/python/mach/mach/main.py -+++ b/python/mach/mach/main.py -@@ -16,7 +16,7 @@ - import sys - import traceback - import uuid --from collections import Iterable -+from collections.abc import Iterable - - from six import string_types - -diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py -index 20d1a9fa6..8747958bd 100644 ---- a/python/mozbuild/mozbuild/backend/configenvironment.py -+++ b/python/mozbuild/mozbuild/backend/configenvironment.py -@@ -9,7 +9,8 @@ import six - import sys - import json - --from collections import Iterable, OrderedDict -+from collections import OrderedDict -+from collections.abc import Iterable - from types import ModuleType - - import mozpack.path as mozpath -diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py -index 4da1a3b26..4ce56848c 100644 ---- a/python/mozbuild/mozbuild/makeutil.py -+++ b/python/mozbuild/mozbuild/makeutil.py -@@ -7,7 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals - import os - import re - import six --from collections import Iterable -+from collections.abc import Iterable - - - class Makefile(object): -diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py -index 044cf645c..98ed3ef52 100644 ---- a/python/mozbuild/mozbuild/util.py -+++ b/python/mozbuild/mozbuild/util.py -@@ -782,7 +782,7 @@ class HierarchicalStringList(object): - self._strings = StrictOrderingOnAppendList() - self._children = {} - -- class StringListAdaptor(collections.Sequence): -+ class StringListAdaptor(collections.abc.Sequence): - def __init__(self, hsl): - self._hsl = hsl - -diff --git a/testing/marionette/client/marionette_driver/wait.py b/testing/marionette/client/marionette_driver/wait.py -index eeaa1e23d..c147f463f 100644 ---- a/testing/marionette/client/marionette_driver/wait.py -+++ b/testing/marionette/client/marionette_driver/wait.py -@@ -82,7 +82,7 @@ class Wait(object): - - exceptions = [] - if ignored_exceptions is not None: -- if isinstance(ignored_exceptions, collections.Iterable): -+ if isinstance(ignored_exceptions, collections.abc.Iterable): - exceptions.extend(iter(ignored_exceptions)) - else: - exceptions.append(ignored_exceptions) -diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py -index 287ee033b..b1d608003 100644 ---- a/testing/mozbase/manifestparser/manifestparser/filters.py -+++ b/testing/mozbase/manifestparser/manifestparser/filters.py -@@ -12,7 +12,8 @@ from __future__ import absolute_import - - import itertools - import os --from collections import defaultdict, MutableSequence -+from collections import defaultdict -+from collections.abc import MutableSequence - - import six - from six import string_types -diff --git a/testing/mozbase/versioninfo.py b/testing/mozbase/versioninfo.py -index 91d1a0473..8c1680069 100755 ---- a/testing/mozbase/versioninfo.py -+++ b/testing/mozbase/versioninfo.py -@@ -11,7 +11,7 @@ from commit messages. - - from __future__ import absolute_import, print_function - --from collections import Iterable -+from collections.abc import Iterable - from distutils.version import StrictVersion - import argparse - import os -diff --git a/testing/web-platform/tests/tools/manifest/vcs.py b/testing/web-platform/tests/tools/manifest/vcs.py -index 7c0feeb81..05ee19c7c 100644 ---- a/testing/web-platform/tests/tools/manifest/vcs.py -+++ b/testing/web-platform/tests/tools/manifest/vcs.py -@@ -3,7 +3,7 @@ import json - import os - import stat - from collections import deque --from collections import MutableMapping -+from collections.abc import MutableMapping - - from six import with_metaclass, PY2 - -diff --git a/testing/web-platform/tests/tools/third_party/h2/h2/settings.py b/testing/web-platform/tests/tools/third_party/h2/h2/settings.py -index 3da720329..e097630e9 100644 ---- a/testing/web-platform/tests/tools/third_party/h2/h2/settings.py -+++ b/testing/web-platform/tests/tools/third_party/h2/h2/settings.py -@@ -88,7 +88,7 @@ class ChangedSetting: - ) - - --class Settings(collections.MutableMapping): -+class Settings(collections.abc.MutableMapping): - """ - An object that encapsulates HTTP/2 settings state. - -diff --git a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py -index a1158bbbf..a9295a2ba 100644 ---- a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py -+++ b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/_base.py -@@ -1,6 +1,6 @@ - from __future__ import absolute_import, division, unicode_literals - --from collections import Mapping -+from collections.abc import Mapping - - - class Trie(Mapping): -diff --git a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py -index dcfac220b..818a33433 100644 ---- a/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py -+++ b/testing/web-platform/tests/tools/third_party/html5lib/html5lib/treebuilders/dom.py -@@ -1,7 +1,7 @@ - from __future__ import absolute_import, division, unicode_literals - - --from collections import MutableMapping -+from collections.abc import MutableMapping - from xml.dom import minidom, Node - import weakref - -diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py -index 655a591ac..6454f550a 100644 ---- a/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py -+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/common/headers.py -@@ -10,7 +10,7 @@ import collections - from hyper.common.util import to_bytestring, to_bytestring_tuple - - --class HTTPHeaderMap(collections.MutableMapping): -+class HTTPHeaderMap(collections.abc.MutableMapping): - """ - A structure that contains HTTP headers. - -diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py -index fedc5e3c4..040afea92 100755 ---- a/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py -+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/h2/settings.py -@@ -151,7 +151,7 @@ class ChangedSetting: - ) - - --class Settings(collections.MutableMapping): -+class Settings(collections.abc.MutableMapping): - """ - An object that encapsulates HTTP/2 settings state. - -diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py -index 61361c358..a214311d2 100644 ---- a/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py -+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/http11/connection.py -@@ -10,7 +10,7 @@ import os - import socket - import base64 - --from collections import Iterable, Mapping -+from collections.abc import Iterable, Mapping - - import collections - from hyperframe.frame import SettingsFrame -@@ -295,7 +295,7 @@ class HTTP11Connection(object): - return - - # Iterables that set a specific content length. -- elif isinstance(body, collections.Iterable): -+ elif isinstance(body, collections.abc.Iterable): - for item in body: - try: - self._sock.send(item) -diff --git a/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py b/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py -index e8f630056..8f2ea689b 100644 ---- a/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py -+++ b/testing/web-platform/tests/tools/third_party/hyper/hyper/packages/hyperframe/flags.py -@@ -11,7 +11,7 @@ import collections - Flag = collections.namedtuple("Flag", ["name", "bit"]) - - --class Flags(collections.MutableSet): -+class Flags(collections.abc.MutableSet): - """ - A simple MutableSet implementation that will only accept known flags as elements. - -diff --git a/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py b/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py -index 05b35017e..14c352e10 100644 ---- a/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py -+++ b/testing/web-platform/tests/tools/third_party/hyperframe/hyperframe/flags.py -@@ -11,7 +11,7 @@ import collections - Flag = collections.namedtuple("Flag", ["name", "bit"]) - - --class Flags(collections.MutableSet): -+class Flags(collections.abc.MutableSet): - """ - A simple MutableSet implementation that will only accept known flags as - elements. -diff --git a/testing/web-platform/tests/tools/wptserve/wptserve/config.py b/testing/web-platform/tests/tools/wptserve/wptserve/config.py -index 7766565fe..3c1c36d6f 100644 ---- a/testing/web-platform/tests/tools/wptserve/wptserve/config.py -+++ b/testing/web-platform/tests/tools/wptserve/wptserve/config.py -@@ -2,7 +2,8 @@ import copy - import logging - import os - --from collections import defaultdict, Mapping -+from collections import defaultdict -+from collections.abc import Mapping - from six import integer_types, iteritems, itervalues, string_types - - from . import sslutils -diff --git a/testing/web-platform/tests/webdriver/tests/support/sync.py b/testing/web-platform/tests/webdriver/tests/support/sync.py -index 3fc77131c..8e8f6b819 100644 ---- a/testing/web-platform/tests/webdriver/tests/support/sync.py -+++ b/testing/web-platform/tests/webdriver/tests/support/sync.py -@@ -81,7 +81,7 @@ class Poll(object): - - exceptions = [] - if ignored_exceptions is not None: -- if isinstance(ignored_exceptions, collections.Iterable): -+ if isinstance(ignored_exceptions, collections.abc.Iterable): - exceptions.extend(iter(ignored_exceptions)) - else: - exceptions.append(ignored_exceptions) --- -2.31.1 - - diff --git a/repo/system/js78/patches/fix-rust-target.patch b/repo/system/js78/patches/fix-rust-target.patch deleted file mode 100644 index f1a98df..0000000 --- a/repo/system/js78/patches/fix-rust-target.patch +++ /dev/null @@ -1,15 +0,0 @@ -Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's -weird custom build system... - -diff -upr firefox-68.9.0.orig/build/moz.configure/rust.configure firefox-68.9.0/build/moz.configure/rust.configure ---- firefox-68.9.0.orig/build/moz.configure/rust.configure 2020-06-02 22:54:39.982616128 +0200 -+++ firefox-68.9.0/build/moz.configure/rust.configure 2020-06-02 23:08:37.656332899 +0200 -@@ -345,7 +345,7 @@ def rust_triple_alias(host_or_target): - - return None - -- rustc_target = find_candidate(candidates) -+ rustc_target = os.environ['RUST_TARGET'] - - if rustc_target is None: - die("Don't know how to translate {} for rustc".format( diff --git a/repo/system/libgudev/libgudev.xibuild b/repo/system/libgudev/libgudev.xibuild index a365c76..6237de9 100644 --- a/repo/system/libgudev/libgudev.xibuild +++ b/repo/system/libgudev/libgudev.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="meson" -DEPS="glib2 libudev" +DEPS="glib eudev" PKG_VER=237 SOURCE=https://download.gnome.org/sources/libgudev/$PKG_VER/libgudev-$PKG_VER.tar.xz diff --git a/repo/system/libptytty/libptytty.xibuild b/repo/system/libptytty/libptytty.xibuild index bc36364..19d5cc1 100644 --- a/repo/system/libptytty/libptytty.xibuild +++ b/repo/system/libptytty/libptytty.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="meson cmake" +MAKEDEPS="meson cmake utmps" DEPS="musl" PKG_VER=2.0 @@ -13,7 +13,9 @@ build () { cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ - -DPT_UTMP_FILE:STRING=/run/utmp \ + -DUTMP_SUPPORT=OFF \ + -DWTMP_SUPPORT=OFF \ + -DLASTLOG_SUPPORT=OFF \ .. && make diff --git a/repo/system/mime-types/mime-types.xibuild b/repo/system/mime-types/mime-types.xibuild new file mode 100644 index 0000000..d5d7274 --- /dev/null +++ b/repo/system/mime-types/mime-types.xibuild @@ -0,0 +1,19 @@ +#!/bin/sh + +NAME="mime-types" +DESC="Helper application for MIME types" + +MAKEDEPS="make " +DEPS="xterm " + +PKG_VER=2.1.53 +SOURCE="https://releases.pagure.org/mailcap/mailcap-$PKG_VER.tar.xz" + +prepare () { + sed -i 's/-Dpm/-Dm/' Makefile +} + +package () { + make PREFIX=/usr DESTDIR=$PKG_DEST install + rm -Rf $PKG_DEST/etc/nginx +} diff --git a/repo/system/pahole/pahole.xibuild b/repo/system/pahole/pahole.xibuild index 6b57291..821c4f5 100644 --- a/repo/system/pahole/pahole.xibuild +++ b/repo/system/pahole/pahole.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="cmake-modules python make " -DEPS="libelf python elfutils libdwarf musl-obstack argp-standalone libbpf" +DEPS="libelf python elfutils libdwarf musl-obstack argp-standalone" PKG_VER=1.22 SOURCE=https://git.kernel.org/pub/scm/devel/pahole/pahole.git diff --git a/repo/system/pcsc-lite/pcsc-lite.xibuild b/repo/system/pcsc-lite/pcsc-lite.xibuild index 86d86d1..b0d2e25 100644 --- a/repo/system/pcsc-lite/pcsc-lite.xibuild +++ b/repo/system/pcsc-lite/pcsc-lite.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make perl lipcap-ng" +MAKEDEPS="make perl libcap-ng" DEPS="musl sbase eudev" PKG_VER=1.9.4 diff --git a/repo/system/polkit/CVE-2021-4034.patch b/repo/system/polkit/CVE-2021-4034.patch new file mode 100644 index 0000000..a06300a --- /dev/null +++ b/repo/system/polkit/CVE-2021-4034.patch @@ -0,0 +1,79 @@ +From a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 Mon Sep 17 00:00:00 2001 +From: Jan Rybar +Date: Tue, 25 Jan 2022 17:21:46 +0000 +Subject: [PATCH] pkexec: local privilege escalation (CVE-2021-4034) + +--- + src/programs/pkcheck.c | 5 +++++ + src/programs/pkexec.c | 23 ++++++++++++++++++++--- + 2 files changed, 25 insertions(+), 3 deletions(-) + +diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c +index f1bb4e1..768525c 100644 +--- a/src/programs/pkcheck.c ++++ b/src/programs/pkcheck.c +@@ -363,6 +363,11 @@ main (int argc, char *argv[]) + local_agent_handle = NULL; + ret = 126; + ++ if (argc < 1) ++ { ++ exit(126); ++ } ++ + /* Disable remote file access from GIO. */ + setenv ("GIO_USE_VFS", "local", 1); + +diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c +index 7698c5c..84e5ef6 100644 +--- a/src/programs/pkexec.c ++++ b/src/programs/pkexec.c +@@ -488,6 +488,15 @@ main (int argc, char *argv[]) + pid_t pid_of_caller; + gpointer local_agent_handle; + ++ ++ /* ++ * If 'pkexec' is called THIS wrong, someone's probably evil-doing. Don't be nice, just bail out. ++ */ ++ if (argc<1) ++ { ++ exit(127); ++ } ++ + ret = 127; + authority = NULL; + subject = NULL; +@@ -614,10 +623,10 @@ main (int argc, char *argv[]) + + path = g_strdup (pwstruct.pw_shell); + if (!path) +- { ++ { + g_printerr ("No shell configured or error retrieving pw_shell\n"); + goto out; +- } ++ } + /* If you change this, be sure to change the if (!command_line) + case below too */ + command_line = g_strdup (path); +@@ -636,7 +645,15 @@ main (int argc, char *argv[]) + goto out; + } + g_free (path); +- argv[n] = path = s; ++ path = s; ++ ++ /* argc<2 and pkexec runs just shell, argv is guaranteed to be null-terminated. ++ * /-less shell shouldn't happen, but let's be defensive and don't write to null-termination ++ */ ++ if (argv[n] != NULL) ++ { ++ argv[n] = path; ++ } + } + if (access (path, F_OK) != 0) + { +-- +GitLab + diff --git a/repo/system/polkit/files/polkit-1 b/repo/system/polkit/files/polkit-1 deleted file mode 100644 index df1b69a..0000000 --- a/repo/system/polkit/files/polkit-1 +++ /dev/null @@ -1,9 +0,0 @@ -# Begin /etc/pam.d/polkit-1 - -auth include system-auth -account include system-account -password include system-password -session include system-session - -# End /etc/pam.d/polkit-1 - diff --git a/repo/system/polkit/make-innetgr-optional.patch b/repo/system/polkit/make-innetgr-optional.patch new file mode 100644 index 0000000..8459c67 --- /dev/null +++ b/repo/system/polkit/make-innetgr-optional.patch @@ -0,0 +1,239 @@ +See https://gitlab.freedesktop.org/polkit/polkit/merge_requests/10 + +From 778bb45e0e0cbabe2b04adf67a500af1dab09768 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Wed, 11 Jul 2018 04:54:26 -0500 +Subject: [PATCH] make netgroup support optional + +On at least Linux/musl and Linux/uclibc, netgroup support is not +available. PolKit fails to compile on these systems for that reason. + +This change makes netgroup support conditional on the presence of the +setnetgrent(3) function which is required for the support to work. If +that function is not available on the system, an error will be returned +to the administrator if unix-netgroup: is specified in configuration. + +Fixes bug 50145. + +Closes polkit/polkit#14. + +Signed-off-by: A. Wilcox +--- +diff --git a/configure.ac b/configure.ac +index 4ac2219..ca478df 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -100,7 +100,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], + [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) + AC_SUBST(EXPAT_LIBS) + +-AC_CHECK_FUNCS(clearenv fdatasync) ++AC_CHECK_FUNCS(clearenv fdatasync setnetgrent) + + if test "x$GCC" = "xyes"; then + LDFLAGS="-Wl,--as-needed $LDFLAGS" +diff --git a/src/polkit/polkitidentity.c b/src/polkit/polkitidentity.c +index 3aa1f7f..10e9c17 100644 +--- a/src/polkit/polkitidentity.c ++++ b/src/polkit/polkitidentity.c +@@ -182,7 +182,15 @@ polkit_identity_from_string (const gchar *str, + } + else if (g_str_has_prefix (str, "unix-netgroup:")) + { ++#ifndef HAVE_SETNETGRENT ++ g_set_error (error, ++ POLKIT_ERROR, ++ POLKIT_ERROR_FAILED, ++ "Netgroups are not available on this machine ('%s')", ++ str); ++#else + identity = polkit_unix_netgroup_new (str + sizeof "unix-netgroup:" - 1); ++#endif + } + + if (identity == NULL && (error != NULL && *error == NULL)) +@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVariant *variant, + GVariant *v; + const char *name; + ++#ifndef HAVE_SETNETGRENT ++ g_set_error (error, ++ POLKIT_ERROR, ++ POLKIT_ERROR_FAILED, ++ "Netgroups are not available on this machine"); ++ goto out; ++#else + v = lookup_asv (details_gvariant, "name", G_VARIANT_TYPE_STRING, error); + if (v == NULL) + { +@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVariant *variant, + name = g_variant_get_string (v, NULL); + ret = polkit_unix_netgroup_new (name); + g_variant_unref (v); ++#endif + } + else + { +diff --git a/src/polkit/polkitunixnetgroup.c b/src/polkit/polkitunixnetgroup.c +index 8a2b369..83f8d4a 100644 +--- a/src/polkit/polkitunixnetgroup.c ++++ b/src/polkit/polkitunixnetgroup.c +@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUnixNetgroup *group, + PolkitIdentity * + polkit_unix_netgroup_new (const gchar *name) + { ++#ifndef HAVE_SETNETGRENT ++ g_assert_not_reached(); ++#endif + g_return_val_if_fail (name != NULL, NULL); + return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_NETGROUP, + "name", name, +diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c +index 056d9a8..36c2f3d 100644 +--- a/src/polkitbackend/polkitbackendinteractiveauthority.c ++++ b/src/polkitbackend/polkitbackendinteractiveauthority.c +@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity *group, + GList *ret; + + ret = NULL; ++#ifdef HAVE_SETNETGRENT + name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group)); + +-#ifdef HAVE_SETNETGRENT_RETURN ++# ifdef HAVE_SETNETGRENT_RETURN + if (setnetgrent (name) == 0) + { + g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno)); + goto out; + } +-#else ++# else + setnetgrent (name); +-#endif ++# endif /* HAVE_SETNETGRENT_RETURN */ + + for (;;) + { +-#if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) ++# if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) + const char *hostname, *username, *domainname; +-#else ++# else + char *hostname, *username, *domainname; +-#endif ++# endif /* defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) */ + PolkitIdentity *user; + GError *error = NULL; + +@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity *group, + + out: + endnetgrent (); ++#endif /* HAVE_SETNETGRENT */ + return ret; + } + +diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp +index ca17108..da95180 100644 +--- a/src/polkitbackend/polkitbackendjsauthority.cpp ++++ b/src/polkitbackend/polkitbackendjsauthority.cpp +@@ -1520,6 +1520,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, + + JS::CallArgs args = JS::CallArgsFromVp (argc, vp); + ++#ifdef HAVE_SETNETGRENT + JS::RootedString usrstr (authority->priv->cx); + usrstr = args[0].toString(); + user = JS_EncodeStringToUTF8 (cx, usrstr); +@@ -1534,6 +1535,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, + { + is_in_netgroup = true; + } ++ #endif + + ret = true; + +diff --git a/test/polkit/polkitidentitytest.c b/test/polkit/polkitidentitytest.c +index e91967b..e829aaa 100644 +--- a/test/polkit/polkitidentitytest.c ++++ b/test/polkit/polkitidentitytest.c +@@ -19,6 +19,7 @@ + * Author: Nikki VonHollen + */ + ++#include "config.h" + #include "glib.h" + #include + #include +@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_test_data [] = { + {"unix-group:root", "unix-group:jane", FALSE}, + {"unix-group:jane", "unix-group:jane", TRUE}, + ++#ifdef HAVE_SETNETGRENT + {"unix-netgroup:foo", "unix-netgroup:foo", TRUE}, + {"unix-netgroup:foo", "unix-netgroup:bar", FALSE}, ++#endif + + {"unix-user:root", "unix-group:root", FALSE}, ++#ifdef HAVE_SETNETGRENT + {"unix-user:jane", "unix-netgroup:foo", FALSE}, ++#endif + + {NULL}, + }; +@@ -181,11 +186,13 @@ main (int argc, char *argv[]) + g_test_add_data_func ("/PolkitIdentity/group_string_2", "unix-group:jane", test_string); + g_test_add_data_func ("/PolkitIdentity/group_string_3", "unix-group:users", test_string); + ++#ifdef HAVE_SETNETGRENT + g_test_add_data_func ("/PolkitIdentity/netgroup_string", "unix-netgroup:foo", test_string); ++ g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); ++#endif + + g_test_add_data_func ("/PolkitIdentity/user_gvariant", "unix-user:root", test_gvariant); + g_test_add_data_func ("/PolkitIdentity/group_gvariant", "unix-group:root", test_gvariant); +- g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); + + add_comparison_tests (); + +diff --git a/test/polkit/polkitunixnetgrouptest.c b/test/polkit/polkitunixnetgrouptest.c +index 3701ba1..e3352eb 100644 +--- a/test/polkit/polkitunixnetgrouptest.c ++++ b/test/polkit/polkitunixnetgrouptest.c +@@ -19,6 +19,7 @@ + * Author: Nikki VonHollen + */ + ++#include "config.h" + #include "glib.h" + #include + #include +@@ -69,7 +70,9 @@ int + main (int argc, char *argv[]) + { + g_test_init (&argc, &argv, NULL); ++#ifdef HAVE_SETNETGRENT + g_test_add_func ("/PolkitUnixNetgroup/new", test_new); + g_test_add_func ("/PolkitUnixNetgroup/set_name", test_set_name); ++#endif + return g_test_run (); + } +diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c +index f97e0e0..fc52149 100644 +--- a/test/polkitbackend/test-polkitbackendjsauthority.c ++++ b/test/polkitbackend/test-polkitbackendjsauthority.c +@@ -137,12 +137,14 @@ test_get_admin_identities (void) + "unix-group:users" + } + }, ++#ifdef HAVE_SETNETGRENT + { + "net.company.action3", + { + "unix-netgroup:foo" + } + }, ++#endif + }; + guint n; + diff --git a/repo/system/polkit/patches/CVE-2021-4034.patch b/repo/system/polkit/patches/CVE-2021-4034.patch deleted file mode 100644 index a06300a..0000000 --- a/repo/system/polkit/patches/CVE-2021-4034.patch +++ /dev/null @@ -1,79 +0,0 @@ -From a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 Mon Sep 17 00:00:00 2001 -From: Jan Rybar -Date: Tue, 25 Jan 2022 17:21:46 +0000 -Subject: [PATCH] pkexec: local privilege escalation (CVE-2021-4034) - ---- - src/programs/pkcheck.c | 5 +++++ - src/programs/pkexec.c | 23 ++++++++++++++++++++--- - 2 files changed, 25 insertions(+), 3 deletions(-) - -diff --git a/src/programs/pkcheck.c b/src/programs/pkcheck.c -index f1bb4e1..768525c 100644 ---- a/src/programs/pkcheck.c -+++ b/src/programs/pkcheck.c -@@ -363,6 +363,11 @@ main (int argc, char *argv[]) - local_agent_handle = NULL; - ret = 126; - -+ if (argc < 1) -+ { -+ exit(126); -+ } -+ - /* Disable remote file access from GIO. */ - setenv ("GIO_USE_VFS", "local", 1); - -diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c -index 7698c5c..84e5ef6 100644 ---- a/src/programs/pkexec.c -+++ b/src/programs/pkexec.c -@@ -488,6 +488,15 @@ main (int argc, char *argv[]) - pid_t pid_of_caller; - gpointer local_agent_handle; - -+ -+ /* -+ * If 'pkexec' is called THIS wrong, someone's probably evil-doing. Don't be nice, just bail out. -+ */ -+ if (argc<1) -+ { -+ exit(127); -+ } -+ - ret = 127; - authority = NULL; - subject = NULL; -@@ -614,10 +623,10 @@ main (int argc, char *argv[]) - - path = g_strdup (pwstruct.pw_shell); - if (!path) -- { -+ { - g_printerr ("No shell configured or error retrieving pw_shell\n"); - goto out; -- } -+ } - /* If you change this, be sure to change the if (!command_line) - case below too */ - command_line = g_strdup (path); -@@ -636,7 +645,15 @@ main (int argc, char *argv[]) - goto out; - } - g_free (path); -- argv[n] = path = s; -+ path = s; -+ -+ /* argc<2 and pkexec runs just shell, argv is guaranteed to be null-terminated. -+ * /-less shell shouldn't happen, but let's be defensive and don't write to null-termination -+ */ -+ if (argv[n] != NULL) -+ { -+ argv[n] = path; -+ } - } - if (access (path, F_OK) != 0) - { --- -GitLab - diff --git a/repo/system/polkit/patches/make-innetgr-optional.patch b/repo/system/polkit/patches/make-innetgr-optional.patch deleted file mode 100644 index 8459c67..0000000 --- a/repo/system/polkit/patches/make-innetgr-optional.patch +++ /dev/null @@ -1,239 +0,0 @@ -See https://gitlab.freedesktop.org/polkit/polkit/merge_requests/10 - -From 778bb45e0e0cbabe2b04adf67a500af1dab09768 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" -Date: Wed, 11 Jul 2018 04:54:26 -0500 -Subject: [PATCH] make netgroup support optional - -On at least Linux/musl and Linux/uclibc, netgroup support is not -available. PolKit fails to compile on these systems for that reason. - -This change makes netgroup support conditional on the presence of the -setnetgrent(3) function which is required for the support to work. If -that function is not available on the system, an error will be returned -to the administrator if unix-netgroup: is specified in configuration. - -Fixes bug 50145. - -Closes polkit/polkit#14. - -Signed-off-by: A. Wilcox ---- -diff --git a/configure.ac b/configure.ac -index 4ac2219..ca478df 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -100,7 +100,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXPAT_LIBS="-lexpat"], - [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) - AC_SUBST(EXPAT_LIBS) - --AC_CHECK_FUNCS(clearenv fdatasync) -+AC_CHECK_FUNCS(clearenv fdatasync setnetgrent) - - if test "x$GCC" = "xyes"; then - LDFLAGS="-Wl,--as-needed $LDFLAGS" -diff --git a/src/polkit/polkitidentity.c b/src/polkit/polkitidentity.c -index 3aa1f7f..10e9c17 100644 ---- a/src/polkit/polkitidentity.c -+++ b/src/polkit/polkitidentity.c -@@ -182,7 +182,15 @@ polkit_identity_from_string (const gchar *str, - } - else if (g_str_has_prefix (str, "unix-netgroup:")) - { -+#ifndef HAVE_SETNETGRENT -+ g_set_error (error, -+ POLKIT_ERROR, -+ POLKIT_ERROR_FAILED, -+ "Netgroups are not available on this machine ('%s')", -+ str); -+#else - identity = polkit_unix_netgroup_new (str + sizeof "unix-netgroup:" - 1); -+#endif - } - - if (identity == NULL && (error != NULL && *error == NULL)) -@@ -344,6 +352,13 @@ polkit_identity_new_for_gvariant (GVariant *variant, - GVariant *v; - const char *name; - -+#ifndef HAVE_SETNETGRENT -+ g_set_error (error, -+ POLKIT_ERROR, -+ POLKIT_ERROR_FAILED, -+ "Netgroups are not available on this machine"); -+ goto out; -+#else - v = lookup_asv (details_gvariant, "name", G_VARIANT_TYPE_STRING, error); - if (v == NULL) - { -@@ -353,6 +368,7 @@ polkit_identity_new_for_gvariant (GVariant *variant, - name = g_variant_get_string (v, NULL); - ret = polkit_unix_netgroup_new (name); - g_variant_unref (v); -+#endif - } - else - { -diff --git a/src/polkit/polkitunixnetgroup.c b/src/polkit/polkitunixnetgroup.c -index 8a2b369..83f8d4a 100644 ---- a/src/polkit/polkitunixnetgroup.c -+++ b/src/polkit/polkitunixnetgroup.c -@@ -194,6 +194,9 @@ polkit_unix_netgroup_set_name (PolkitUnixNetgroup *group, - PolkitIdentity * - polkit_unix_netgroup_new (const gchar *name) - { -+#ifndef HAVE_SETNETGRENT -+ g_assert_not_reached(); -+#endif - g_return_val_if_fail (name != NULL, NULL); - return POLKIT_IDENTITY (g_object_new (POLKIT_TYPE_UNIX_NETGROUP, - "name", name, -diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c -index 056d9a8..36c2f3d 100644 ---- a/src/polkitbackend/polkitbackendinteractiveauthority.c -+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c -@@ -2233,25 +2233,26 @@ get_users_in_net_group (PolkitIdentity *group, - GList *ret; - - ret = NULL; -+#ifdef HAVE_SETNETGRENT - name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group)); - --#ifdef HAVE_SETNETGRENT_RETURN -+# ifdef HAVE_SETNETGRENT_RETURN - if (setnetgrent (name) == 0) - { - g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno)); - goto out; - } --#else -+# else - setnetgrent (name); --#endif -+# endif /* HAVE_SETNETGRENT_RETURN */ - - for (;;) - { --#if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) -+# if defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) - const char *hostname, *username, *domainname; --#else -+# else - char *hostname, *username, *domainname; --#endif -+# endif /* defined(HAVE_NETBSD) || defined(HAVE_OPENBSD) */ - PolkitIdentity *user; - GError *error = NULL; - -@@ -2282,6 +2283,7 @@ get_users_in_net_group (PolkitIdentity *group, - - out: - endnetgrent (); -+#endif /* HAVE_SETNETGRENT */ - return ret; - } - -diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp -index ca17108..da95180 100644 ---- a/src/polkitbackend/polkitbackendjsauthority.cpp -+++ b/src/polkitbackend/polkitbackendjsauthority.cpp -@@ -1520,6 +1520,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, - - JS::CallArgs args = JS::CallArgsFromVp (argc, vp); - -+#ifdef HAVE_SETNETGRENT - JS::RootedString usrstr (authority->priv->cx); - usrstr = args[0].toString(); - user = JS_EncodeStringToUTF8 (cx, usrstr); -@@ -1534,6 +1535,7 @@ js_polkit_user_is_in_netgroup (JSContext *cx, - { - is_in_netgroup = true; - } -+ #endif - - ret = true; - -diff --git a/test/polkit/polkitidentitytest.c b/test/polkit/polkitidentitytest.c -index e91967b..e829aaa 100644 ---- a/test/polkit/polkitidentitytest.c -+++ b/test/polkit/polkitidentitytest.c -@@ -19,6 +19,7 @@ - * Author: Nikki VonHollen - */ - -+#include "config.h" - #include "glib.h" - #include - #include -@@ -145,11 +146,15 @@ struct ComparisonTestData comparison_test_data [] = { - {"unix-group:root", "unix-group:jane", FALSE}, - {"unix-group:jane", "unix-group:jane", TRUE}, - -+#ifdef HAVE_SETNETGRENT - {"unix-netgroup:foo", "unix-netgroup:foo", TRUE}, - {"unix-netgroup:foo", "unix-netgroup:bar", FALSE}, -+#endif - - {"unix-user:root", "unix-group:root", FALSE}, -+#ifdef HAVE_SETNETGRENT - {"unix-user:jane", "unix-netgroup:foo", FALSE}, -+#endif - - {NULL}, - }; -@@ -181,11 +186,13 @@ main (int argc, char *argv[]) - g_test_add_data_func ("/PolkitIdentity/group_string_2", "unix-group:jane", test_string); - g_test_add_data_func ("/PolkitIdentity/group_string_3", "unix-group:users", test_string); - -+#ifdef HAVE_SETNETGRENT - g_test_add_data_func ("/PolkitIdentity/netgroup_string", "unix-netgroup:foo", test_string); -+ g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); -+#endif - - g_test_add_data_func ("/PolkitIdentity/user_gvariant", "unix-user:root", test_gvariant); - g_test_add_data_func ("/PolkitIdentity/group_gvariant", "unix-group:root", test_gvariant); -- g_test_add_data_func ("/PolkitIdentity/netgroup_gvariant", "unix-netgroup:foo", test_gvariant); - - add_comparison_tests (); - -diff --git a/test/polkit/polkitunixnetgrouptest.c b/test/polkit/polkitunixnetgrouptest.c -index 3701ba1..e3352eb 100644 ---- a/test/polkit/polkitunixnetgrouptest.c -+++ b/test/polkit/polkitunixnetgrouptest.c -@@ -19,6 +19,7 @@ - * Author: Nikki VonHollen - */ - -+#include "config.h" - #include "glib.h" - #include - #include -@@ -69,7 +70,9 @@ int - main (int argc, char *argv[]) - { - g_test_init (&argc, &argv, NULL); -+#ifdef HAVE_SETNETGRENT - g_test_add_func ("/PolkitUnixNetgroup/new", test_new); - g_test_add_func ("/PolkitUnixNetgroup/set_name", test_set_name); -+#endif - return g_test_run (); - } -diff --git a/test/polkitbackend/test-polkitbackendjsauthority.c b/test/polkitbackend/test-polkitbackendjsauthority.c -index f97e0e0..fc52149 100644 ---- a/test/polkitbackend/test-polkitbackendjsauthority.c -+++ b/test/polkitbackend/test-polkitbackendjsauthority.c -@@ -137,12 +137,14 @@ test_get_admin_identities (void) - "unix-group:users" - } - }, -+#ifdef HAVE_SETNETGRENT - { - "net.company.action3", - { - "unix-netgroup:foo" - } - }, -+#endif - }; - guint n; - diff --git a/repo/system/polkit/polkit-1 b/repo/system/polkit/polkit-1 new file mode 100644 index 0000000..df1b69a --- /dev/null +++ b/repo/system/polkit/polkit-1 @@ -0,0 +1,9 @@ +# Begin /etc/pam.d/polkit-1 + +auth include system-auth +account include system-account +password include system-password +session include system-session + +# End /etc/pam.d/polkit-1 + diff --git a/repo/system/shared-mime-info/shared-mime-info.xibuild b/repo/system/shared-mime-info/shared-mime-info.xibuild index cb6b887..fc3f28e 100644 --- a/repo/system/shared-mime-info/shared-mime-info.xibuild +++ b/repo/system/shared-mime-info/shared-mime-info.xibuild @@ -3,7 +3,7 @@ NAME="shared-mime-info" DESC="Freedesktop.org Shared MIME Info" -MAKEDEPS="meson ninja itstool libxml2-utils xmlto libxml2 glib" +MAKEDEPS="meson ninja itstool xmlto libxml2 glib" DEPS="sbase glib libxml2 musl pkg-config " PKG_VER=2.2 diff --git a/repo/system/syslinux/gcc-10.patch b/repo/system/syslinux/gcc-10.patch deleted file mode 100644 index b5bbad0..0000000 --- a/repo/system/syslinux/gcc-10.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 951928f2cad5682c2844e6bd0f7201236c5d9b66 Mon Sep 17 00:00:00 2001 -From: Merlin Mathesius -Date: Wed, 13 May 2020 08:02:27 -0500 -Subject: [PATCH] Workaround multiple definition of symbol errors - ---- - com32/cmenu/Makefile | 2 +- - com32/elflink/ldlinux/Makefile | 2 +- - com32/gpllib/Makefile | 2 +- - com32/hdt/Makefile | 2 +- - core/Makefile | 2 +- - dos/Makefile | 2 +- - efi/Makefile | 2 +- - 7 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/com32/cmenu/Makefile b/com32/cmenu/Makefile -index b81b68ed..2ae989c4 100644 ---- a/com32/cmenu/Makefile -+++ b/com32/cmenu/Makefile -@@ -49,7 +49,7 @@ makeoutputdirs: - @mkdir -p $(OBJ)/libmenu - - libmenu/libmenu.elf: $(LIBMENU) -- $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) \ -+ $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) \ - -o $@ $^ - - tidy dist: -diff --git a/com32/elflink/ldlinux/Makefile b/com32/elflink/ldlinux/Makefile -index 87c0d362..2be2a01a 100644 ---- a/com32/elflink/ldlinux/Makefile -+++ b/com32/elflink/ldlinux/Makefile -@@ -33,7 +33,7 @@ endif - all: $(BTARGET) ldlinux_lnx.a - - ldlinux.elf : $(OBJS) -- $(LD) $(LDFLAGS) -soname $(SONAME) -o $@ $^ $(LIBS) -+ $(LD) $(LDFLAGS) -z muldefs -soname $(SONAME) -o $@ $^ $(LIBS) - - LNXCFLAGS += -D__export='__attribute__((visibility("default")))' - LNXLIBOBJS = get_key.lo -diff --git a/com32/gpllib/Makefile b/com32/gpllib/Makefile -index 1fec9145..2d764d0b 100644 ---- a/com32/gpllib/Makefile -+++ b/com32/gpllib/Makefile -@@ -24,7 +24,7 @@ makeoutputdirs: - $(addprefix $(OBJ),$(sort $(dir $(LIBOBJS)))),$(b)) - - libgpl.elf : $(LIBOBJS) -- $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ -+ $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ - - tidy dist clean: - find . \( -name \*.o -o -name .\*.d -o -name \*.tmp \) -print0 | \ -diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile -index 61736d05..1d947857 100644 ---- a/com32/hdt/Makefile -+++ b/com32/hdt/Makefile -@@ -52,7 +52,7 @@ QEMU ?= qemu-kvm - all: $(MODULES) $(TESTFILES) - - hdt.elf : $(OBJS) $(LIBS) $(C_LIBS) -- $(LD) $(LDFLAGS) -o $@ $^ -+ $(LD) $(LDFLAGS) -z muldefs -o $@ $^ - - memtest: - -[ ! -f $(FLOPPY_DIR)/$(MEMTEST) ] && $(WGET) $(MEMTEST_URL) -O $(FLOPPY_DIR)/$(MEMTEST) -diff --git a/core/Makefile b/core/Makefile -index 46cb037c..f0cfcbe9 100644 ---- a/core/Makefile -+++ b/core/Makefile -@@ -156,7 +156,7 @@ LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld - NASM_ELF = elf - - %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS) -- $(LD) $(LDFLAGS) -pie -Bsymbolic \ -+ $(LD) $(LDFLAGS) -z muldefs -pie -Bsymbolic \ - -T $(LDSCRIPT) \ - --unresolved-symbols=report-all \ - -E --hash-style=gnu -M -o $@ $< \ -diff --git a/dos/Makefile b/dos/Makefile -index 4c930d19..5d1c72ca 100644 ---- a/dos/Makefile -+++ b/dos/Makefile -@@ -19,7 +19,7 @@ include $(MAKEDIR)/embedded.mk - CFLAGS += -D__MSDOS__ -mregparm=3 -DREGPARM=3 - # CFLAGS += -DDEBUG - --LDFLAGS = -T $(SRC)/dosexe.ld -+LDFLAGS = -T $(SRC)/dosexe.ld -z muldefs - OPTFLAGS = -g - INCLUDES = -include code16.h -nostdinc -iwithprefix include \ - -I$(SRC) -I$(SRC)/.. -I$(SRC)/../libfat \ -diff --git a/efi/Makefile b/efi/Makefile -index bbf23f24..3dd922d5 100644 ---- a/efi/Makefile -+++ b/efi/Makefile -@@ -69,7 +69,7 @@ $(OBJS): | $(OBJ)/$(ARCH) - BTARGET = syslinux.efi - - syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS) -- $(LD) $(LDFLAGS) --strip-debug -o $@ $^ -lgnuefi -lefi -+ $(LD) $(LDFLAGS) -z muldefs --strip-debug -o $@ $^ -lgnuefi -lefi - - # We need to rename the .hash section because the EFI firmware - # linker really doesn't like it. --- -2.25.1 - diff --git a/repo/util/usbutils/usbutils.xibuild b/repo/util/usbutils/usbutils.xibuild index 9df636f..1e744f5 100644 --- a/repo/util/usbutils/usbutils.xibuild +++ b/repo/util/usbutils/usbutils.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="libusb wget" -DEPS="libusb musl hwdata sbase python" +DEPS="libusb musl hwids sbase python" PKG_VER=014 SOURCE=https://www.kernel.org/pub/linux/utils/usb/usbutils/usbutils-$PKG_VER.tar.xz diff --git a/repo/util/wget/wget.xibuild b/repo/util/wget/wget.xibuild index 46b772a..a5ec664 100644 --- a/repo/util/wget/wget.xibuild +++ b/repo/util/wget/wget.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make " -DEPS="musl gnutls libidn2 libpsl nettle util-linux pcre22 zlib cacerts" +DEPS="musl gnutls libidn libpsl nettle util-linux pcre2 zlib cacerts" PKG_VER=1.21.2 SOURCE=https://ftp.gnu.org/gnu/wget/wget-$PKG_VER.tar.gz diff --git a/repo/x11/gtk2/gtk2.xibuild b/repo/x11/gtk2/gtk2.xibuild index 1798730..e04a379 100644 --- a/repo/x11/gtk2/gtk2.xibuild +++ b/repo/x11/gtk2/gtk2.xibuild @@ -3,7 +3,7 @@ NAME="gtk2" DESC="The GTK+ Toolkit (v2)" -MAKEDEPS="meson ninja iso-codes libpng shared-mime-info" +MAKEDEPS="meson ninja libpng shared-mime-info" DEPS="atk at-spi2-atk sbase cairo gobject-introspection fontconfig fribidi gdk-pixbuf glib harfbuzz libepoxy intltool libx11 libxcomposite libxcursor libxdamage libxext libxfixes libxi libxinerama libxkbcommon libxrandr musl pango shared-mime-info wayland " PKG_VER=2.24.33 diff --git a/repo/x11/gtk3/gtk3.xibuild b/repo/x11/gtk3/gtk3.xibuild index 14e4989..7a6fe99 100644 --- a/repo/x11/gtk3/gtk3.xibuild +++ b/repo/x11/gtk3/gtk3.xibuild @@ -3,7 +3,7 @@ NAME="gtk3" DESC="The GTK+ Toolkit (v3)" -MAKEDEPS="meson ninja iso-codes gtk2" +MAKEDEPS="meson ninja gtk2" DEPS="atk at-spi2-atk sbase cairo gobject-introspection fontconfig fribidi gdk-pixbuf glib harfbuzz libepoxy intltool libx11 libxcomposite libxcursor libxdamage libxext libxfixes libxi libxinerama libxkbcommon libxrandr musl pango shared-mime-info wayland adwaita-icon-theme gsettings-desktop-schemas" PKG_VER=3.24.33 diff --git a/repo/x11/libva/libva.xibuild b/repo/x11/libva/libva.xibuild index db3b0f9..786a1b5 100644 --- a/repo/x11/libva/libva.xibuild +++ b/repo/x11/libva/libva.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make" -DEPS="libdrm mesa libx11 libxext libxfixes wayland" +DEPS="libdrm libx11 mesa libxext libxfixes wayland" DESC="Video Acceleration API" diff --git a/repo/x11/libwacom/libwacom.xibuild b/repo/x11/libwacom/libwacom.xibuild index 80dd536..1f7e392 100644 --- a/repo/x11/libwacom/libwacom.xibuild +++ b/repo/x11/libwacom/libwacom.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="meson libxml2" -DEPS="glib2 libgudev librsvg" +DEPS="glib libgudev librsvg" DESC="Library to identify Wacom tablets and their features" diff --git a/repo/x11/mesa/mesa.xibuild b/repo/x11/mesa/mesa.xibuild index d315b37..1e9d139 100644 --- a/repo/x11/mesa/mesa.xibuild +++ b/repo/x11/mesa/mesa.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="meson ninja python-mako libva libvdpau llvm libxxf86vm libelf lm-sensors libexpat wayland-protocols" +MAKEDEPS="meson ninja python-mako libvdpau llvm libxxf86vm libelf lm-sensors expat wayland-protocols" DEPS="xorg-libs libdrm" PKG_VER=21.3.7 diff --git a/repo/x11/motif/motif.xibuild b/repo/x11/motif/motif.xibuild index a283ca0..7d08648 100644 --- a/repo/x11/motif/motif.xibuild +++ b/repo/x11/motif/motif.xibuild @@ -22,13 +22,22 @@ ADDITIONAL=" 15-link_uil_against_libuil.patch 16-fix-undefined-use-of-sprintf.patch 17-switch-to-system-iswspace.patch -18-option-main.patch" +18-option-main.patch +update-automake.patch +" -#prepare () { -# apply_patches -#} +prepare () { + apply_patches + # dont build demos + sed -i '30s/\\//' Makefile.am + sed -i '31d' Makefile.am + + touch NEWS AUTHORS + autoreconf -fi +} build () { + export LDFLAGS="$LDFLAGS -lX11" ./configure \ --prefix=/usr \ --bindir=/usr/bin \ diff --git a/repo/x11/motif/update-automake.patch b/repo/x11/motif/update-automake.patch new file mode 100644 index 0000000..3a69a0e --- /dev/null +++ b/repo/x11/motif/update-automake.patch @@ -0,0 +1,18 @@ +--- build/configure.ac 2022-05-24 14:36:41.034651348 +0100 ++++ build2/configure.ac 2022-05-24 14:35:31.484247422 +0100 +@@ -1,5 +1,5 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT(motif,2.3.8,no-define) ++AC_INIT + AC_CONFIG_SRCDIR([lib/Xm/Form.c]) + AC_PREREQ(2.52) + AC_CONFIG_AUX_DIR(.) +@@ -22,7 +22,7 @@ + AC_SUBST(AGE) + + dnl This is really dumb but it seems to be bug +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE(motif,2.3.8,no-define) + + LIBTOOL_VERSION=$CURRENT:$REVISION:$AGE + diff --git a/repo/x11/picom/picom.xibuild b/repo/x11/picom/picom.xibuild index 2c3eb28..c9d4f42 100644 --- a/repo/x11/picom/picom.xibuild +++ b/repo/x11/picom/picom.xibuild @@ -1,7 +1,7 @@ #!/bin/sh -MAKEDEPS="libx11 libxcomposite libxinerama libxdamage libconfig pcre libxrandr dbus libdrm mesa meson libev libxdg-basedir pixman xcb-util-renderutil xcb-util-image asciidoc uthash" -DEPS="dbus libconfig libev libx11 libxcb mesa-gl musl pcre pixman xcb-util-image xcb-util-renderutil" +MAKEDEPS="libx11 libxcomposite libxinerama libxdamage libconfig pcre libxrandr dbus libdrm mesa meson libev pixman xcb-util-renderutil xcb-util-image asciidoc uthash" +DEPS="dbus libconfig libev libx11 libxcb musl pcre pixman xcb-util-image xcb-util-renderutil" PKG_VER=9.1 SOURCE=https://github.com/yshui/picom/archive/v$PKG_VER.tar.gz @@ -10,7 +10,6 @@ build () { mkdir build cd build meson \ - -Dwith_docs=true \ .. ninja } diff --git a/repo/x11/xcursor-themes/xcursor-themes.xibuild b/repo/x11/xcursor-themes/xcursor-themes.xibuild index f3ecb0b..66127ce 100644 --- a/repo/x11/xcursor-themes/xcursor-themes.xibuild +++ b/repo/x11/xcursor-themes/xcursor-themes.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="make" -DEPS="util-macros xcb-util xcursorgen" +DEPS="xorg-util-macros xcb-util xcursorgen" PKG_VER=1.0.6 SOURCE=https://www.x.org/pub/individual/data/xcursor-themes-$PKG_VER.tar.bz2 diff --git a/repo/x11/xorg-server/xorg-server.xibuild b/repo/x11/xorg-server/xorg-server.xibuild index 11553aa..fa261f1 100644 --- a/repo/x11/xorg-server/xorg-server.xibuild +++ b/repo/x11/xorg-server/xorg-server.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="meson ninja doxygen xmlto fop" +MAKEDEPS="meson ninja doxygen xmlto" DEPS="libxcvt pixman font-util xkeyboardconfig elogind libepoxy libtirpc polkit acpid nettle libgcrypt xcb-util-keysyms xcb-util-image xcb-util-renderutil xcb-util-wm xkbcomp" PKG_VER=21.1.3 diff --git a/repo/xi/geninitramfs/geninitramfs.xibuild b/repo/xi/geninitramfs/geninitramfs.xibuild deleted file mode 100644 index a7498c7..0000000 --- a/repo/xi/geninitramfs/geninitramfs.xibuild +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -MAKEDEPS="make linux-src" -DEPS="sh cpio sbase findutils gzip util-linux" - -SOURCE=https://git.davidovski.xyz/xilinux/bootscripts.git -DESC="Scripts to make initramfs" - -package () { - mkdir -p $PKG_DEST/usr/bin - make DESTDIR=$PKG_DEST install-mkinitramfs -} diff --git a/repo/xi/sysconfigs/sysconfigs.xibuild b/repo/xi/sysconfigs/sysconfigs.xibuild index 519e68f..c3723c1 100644 --- a/repo/xi/sysconfigs/sysconfigs.xibuild +++ b/repo/xi/sysconfigs/sysconfigs.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="" -DEPS="bootscripts sh" +DEPS="sh" PKG_VER=N/A DESC="Default system configs for xilinux" diff --git a/repo/xi/xib/xib.xibuild b/repo/xi/xib/xib.xibuild index e4b3efa..f8b2395 100644 --- a/repo/xi/xib/xib.xibuild +++ b/repo/xi/xib/xib.xibuild @@ -7,6 +7,5 @@ SOURCE=https://git.davidovski.xyz/xilinux/xib.git DESC="The XiBuild system" package () { - mkdir -p $PKG_DEST/var/lib/xib - mv * $PKG_DEST/var/lib/xib/ + make DESTDIR=$PKG_DEST install } diff --git a/repo/xi/xibuild/xibuild.xibuild b/repo/xi/xibuild/xibuild.xibuild index 9bfa416..7c55ab2 100644 --- a/repo/xi/xibuild/xibuild.xibuild +++ b/repo/xi/xibuild/xibuild.xibuild @@ -3,9 +3,12 @@ MAKEDEPS="" DEPS="xiutils parseconf tar unzip" -SOURCE=https://git.davidovski.xyz/xilinux/xib.git +PKG_VER=1.1 +SOURCE=https://git.davidovski.xyz/xilinux/xibuild.git +BRANCH=v$PKG_VER + DESC="Tools for building xipkgs on XiLinux" package () { - make install + make DESTDIR=$PKG_DEST install } diff --git a/skip/rust-wasm.xibuild b/skip/rust-wasm.xibuild new file mode 100644 index 0000000..39c7e7f --- /dev/null +++ b/skip/rust-wasm.xibuild @@ -0,0 +1,8 @@ +#!/bin/sh + +DEPS="rust lld wasi-sdk" +DESC="WebAssembly targets for rust" + +package () { + add_from_main "usr/lib/rustlib/wasm32-*" +} diff --git a/skip/wasi-compiler-rt.xibuild b/skip/wasi-compiler-rt.xibuild deleted file mode 100644 index c3959dd..0000000 --- a/skip/wasi-compiler-rt.xibuild +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -NAME="wasi-compiler-rt" -DESC="WASI LLVM compiler runtime" - -MAKEDEPS="cmake " -DEPS="musl " - -PKG_VER=13.0.1 -wasi_sdk_ver=14 - -SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" -ADDITIONAL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz" - -prepare () { - tar xf compiler-rt-$PKG_VER.src.tar.xz - mkdir -p wasi-compiler-rt - mv compiler-rt-$PKG_VER.src wasi-compiler-rt/compiler-rt - mv wasi-sdk.cmake wasi-compiler-rt - mv cmake wasi-compiler-rt - -} - -build () { - cd wasi-compiler-rt - mkdir build - cmake -B build \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DCMAKE_MODULE_PATH=$BUILD_ROOT/wasi-compiler-rt/cmake \ - -DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/wasi-compiler-rt/wasi-sdk.cmake \ - -DCMAKE_C_COMPILER_WORKS=ON \ - -DCOMPILER_RT_BAREMETAL_BUILD=ON \ - -DCOMPILER_RT_INCLUDE_TESTS=OFF \ - -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \ - -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ - -DCOMPILER_RT_OS_DIR=wasi \ - -DWASI_SDK_PREFIX=/usr \ - -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$PKG_VER/ \ - compiler-rt/lib/builtins - cmake --build build -} - -package () { - DESTDIR="$PKG_DEST" cmake --install build -} diff --git a/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild b/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild new file mode 100644 index 0000000..c3959dd --- /dev/null +++ b/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild @@ -0,0 +1,45 @@ +#!/bin/sh + +NAME="wasi-compiler-rt" +DESC="WASI LLVM compiler runtime" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +wasi_sdk_ver=14 + +SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" +ADDITIONAL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz" + +prepare () { + tar xf compiler-rt-$PKG_VER.src.tar.xz + mkdir -p wasi-compiler-rt + mv compiler-rt-$PKG_VER.src wasi-compiler-rt/compiler-rt + mv wasi-sdk.cmake wasi-compiler-rt + mv cmake wasi-compiler-rt + +} + +build () { + cd wasi-compiler-rt + mkdir build + cmake -B build \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH=$BUILD_ROOT/wasi-compiler-rt/cmake \ + -DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/wasi-compiler-rt/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCOMPILER_RT_BAREMETAL_BUILD=ON \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ + -DCOMPILER_RT_OS_DIR=wasi \ + -DWASI_SDK_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$PKG_VER/ \ + compiler-rt/lib/builtins + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/skip/wasi-libc.xibuild b/skip/wasi-libc.xibuild deleted file mode 100644 index a314eb9..0000000 --- a/skip/wasi-libc.xibuild +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -NAME="wasi-libc" -DESC="WASI libc implementation for WebAssembly" - -MAKEDEPS="cmake " -DEPS="musl " - -PKG_VER=13.0.1 -PKG_VER=0_git20220310 - -BRANCH=079adff840032c3455eb1cb34dc9ceaa0b2bfc0c -SOURCE="ssh://github.com/WebAssembly/wasi-libc" - -build () { - make WASM_CC=/usr/bin/clang -} - -package () { - make INSTALL_DIR=$PKG_DEST/usr/share/wasi-sysroot install -} diff --git a/skip/wasi-libc/wasi-libc.xibuild b/skip/wasi-libc/wasi-libc.xibuild new file mode 100644 index 0000000..4658d50 --- /dev/null +++ b/skip/wasi-libc/wasi-libc.xibuild @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME="wasi-libc" +DESC="WASI libc implementation for WebAssembly" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +PKG_VER=0_git20220310 + +BRANCH=079adff840032c3455eb1cb34dc9ceaa0b2bfc0c +SOURCE="ssh://github.com/WebAssembly/wasi-libc" + +build () { + make +} + +package () { + make INSTALL_DIR=$PKG_DEST/usr/share/wasi-sysroot install +} diff --git a/skip/wasi-libcxx.xibuild b/skip/wasi-libcxx.xibuild deleted file mode 100644 index 1425877..0000000 --- a/skip/wasi-libcxx.xibuild +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh - -NAME="wasi-libcxx" -DESC="WASI LLVM C++ standard library" - -MAKEDEPS="cmake " -DEPS="musl " - -PKG_VER=13.0.1 -wasi_sdk_ver=14 - -SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" -ADDITIONAL=" -https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxx-$PKG_VER.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxxabi-$PKG_VER.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/llvm-$PKG_VER.src.tar.xz -" - -builddir="$BUILD_ROOT/wasi-libcxx" - -prepare () { - mkdir -p $builddir/ - - for s in libcxx libcxxabi llvm; do - tar xf $s-$PKG_VER.src.tar.xz - mv $s-$PKG_VER.src $builddir/$s - done - - mv wasi-sdk.cmake "$builddir" - mv cmake "$builddir" -} - -build () { - export CC="clang" - export CXX="clang++" - export CFLAGS="$CFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" - export CXXFLAGS="$CXXFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" - - cd $builddir - cmake -B build-libcxx -G Ninja \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DCMAKE_MODULE_PATH="$builddir"/cmake \ - -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ - -DCMAKE_C_COMPILER_WORKS=ON \ - -DCMAKE_CXX_COMPILER_WORKS=ON \ - -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ - -DLIBCXX_INCLUDE_TESTS=ON \ - -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ - -DLIBCXX_ENABLE_SHARED=OFF \ - -DLIBCXX_ENABLE_THREADS=OFF \ - -DLIBCXX_HAS_PTHREAD_API=OFF \ - -DLIBCXX_HAS_EXTERNAL_THREAD_API=OFF \ - -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ - -DLIBCXX_HAS_WIN32_THREAD_API=OFF \ - -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \ - -DLIBCXX_ENABLE_FILESYSTEM=OFF \ - -DLIBCXX_CXX_ABI=libcxxabi \ - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=libcxxabi/include \ - -DLIBCXX_HAS_MUSL_LIBC=ON \ - -DLIBCXX_ABI_VERSION=2 \ - -DWASI_SDK_PREFIX=/usr \ - -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi \ - libcxx - - cmake -B build-libcxxabi -G Ninja \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DCMAKE_MODULE_PATH="$builddir"/cmake \ - -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ - -DCMAKE_C_COMPILER_WORKS=ON \ - -DCMAKE_CXX_COMPILER_WORKS=ON \ - -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ - -DLIBCXXABI_INCLUDE_TESTS=ON \ - -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \ - -DLIBCXXABI_ENABLE_SHARED=OFF \ - -DLIBCXXABI_ENABLE_THREADS=OFF \ - -DLIBCXXABI_HAS_PTHREAD_API=OFF \ - -DLIBCXXABI_HAS_EXTERNAL_THREAD_API=OFF \ - -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ - -DLIBCXXABI_HAS_WIN32_THREAD_API=OFF \ - -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \ - -DLIBCXXABI_ENABLE_PIC=OFF \ - -DUNIX=ON \ - -DCXX_SUPPORTS_CXX11=ON \ - -DLIBCXXABI_LIBCXX_PATH=libcxx \ - -DLIBCXXABI_LIBCXX_INCLUDES="$builddir"/build-libcxx/include/c++/v1 \ - -DWASI_SDK_PREFIX=/usr \ - -DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi \ - libcxxabi - - cmake --build build-libcxx - cmake --build build-libcxxabi - -} - -package () { - DESTDIR="$PKG_DEST" cmake --install build-libcxx - DESTDIR="$PKG_DEST" cmake --install build-libcxxabi -} diff --git a/skip/wasi-libcxx/wasi-libcxx.xibuild b/skip/wasi-libcxx/wasi-libcxx.xibuild new file mode 100644 index 0000000..45f3772 --- /dev/null +++ b/skip/wasi-libcxx/wasi-libcxx.xibuild @@ -0,0 +1,96 @@ +#!/bin/sh + +NAME="wasi-libcxx" +DESC="WASI LLVM C++ standard library" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +wasi_sdk_ver=14 + +SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" +ADDITIONAL=" +https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxx-$PKG_VER.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/libcxxabi-$PKG_VER.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/llvm-$PKG_VER.src.tar.xz +" + +builddir="$BUILD_ROOT/wasi-libcxx" + +prepare () { + mkdir -p $builddir/ + + for s in libcxx libcxxabi llvm; do + tar xf $s-$PKG_VER.src.tar.xz + mv $s-$PKG_VER.src $builddir/$s + done + + mv wasi-sdk.cmake "$builddir" + mv cmake "$builddir" +} + +build () { + export CFLAGS="$CFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" + export CXXFLAGS="$CXXFLAGS -fno-exceptions --sysroot=/usr/share/wasi-sysroot" + + cd $builddir + cmake -B build-libcxx -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH="$builddir"/cmake \ + -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ + -DLIBCXX_INCLUDE_TESTS=ON \ + -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ + -DLIBCXX_ENABLE_SHARED=OFF \ + -DLIBCXX_ENABLE_THREADS=OFF \ + -DLIBCXX_HAS_PTHREAD_API=OFF \ + -DLIBCXX_HAS_EXTERNAL_THREAD_API=OFF \ + -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ + -DLIBCXX_HAS_WIN32_THREAD_API=OFF \ + -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \ + -DLIBCXX_ENABLE_FILESYSTEM=OFF \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DLIBCXX_CXX_ABI_INCLUDE_PATHS=libcxxabi/include \ + -DLIBCXX_HAS_MUSL_LIBC=ON \ + -DLIBCXX_ABI_VERSION=2 \ + -DWASI_SDK_PREFIX=/usr \ + -DLIBCXX_LIBDIR_SUFFIX=/wasm32-wasi \ + libcxx + + cmake -B build-libcxxabi -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH="$builddir"/cmake \ + -DCMAKE_TOOLCHAIN_FILE="$builddir"/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCMAKE_CXX_COMPILER_WORKS=ON \ + -DCMAKE_STAGING_PREFIX=/usr/share/wasi-sysroot \ + -DLIBCXXABI_INCLUDE_TESTS=ON \ + -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \ + -DLIBCXXABI_ENABLE_SHARED=OFF \ + -DLIBCXXABI_ENABLE_THREADS=OFF \ + -DLIBCXXABI_HAS_PTHREAD_API=OFF \ + -DLIBCXXABI_HAS_EXTERNAL_THREAD_API=OFF \ + -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY=OFF \ + -DLIBCXXABI_HAS_WIN32_THREAD_API=OFF \ + -DLIBCXXABI_SILENT_TERMINATE:BOOL=ON \ + -DLIBCXXABI_ENABLE_PIC=OFF \ + -DUNIX=ON \ + -DCXX_SUPPORTS_CXX11=ON \ + -DLIBCXXABI_LIBCXX_PATH=libcxx \ + -DLIBCXXABI_LIBCXX_INCLUDES="$builddir"/build-libcxx/include/c++/v1 \ + -DWASI_SDK_PREFIX=/usr \ + -DLIBCXXABI_LIBDIR_SUFFIX=/wasm32-wasi \ + libcxxabi + + cmake --build build-libcxx + cmake --build build-libcxxabi + +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build-libcxx + DESTDIR="$PKG_DEST" cmake --install build-libcxxabi +} diff --git a/skip/wasi-sdk.xibuild b/skip/wasi-sdk.xibuild deleted file mode 100644 index 0cd76f9..0000000 --- a/skip/wasi-sdk.xibuild +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -NAME="wasi-sdk" -DESC="WASI-enabled WebAssembly C/C++ toolchain" - -MAKEDEPS="cmake " -DEPS="wasi-compiler-rt wasi-libc wasi-libcxx" - -PKG_VER=14.0 - -package () { - mkdir $PKG_DEST -} diff --git a/skip/wasi-sdk/wasi-sdk.xibuild b/skip/wasi-sdk/wasi-sdk.xibuild new file mode 100644 index 0000000..0cd76f9 --- /dev/null +++ b/skip/wasi-sdk/wasi-sdk.xibuild @@ -0,0 +1,13 @@ +#!/bin/sh + +NAME="wasi-sdk" +DESC="WASI-enabled WebAssembly C/C++ toolchain" + +MAKEDEPS="cmake " +DEPS="wasi-compiler-rt wasi-libc wasi-libcxx" + +PKG_VER=14.0 + +package () { + mkdir $PKG_DEST +} -- cgit v1.2.1