schroot: init at 1.6.13-5

+289
+70
pkgs/by-name/sc/schroot/debian-patches.nix
··· 1 + # Generated by debian-patches.sh from debian-patches.txt 2 + let 3 + prefix = "https://salsa.debian.org/debian/schroot/-/raw/debian/master/1.6.13-4/debian/patches"; 4 + in 5 + [ 6 + { 7 + url = "${prefix}/1539621689.revert.schroot-1.6.10-48-g2600bcab.revert-environment-preserve-empty-values.patch"; 8 + sha256 = "0kvp47qkhq4s7bqil1pcq7c0a63hiw7xgmrxv460rfb9irvlp2wn"; 9 + } 10 + { 11 + url = "${prefix}/1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch"; 12 + sha256 = "09vliqpmqn4yvh3mxsa9iqlwxkfrhfjraizm945ir6v23m622i6k"; 13 + } 14 + { 15 + url = "${prefix}/1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch"; 16 + sha256 = "036g3br7251ykhmgq48zbjdgyy06m0rhrv1hf540zb7n6ildygkz"; 17 + } 18 + { 19 + url = "${prefix}/1496783678.schroot-1.7.2-127-ga5e5d8d9.fix-bash-completion.patch"; 20 + sha256 = "0adqpyqkw5kyg1843ygificm2hxawl4pi1lbyn2dvzw11yawvv9k"; 21 + } 22 + { 23 + url = "${prefix}/1530433671.schroot-1.7.2-129-g00c0a972.cmake-use-soelim-r-option.patch"; 24 + sha256 = "0csn6j6xsi8bd16r7bvd33albwz6v7fv7wawakkiimbj59zbinhn"; 25 + } 26 + { 27 + url = "${prefix}/1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch"; 28 + sha256 = "1iizprcdnisdjgp091y0zjsayq5qqfwh9d2d9zns1d0414jafp7b"; 29 + } 30 + { 31 + url = "${prefix}/1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch"; 32 + sha256 = "03f735zyzj4zmrrmynb2xl49i8s8580d9dyp0kxq5aq555sl7hx2"; 33 + } 34 + { 35 + url = "${prefix}/1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch"; 36 + sha256 = "0f2wziwchfg3v193i8x7s60vr9yx72z3f7ddgsfkshay4m5mrprs"; 37 + } 38 + { 39 + url = "${prefix}/1662656169.reschroot-1.6.13-3-ga9e100e5.clean-up-mess-created-in-the-portuguese-translations.patch"; 40 + sha256 = "1yq05pc38rkbb0njwllfwjc8dl73i7g7z89spsa7ls3amkyccm7w"; 41 + } 42 + { 43 + url = "${prefix}/1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch"; 44 + sha256 = "0qhcifjxgipxh67fjf0ydclvxn9yys7hfcwxir9jnw572y9igx1k"; 45 + } 46 + { 47 + url = "${prefix}/1665995770.reschroot-1.6.13-5-g81b88b45.document-a-login-shell-might-be-switched-to-a-regular-shell.patch"; 48 + sha256 = "1lwslyqrfz1xmi28j1s80pq763k63f9g4qgx9vr3qm247gb7v55l"; 49 + } 50 + { 51 + url = "${prefix}/1692468301.reschroot-1.6.13-6-g271acf6e.subject-mount-a-new-instance-of-dev-pts-in-the-chroot.patch"; 52 + sha256 = "1j04bxcbg2bigss7sjqyg7cn8547wwmp5zj8406v3vk5g71iaijf"; 53 + } 54 + { 55 + url = "${prefix}/1664222056.reschroot-1.6.13-9-g55af32cf.fix-localename-type.patch"; 56 + sha256 = "15kjl3g6c79jfqh45mr3h3qbl5gx2pmxqc2pmsjplxdkksx9i6yn"; 57 + } 58 + { 59 + url = "${prefix}/1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch"; 60 + sha256 = "02c6zsmprdvkgf3krl6z1qwvx144arng0s34ry1dq8qvwl5fd66c"; 61 + } 62 + { 63 + url = "${prefix}/fix-dupes-in-buildd-configuration.patch"; 64 + sha256 = "0s8racsl2s4mix6n7xb09dmncs5w0jmnb0vrjxpwx9c1yhz46dwl"; 65 + } 66 + { 67 + url = "${prefix}/fix-example-configuration.patch"; 68 + sha256 = "1r6kffc7a4aanksjv4658vs4xs31gmrhpa2gmpqkr21s7zk45yav"; 69 + } 70 + ]
+17
pkgs/by-name/sc/schroot/debian-patches.txt
··· 1 + schroot/1.6.13-5 2 + 1539621689.revert.schroot-1.6.10-48-g2600bcab.revert-environment-preserve-empty-values.patch 3 + 1448890714.schroot-1.7.2-72-gbf30a928.setup-d-20copyfiles-canonicalize-destination-path.patch 4 + 1453505583.schroot-1.7.2-72-g11587fd8.etc-setup-d-20copyfiles-replace-dangling-symlink-during-cp.patch 5 + 1496783678.schroot-1.7.2-127-ga5e5d8d9.fix-bash-completion.patch 6 + 1530433671.schroot-1.7.2-129-g00c0a972.cmake-use-soelim-r-option.patch 7 + 1487872945.schroot-1.7.2-137-g5c36362b.support-copyfiles-installation-into-non-existent-directories.patch 8 + 1487872999.schroot-1.7.2-138-g5a611c49.support-copyfiles-source-destination-specifications.patch 9 + 1662655911.reschroot-1.6.13-2-g779349dc.replace-usage-of-egrep-and-which.patch 10 + 1662656169.reschroot-1.6.13-3-ga9e100e5.clean-up-mess-created-in-the-portuguese-translations.patch 11 + 1664011392.reschroot-1.6.13-4-g93017cff.update-french-translation.patch 12 + 1665995770.reschroot-1.6.13-5-g81b88b45.document-a-login-shell-might-be-switched-to-a-regular-shell.patch 13 + 1692468301.reschroot-1.6.13-6-g271acf6e.subject-mount-a-new-instance-of-dev-pts-in-the-chroot.patch 14 + 1664222056.reschroot-1.6.13-9-g55af32cf.fix-localename-type.patch 15 + 1658716738.reschroot-1.6.12-2-g2045008e.fix-variable-usage-in-copyfiles-copy-file-function.patch 16 + fix-dupes-in-buildd-configuration.patch 17 + fix-example-configuration.patch
+43
pkgs/by-name/sc/schroot/fix-absolute-paths.patch
··· 1 + diff --git a/etc/setup.d/20copyfiles b/etc/setup.d/20copyfiles 2 + index 3247ae2a..eed9fa46 100755 3 + --- a/etc/setup.d/20copyfiles 4 + +++ b/etc/setup.d/20copyfiles 5 + @@ -39,9 +39,9 @@ copy_file() 6 + if [ -e "$2" ]; then 7 + 8 + # Device and inode 9 + - da=$(/usr/bin/stat --format="%d %i" "$1") 10 + + da=$(stat --format="%d %i" "$1") 11 + # This one can fail since it might not exist yet 12 + - db=$(/usr/bin/stat --format="%d %i" "$2" 2>/dev/null || :) 13 + + db=$(stat --format="%d %i" "$2" 2>/dev/null || :) 14 + 15 + if [ "$da" = "$db" ]; then 16 + COPY="false" 17 + @@ -50,8 +50,8 @@ copy_file() 18 + : 19 + elif [ -f "$1" ] && [ -f "$2" ]; then 20 + # Content 21 + - ca=$(/usr/bin/md5sum "$1" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/') 22 + - cb=$(/usr/bin/md5sum "$2" 2>/dev/null || :) 23 + + ca=$(md5sum "$1" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/') 24 + + cb=$(md5sum "$2" 2>/dev/null || :) 25 + cb=$(echo "$cb" | sed -e 's/\(^[0-9a-f][0-9a-f]*\).*$/\1/') 26 + # Copy only if file contents differ 27 + if [ "$ca" = "$cb" ]; then 28 + diff --git a/etc/setup.d/20nssdatabases b/etc/setup.d/20nssdatabases 29 + index ac7206b7..00645362 100755 30 + --- a/etc/setup.d/20nssdatabases 31 + +++ b/etc/setup.d/20nssdatabases 32 + @@ -42,9 +42,9 @@ if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then 33 + fi 34 + 35 + # Device and inode 36 + - dr=$(/usr/bin/stat --format="%d %i" "/etc/$db") 37 + + dr=$(stat --format="%d %i" "/etc/$db") 38 + # This one can fail since it might not exist yet 39 + - dc=$(/usr/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) 40 + + dc=$(stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :) 41 + 42 + # If the database inside and outside the chroot is the 43 + # same, it's very likely that dup_nss would blank the
+33
pkgs/by-name/sc/schroot/no-default-config.patch
··· 1 + diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt 2 + index dd31fd3d..65521010 100644 3 + --- a/etc/CMakeLists.txt 4 + +++ b/etc/CMakeLists.txt 5 + @@ -19,20 +19,20 @@ 6 + set(schroot_sysconf_data 7 + schroot.conf) 8 + 9 + -install(FILES ${schroot_sysconf_data} 10 + - DESTINATION ${SCHROOT_SYSCONF_DIR}) 11 + +# install(FILES ${schroot_sysconf_data} 12 + +# DESTINATION ${SCHROOT_SYSCONF_DIR}) 13 + 14 + set(files 15 + copyfiles 16 + fstab 17 + nssdatabases) 18 + 19 + -set(profiles 20 + - buildd 21 + - default 22 + - desktop 23 + - minimal 24 + - sbuild) 25 + +# set(profiles 26 + +# buildd 27 + +# default 28 + +# desktop 29 + +# minimal 30 + +# sbuild) 31 + 32 + set(arches 33 + ${SBUILD_PLATFORM})
+10
pkgs/by-name/sc/schroot/no-pam-service.patch
··· 1 + --- a/etc/CMakeLists.txt 2 + +++ b/etc/CMakeLists.txt 3 + @@ -68,6 +68,6 @@ foreach(profile ${profiles}) 4 + endforeach(file) 5 + endforeach(profile) 6 + 7 + -add_subdirectory(pam) 8 + +# add_subdirectory(pam) 9 + add_subdirectory(bash_completion) 10 + add_subdirectory(setup.d)
+12
pkgs/by-name/sc/schroot/no-setuid.patch
··· 1 + --- a/bin/schroot/CMakeLists.txt 2 + +++ b/bin/schroot/CMakeLists.txt 3 + @@ -40,8 +40,7 @@ install(TARGETS schroot RUNTIME 4 + DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} 5 + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE 6 + GROUP_READ GROUP_EXECUTE 7 + - WORLD_READ WORLD_EXECUTE 8 + - SETUID) 9 + + WORLD_READ WORLD_EXECUTE) 10 + 11 + set(installdirs 12 + ${SCHROOT_CONF_CHROOT_D}
+104
pkgs/by-name/sc/schroot/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + 6 + # Runtime script dependencies 7 + coreutils, 8 + getent, 9 + gnugrep, 10 + gnused, 11 + gnutar, 12 + util-linux, 13 + 14 + # Native build inputs 15 + cmake, 16 + findutils, 17 + gettext, 18 + mandoc, 19 + makeWrapper, 20 + perlPackages, 21 + 22 + # Build inputs 23 + boost, 24 + }: 25 + 26 + let 27 + scripts-bin-path = lib.makeBinPath [ 28 + coreutils 29 + getent 30 + gnugrep 31 + gnused 32 + gnutar 33 + util-linux 34 + ]; 35 + upstream-version = "1.6.13"; 36 + in 37 + stdenv.mkDerivation { 38 + pname = "schroot"; 39 + version = "${upstream-version}-5"; 40 + 41 + src = fetchurl { 42 + url = "https://codeberg.org/shelter/reschroot/archive/release/reschroot-${upstream-version}.tar.gz"; 43 + hash = "sha256-wF1qG7AhDUAeZSLu4sRl4LQ8bJj3EB1nH56e+Is6zPU="; 44 + }; 45 + 46 + patches = map fetchurl (import ./debian-patches.nix) ++ [ 47 + ./no-setuid.patch 48 + ./no-pam-service.patch 49 + ./no-default-config.patch 50 + ./fix-absolute-paths.patch 51 + ]; 52 + 53 + nativeBuildInputs = [ 54 + cmake 55 + findutils 56 + gettext 57 + mandoc 58 + makeWrapper 59 + perlPackages.Po4a 60 + ]; 61 + 62 + buildInputs = [ 63 + boost 64 + ]; 65 + 66 + cmakeFlags = [ 67 + (lib.cmakeFeature "CMAKE_INSTALL_LOCALSTATEDIR" "/var") 68 + (lib.cmakeFeature "SCHROOT_SYSCONF_DIR" "/etc/schroot") 69 + (lib.cmakeFeature "SCHROOT_CONF_SETUP_D" "${placeholder "out"}/etc/schroot/setup.d") 70 + ]; 71 + 72 + postPatch = '' 73 + # Substitute the path to the mount binary 74 + substituteInPlace bin/schroot-mount/schroot-mount-main.cc \ 75 + --replace-fail "/bin/mount" "${util-linux}/bin/mount" 76 + ''; 77 + 78 + postFixup = '' 79 + # Make wrappers for all shell scripts used by schroot 80 + # The wrapped script are put into a separate directory to not be run by schroot during setup 81 + mkdir $out/etc/schroot/setup.d.wrapped 82 + cd $out/etc/schroot/setup.d 83 + find * -type f | while read -r file; do 84 + mv "$file" $out/etc/schroot/setup.d.wrapped 85 + makeWrapper "$out/etc/schroot/setup.d.wrapped/$file" "$file" --set PATH ${scripts-bin-path} 86 + done 87 + 88 + # Get rid of stuff that's (probably) not needed 89 + rm -vrf $out/lib $out/include 90 + ''; 91 + 92 + meta = { 93 + description = "Lightweight virtualisation tool"; 94 + longDescription = '' 95 + Schroot is a program that allows the user to run a command or a login shell in a chroot environment. 96 + ''; 97 + homepage = "https://codeberg.org/shelter/reschroot"; 98 + changelog = "https://codeberg.org/shelter/reschroot/raw/tag/release/reschroot-${upstream-version}/NEWS"; 99 + mainProgram = "schroot"; 100 + maintainers = with lib.maintainers; [ bjsowa ]; 101 + license = lib.licenses.gpl3Plus; 102 + platforms = lib.platforms.linux; 103 + }; 104 + }