diff --git a/AppImageBuilder (SFConflict Jacob Schantli 2026-09-22-18-48-54).yml b/AppImageBuilder (SFConflict Jacob Schantli 2026-09-22-18-48-54).yml new file mode 100644 index 0000000..b06f553 --- /dev/null +++ b/AppImageBuilder (SFConflict Jacob Schantli 2026-09-22-18-48-54).yml @@ -0,0 +1,43 @@ +version: 1 + +AppDir: + path: ./AppDir + app_info: + id: ca.schantli.MHWildsModManager + name: MHWildsModManager + icon: ca.schantli.MHWildsModManager + version: 1.0.0 + exec: usr/bin/python3 + exec_args: -m mhwmm $@ + apt: + arch: amd64 + allow_unauthenticated: true + sources: + - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse' + - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse' + include: + - python3 + - python3-gi + - gir1.2-gtk-4.0 + - gir1.2-adw-1 + - libglib2.0-bin + - libgtk-4-1 + - libadwaita-1-0 + - adwaita-icon-theme + - python3-requests + files: + include: [] + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/copyright + - usr/share/doc/*/TODO.* + runtime: + env: + PYTHONPATH: '${APPDIR}/usr/lib/python3.12/site-packages:${APPDIR}/usr/share/mhwmm' + +AppImage: + update-information: None + sign-key: None + arch: x86_64 diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index b06f553..ee15152 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -2,6 +2,16 @@ version: 1 AppDir: path: ./AppDir + after_bundle: | + echo "" >> $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + echo '"libpixbufloader-svg.so"' >> $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + echo '"svg" 6 "gdk-pixbuf" "Scalable Vector Graphics" "LGPL"' >> $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + echo '"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""' >> $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + echo '"svg" "svgz" "svg.gz" ""' >> $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + echo '" > $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + echo '" > $TARGET_APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache + gtk-update-icon-cache -f -t $TARGET_APPDIR/usr/share/icons/hicolor || true + gtk-update-icon-cache -f -t $TARGET_APPDIR/usr/share/icons/Adwaita || true app_info: id: ca.schantli.MHWildsModManager name: MHWildsModManager @@ -25,6 +35,7 @@ AppDir: - libadwaita-1-0 - adwaita-icon-theme - python3-requests + - librsvg2-common files: include: [] exclude: @@ -35,7 +46,12 @@ AppDir: - usr/share/doc/*/TODO.* runtime: env: - PYTHONPATH: '${APPDIR}/usr/lib/python3.12/site-packages:${APPDIR}/usr/share/mhwmm' + PYTHONPATH: '${APPDIR}/usr/lib/python3.12/site-packages:${APPDIR}/usr/share' + XDG_DATA_DIRS: '${APPDIR}/usr/share:/usr/local/share:/usr/share' + GDK_PIXBUF_MODULE_FILE: '${APPDIR}/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache' + GDK_PIXBUF_MODULEDIR: '${APPDIR}/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders' + GSETTINGS_SCHEMA_DIR: '${APPDIR}/usr/share/glib-2.0/schemas' + GTK_DATA_PREFIX: '${APPDIR}' AppImage: update-information: None diff --git a/build_appimage.sh b/build_appimage.sh index 017fd8e..1979581 100755 --- a/build_appimage.sh +++ b/build_appimage.sh @@ -11,7 +11,7 @@ mkdir -p AppDir/usr/share/applications mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps echo "Copying source files..." -cp -r src/mhwmm/* AppDir/usr/share/mhwmm/ +cp -r src/mhwmm AppDir/usr/share/ cat << 'WRAPPER' > AppDir/usr/bin/mhwmm #!/bin/bash export PYTHONPATH="${APPDIR}/usr/share/mhwmm:${PYTHONPATH}" diff --git a/data/ca.schantli.MHWildsModManager.png b/data/ca.schantli.MHWildsModManager.png index 191ccc9..54916fc 100644 Binary files a/data/ca.schantli.MHWildsModManager.png and b/data/ca.schantli.MHWildsModManager.png differ diff --git a/gtk_log.txt b/gtk_log.txt new file mode 100644 index 0000000..e69de29 diff --git a/icon_debug.log b/icon_debug.log new file mode 100644 index 0000000..d30a7de --- /dev/null +++ b/icon_debug.log @@ -0,0 +1 @@ +bash: line 1: xvfb-run: command not found diff --git a/squashfs-root/.DirIcon b/squashfs-root/.DirIcon new file mode 120000 index 0000000..2ad214f --- /dev/null +++ b/squashfs-root/.DirIcon @@ -0,0 +1 @@ +ca.schantli.MHWildsModManager.png \ No newline at end of file diff --git a/squashfs-root/.bundle.yml b/squashfs-root/.bundle.yml new file mode 100644 index 0000000..f31b1ca --- /dev/null +++ b/squashfs-root/.bundle.yml @@ -0,0 +1,202 @@ +apt: + sources: + - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble main restricted universe + multiverse + - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-updates main restricted + universe multiverse + packages: + - python3-pkg-resources:all=68.1.2-2ubuntu1.2 + - python3-gi:amd64=3.48.2-1 + - libappstream5:amd64=1.0.2-1build6 + - libavahi-common3:amd64=0.8-13ubuntu6.2 + - libkmod2:amd64=31+20240202-2ubuntu7.2 + - libtiff6:amd64=4.5.1+git230720-4ubuntu2.5 + - libjpeg8:amd64=8c-2ubuntu11 + - libldap2:amd64=2.6.10+dfsg-0ubuntu0.24.04.1 + - libxmlb2:amd64=0.3.24-1~ubuntu0.24.04.1 + - zlib1g:amd64=1:1.3.dfsg-3.1ubuntu2.2 + - libxdamage1:amd64=1:1.1.6-1build1 + - libidn2-0:amd64=2.3.7-2build1.1 + - gtk-update-icon-cache:amd64=3.24.41-4ubuntu1.3 + - gir1.2-harfbuzz-0.0:amd64=8.3.0-2build2 + - libglib2.0-0t64:amd64=2.80.0-6ubuntu3.9 + - libpam-modules:amd64=1.5.3-5ubuntu5.7 + - libtasn1-6:amd64=4.19.0-3ubuntu0.24.04.2 + - libfontconfig1:amd64=2.15.0-1.1ubuntu2 + - libncursesw6:amd64=6.4+20240113-1ubuntu2.2 + - libpam-modules-bin:amd64=1.5.3-5ubuntu5.7 + - libsystemd0:amd64=255.4-1ubuntu8.17 + - libgnutls30t64:amd64=3.8.3-1.1ubuntu3.6 + - libgdk-pixbuf-2.0-0:amd64=2.42.10+dfsg-3ubuntu3.3 + - libk5crypto3:amd64=1.20.1-6ubuntu2.10 + - libcryptsetup12:amd64=2:2.7.0-1ubuntu4.2 + - libbrotli1:amd64=1.1.0-2build2 + - libcairo-gobject2:amd64=1.18.0-3build1 + - libgirepository-1.0-1:amd64=1.80.1-1 + - adwaita-icon-theme:all=46.0-1 + - openssl:amd64=3.0.13-0ubuntu3.16 + - dconf-gsettings-backend:amd64=0.40.0-4ubuntu0.1 + - librsvg2-2:amd64=2.58.0+dfsg-1build1 + - libacl1:amd64=2.3.2-1build1.1 + - libxfixes3:amd64=1:6.0.0-2build1 + - liblzma5:amd64=5.6.1+really5.4.5-1ubuntu0.3 + - libharfbuzz0b:amd64=8.3.0-2build2 + - gir1.2-gdkpixbuf-2.0:amd64=2.42.10+dfsg-3ubuntu3.3 + - libdbus-1-3:amd64=1.14.10-4ubuntu4.1 + - fontconfig-config:amd64=2.15.0-1.1ubuntu2 + - netbase:all=6.4 + - libcom-err2:amd64=1.47.0-2.4~exp1ubuntu4.1 + - systemd:amd64=255.4-1ubuntu8.17 + - libxml2:amd64=2.9.14+dfsg-1.3ubuntu3.9 + - libc6:amd64=2.39-0ubuntu8.9 + - fdisk:amd64=2.39.3-9ubuntu6.6 + - libhogweed6t64:amd64=3.9.1-2.2build1.1 + - python3:amd64=3.12.3-0ubuntu2.1 + - libunistring5:amd64=1.1-2build1.1 + - libgssapi-krb5-2:amd64=1.20.1-6ubuntu2.10 + - dconf-service:amd64=0.40.0-4ubuntu0.1 + - libcolord2:amd64=1.4.7-1build2 + - libapparmor1:amd64=4.0.1really4.0.1-0ubuntu0.24.04.8 + - dbus-system-bus-common:all=1.14.10-4ubuntu4.1 + - libpangocairo-1.0-0:amd64=1.52.1+ds-1build1 + - libudev1:amd64=255.4-1ubuntu8.17 + - libepoxy0:amd64=1.5.10-1build1 + - systemd-sysv:amd64=255.4-1ubuntu8.17 + - fonts-dejavu-core:all=2.37-8 + - liblerc4:amd64=4.0.0+ds-4ubuntu2 + - libtinfo6:amd64=6.4+20240113-1ubuntu2.2 + - gir1.2-freedesktop:amd64=1.80.1-1 + - libsharpyuv0:amd64=1.3.2-0.4build3 + - gir1.2-adw-1:amd64=1.5.0-1ubuntu2 + - avahi-daemon:amd64=0.8-13ubuntu6.2 + - libdb5.3t64:amd64=5.3.28+dfsg2-7 + - libstemmer0d:amd64=2.2.0-4build1 + - libcurl3t64-gnutls:amd64=8.5.0-2ubuntu10.15 + - libsystemd-shared:amd64=255.4-1ubuntu8.17 + - libpangoft2-1.0-0:amd64=1.52.1+ds-1build1 + - libargon2-1:amd64=0~20190702+dfsg-4build1 + - libicu74:amd64=74.2-1ubuntu3.1 + - libproc2-0:amd64=2:4.0.4-4ubuntu3.3 + - libdevmapper1.02.1:amd64=2:1.02.185-3ubuntu3.2 + - libxcursor1:amd64=1:1.2.1-1build1 + - libjson-c5:amd64=0.17-1build1 + - gir1.2-glib-2.0:amd64=2.80.0-6ubuntu3.9 + - gcc-14-base:amd64=14.2.0-4ubuntu2~24.04.1 + - libp11-kit0:amd64=0.25.3-4ubuntu2.2 + - libcups2t64:amd64=2.4.7-1.2ubuntu7.14 + - libfdisk1:amd64=2.39.3-9ubuntu6.6 + - dbus-daemon:amd64=1.14.10-4ubuntu4.1 + - gir1.2-graphene-1.0:amd64=1.10.8-3build2 + - libkeyutils1:amd64=1.6.3-3build1 + - libgtk-4-1:amd64=4.14.5+ds-0ubuntu0.10 + - fontconfig:amd64=2.15.0-1.1ubuntu2 + - dbus-bin:amd64=1.14.10-4ubuntu4.1 + - liblzo2-2:amd64=2.10-2build4 + - libpsl5t64:amd64=0.21.2-1.1build1 + - ca-certificates:all=20260601~24.04.1 + - libthai-data:all=0.1.29-2build1 + - libffi8:amd64=3.4.6-1build1 + - libharfbuzz-gobject0:amd64=8.3.0-2build2 + - libpython3-stdlib:amd64=3.12.3-0ubuntu2.1 + - librtmp1:amd64=2.4+20151223.gitfa8646d.1-2build7 + - liblcms2-2:amd64=2.14-2ubuntu0.1 + - libzstd1:amd64=1.5.5+dfsg2-2build1.1 + - libvulkan1:amd64=1.3.275.0-1build1 + - libcap-ng0:amd64=0.8.4-2build2 + - libfreetype6:amd64=2.13.2+dfsg-1ubuntu0.1 + - gir1.2-gtk-4.0:amd64=4.14.5+ds-0ubuntu0.10 + - libpam-systemd:amd64=255.4-1ubuntu8.17 + - libaudit1:amd64=1:3.1.2-2.1ubuntu0.1 + - fonts-dejavu-mono:all=2.37-8 + - libdconf1:amd64=0.40.0-4ubuntu0.1 + - libkrb5support0:amd64=1.20.1-6ubuntu2.10 + - gir1.2-girepository-2.0:amd64=1.80.1-1 + - libdatrie1:amd64=0.2.13-3build1 + - libpam0g:amd64=1.5.3-5ubuntu5.7 + - librsvg2-common:amd64=2.58.0+dfsg-1build1 + - libgcrypt20:amd64=1.10.3-2ubuntu0.2 + - tzdata:all=2026c-0ubuntu0.24.04.1 + - libbz2-1.0:amd64=1.0.8-5.1ubuntu0.1 + - libsqlite3-0:amd64=3.45.1-1ubuntu2.8 + - dbus-user-session:amd64=1.14.10-4ubuntu4.1 + - libgtk-4-common:all=4.14.5+ds-0ubuntu0.10 + - libpython3.12-stdlib:amd64=3.12.3-1ubuntu0.17 + - dbus:amd64=1.14.10-4ubuntu4.1 + - libsasl2-modules-db:amd64=2.1.28+dfsg1-5ubuntu3.1 + - mount:amd64=2.39.3-9ubuntu6.6 + - libuuid1:amd64=2.39.3-9ubuntu6.6 + - libelf1t64:amd64=0.190-1.1ubuntu0.1 + - systemd-dev:all=255.4-1ubuntu8.17 + - libpangoxft-1.0-0:amd64=1.52.1+ds-1build1 + - libnettle8t64:amd64=3.9.1-2.2build1.1 + - libgpg-error0:amd64=1.47-3build2.1 + - libseccomp2:amd64=2.5.5-1ubuntu3.1 + - libaudit-common:all=1:3.1.2-2.1ubuntu0.1 + - libxrandr2:amd64=2:1.5.2-2build1 + - libxext6:amd64=2:1.3.4-1build2 + - libglib2.0-bin:amd64=2.80.0-6ubuntu3.9 + - libpixman-1-0:amd64=0.42.2-1build1 + - python3-chardet:all=5.2.0+dfsg-1 + - libstdc++6:amd64=14.2.0-4ubuntu2~24.04.1 + - python3.12-minimal:amd64=3.12.3-1ubuntu0.17 + - python3-certifi:all=2023.11.17-1 + - libpcre2-8-0:amd64=10.42-4ubuntu2.1 + - libcap2-bin:amd64=1:2.66-5ubuntu2.4 + - libdeflate0:amd64=1.19-1build1.1 + - ubuntu-mono:all=24.04-0ubuntu1 + - libdaemon0:amd64=0.14-7.1ubuntu4 + - hicolor-icon-theme:all=0.17-2 + - libthai0:amd64=0.1.29-2build1 + - libreadline8t64:amd64=8.2-4build1 + - util-linux:amd64=2.39.3-9ubuntu6.6 + - libgdk-pixbuf2.0-common:all=2.42.10+dfsg-3ubuntu3.3 + - libcap2:amd64=1:2.66-5ubuntu2.4 + - libpython3.12-minimal:amd64=3.12.3-1ubuntu0.17 + - libssh-4:amd64=0.10.6-2ubuntu0.5 + - libcrypt1:amd64=1:4.4.36-4build1 + - libselinux1:amd64=3.5-2ubuntu2.1 + - libavahi-common-data:amd64=0.8-13ubuntu6.2 + - python3-requests:all=2.31.0+dfsg-1ubuntu1.2 + - libgcc-s1:amd64=14.2.0-4ubuntu2~24.04.1 + - media-types:all=10.1.0 + - libcairo-script-interpreter2:amd64=1.18.0-3build1 + - libsmartcols1:amd64=2.39.3-9ubuntu6.6 + - libglib2.0-data:all=2.80.0-6ubuntu3.9 + - readline-common:all=8.2-4build1 + - libgmp10:amd64=2:6.3.0+dfsg-2ubuntu6.1 + - xkb-data:all=2.41-2ubuntu1.1 + - libgraphite2-3:amd64=1.3.14-2ubuntu0.24.04.1 + - libjbig0:amd64=2.1-6.1ubuntu2 + - libxft2:amd64=2.3.6-1build1 + - libkrb5-3:amd64=1.20.1-6ubuntu2.10 + - libblkid1:amd64=2.39.3-9ubuntu6.6 + - libexpat1:amd64=2.6.1-2ubuntu0.6 + - gir1.2-pango-1.0:amd64=1.52.1+ds-1build1 + - libavahi-client3:amd64=0.8-13ubuntu6.2 + - libxi6:amd64=2:1.8.1-1build1 + - libfribidi0:amd64=1.0.13-3build1 + - python3-urllib3:all=2.0.7-1ubuntu0.7 + - libpng16-16t64:amd64=1.6.43-5ubuntu0.6 + - libadwaita-1-0:amd64=1.5.0-1ubuntu2 + - libxrender1:amd64=1:0.9.10-1.1build1 + - libxinerama1:amd64=2:1.1.4-3build1 + - python3-idna:all=3.6-2ubuntu0.2 + - libgraphene-1.0-0:amd64=1.10.8-3build2 + - libnghttp2-14:amd64=1.59.0-1ubuntu0.4 + - liblz4-1:amd64=1.9.4-1build1.1 + - libyaml-0-2:amd64=0.2.5-1build1 + - libpam-runtime:all=1.5.3-5ubuntu5.7 + - libavahi-core7:amd64=0.8-13ubuntu6.2 + - libssl3t64:amd64=3.0.13-0ubuntu3.16 + - libmount1:amd64=2.39.3-9ubuntu6.6 + - dbus-session-bus-common:all=1.14.10-4ubuntu4.1 + - humanity-icon-theme:all=0.6.16 + - libjpeg-turbo8:amd64=2.1.5-2ubuntu2 + - libcairo2:amd64=1.18.0-3build1 + - libsasl2-2:amd64=2.1.28+dfsg1-5ubuntu3.1 + - procps:amd64=2:4.0.4-4ubuntu3.3 + - libwebp7:amd64=1.3.2-0.4build3 + - libpango-1.0-0:amd64=1.52.1+ds-1build1 + - python3.12:amd64=3.12.3-1ubuntu0.17 + - python3-minimal:amd64=3.12.3-0ubuntu2.1 + - libxkbcommon0:amd64=1.6.0-1build1 diff --git a/squashfs-root/AppRun b/squashfs-root/AppRun new file mode 100755 index 0000000..a61ef10 Binary files /dev/null and b/squashfs-root/AppRun differ diff --git a/squashfs-root/AppRun.env b/squashfs-root/AppRun.env new file mode 100644 index 0000000..898ccc6 --- /dev/null +++ b/squashfs-root/AppRun.env @@ -0,0 +1,22 @@ +APPDIR=$ORIGIN +APPIMAGE_UUID=WCGkbUc +APPDIR_EXEC_PATH=$APPDIR/usr/bin/python3 +APPDIR_EXEC_ARGS=-m mhwmm $@ +XDG_DATA_DIRS=$APPDIR/usr/local/share:$APPDIR/usr/share:$XDG_DATA_DIRS +XDG_CONFIG_DIRS=$APPDIR/etc/xdg:$XDG_CONFIG_DIRS +APPDIR_LIBRARY_PATH=$APPDIR/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/cryptsetup:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/x86_64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/x86_64-linux-gnu/sasl2:$APPDIR/usr/lib/x86_64-linux-gnu/security:$APPDIR/usr/lib/x86_64-linux-gnu/systemd:$APPDIR/lib/x86_64 +PATH=$APPDIR/etc/init.d:$APPDIR/etc/security:$APPDIR/usr/bin:$APPDIR/usr/lib/dbus-1.0:$APPDIR/usr/lib/kernel/install.d:$APPDIR/usr/lib/python3.12:$APPDIR/usr/lib/python3.12/encodings:$APPDIR/usr/lib/python3.12/test:$APPDIR/usr/lib/python3.12/test/support:$APPDIR/usr/lib/ssl/misc:$APPDIR/usr/lib/systemd:$APPDIR/usr/lib/systemd/system-generators:$APPDIR/usr/lib/systemd/user-environment-generators:$APPDIR/usr/lib/systemd/user-generators:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0:$APPDIR/usr/lib/x86_64-linux-gnu/glib-2.0:$APPDIR/usr/libexec:$APPDIR/usr/sbin:$APPDIR/usr/share/bug:$APPDIR/usr/share/bug/systemd:$APPDIR/usr/share/doc/ca-certificates/examples/ca-certificates-local/debian:$APPDIR/usr/share/libgcrypt20:$APPDIR/usr/share/python3:$APPDIR/usr/share/python3/runtime.d:$PATH +GDK_PIXBUF_MODULEDIR=$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders +GDK_PIXBUF_MODULE_FILE=$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache +GIO_MODULE_DIR=$APPDIR/usr/lib/x86_64-linux-gnu/gio/modules +GSETTINGS_SCHEMA_DIR=$APPDIR/usr/share/glib-2.0/schemas +GI_TYPELIB_PATH=$APPDIR/usr/lib/x86_64-linux-gnu/girepository-1.0 +GTK_EXE_PREFIX=$APPDIR/usr +GTK_DATA_PREFIX=$APPDIR/usr +GTK_PATH=$APPDIR/usr/lib/x86_64-linux-gnu/gtk-4.0 +APPDIR_LIBC_LIBRARY_PATH=$APPDIR/runtime/compat/usr/lib/x86_64-linux-gnu:$APPDIR/runtime/compat/usr/lib/x86_64-linux-gnu/gconv:$APPDIR/runtime/compat/usr/lib64 +APPDIR_LIBC_VERSION=2.39 +PYTHONHOME=$APPDIR/usr +PYTHONPATH=$APPDIR/usr/lib/python3.12/site-packages:$APPDIR/usr/share +APPDIR_PATH_MAPPINGS=/workspace/AppDir:$APPDIR; +APPDIR_LIBC_LINKER_PATH={'lib64/ld-linux-x86-64.so.2'} diff --git a/squashfs-root/ca.schantli.MHWildsModManager.desktop b/squashfs-root/ca.schantli.MHWildsModManager.desktop new file mode 100644 index 0000000..12d0af0 --- /dev/null +++ b/squashfs-root/ca.schantli.MHWildsModManager.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +X-AppImage-Arch=x86_64 +X-AppImage-Version=1.0.0 +X-AppImage-Name=MHWildsModManager +Type=Application +Name=MH Wilds Mod Manager +Comment=Manage mods for Monster Hunter Wilds +Exec=mhwmm %u +Icon=applications-games +Terminal=false +Categories=Game;Utility; +MimeType=x-scheme-handler/nxm; +StartupNotify=true diff --git a/squashfs-root/ca.schantli.MHWildsModManager.png b/squashfs-root/ca.schantli.MHWildsModManager.png new file mode 100644 index 0000000..54916fc Binary files /dev/null and b/squashfs-root/ca.schantli.MHWildsModManager.png differ diff --git a/squashfs-root/etc/X11/Xsession.d/20dbus_xdg-runtime b/squashfs-root/etc/X11/Xsession.d/20dbus_xdg-runtime new file mode 100644 index 0000000..2404378 --- /dev/null +++ b/squashfs-root/etc/X11/Xsession.d/20dbus_xdg-runtime @@ -0,0 +1,28 @@ +# vim:set ft=sh sw=2 sts=2 et: + +if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -n "$XDG_RUNTIME_DIR" ] && \ + [ "$XDG_RUNTIME_DIR" = "/run/user/`id -u`" ] && \ + [ -S "$XDG_RUNTIME_DIR/bus" ]; then + # We are under systemd-logind or something remarkably similar, and + # a user-session socket has already been set up. + # + # Be nice to non-libdbus, non-sd-bus implementations by using + # that as the session bus address in the environment. The check for + # XDG_RUNTIME_DIR = "/run/user/`id -u`" is because we know that + # form of the address, from systemd-logind, doesn't need escaping, + # whereas arbitrary addresses might. + DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus" + export DBUS_SESSION_BUS_ADDRESS +fi + +if [ -x "/usr/bin/dbus-update-activation-environment" ]; then + # tell dbus-daemon --session (and systemd --user, if running) + # to put a minimal subset of the Xsession's environment in activated + # services' environments + dbus-update-activation-environment --verbose --systemd \ + DBUS_SESSION_BUS_ADDRESS \ + DISPLAY \ + XAUTHORITY \ + XDG_CURRENT_DESKTOP \ + ${NULL+} +fi diff --git a/squashfs-root/etc/avahi/avahi-daemon.conf b/squashfs-root/etc/avahi/avahi-daemon.conf new file mode 100644 index 0000000..f2eca08 --- /dev/null +++ b/squashfs-root/etc/avahi/avahi-daemon.conf @@ -0,0 +1,69 @@ +# This file is part of avahi. +# +# avahi is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# avahi is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with avahi; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +# See avahi-daemon.conf(5) for more information on this configuration +# file! + +[server] +#host-name=foo +#domain-name=local +#browse-domains=0pointer.de, zeroconf.org +use-ipv4=yes +use-ipv6=yes +#allow-interfaces=eth0 +#deny-interfaces=eth1 +#check-response-ttl=no +#use-iff-running=no +#enable-dbus=yes +#disallow-other-stacks=no +#allow-point-to-point=no +#cache-entries-max=4096 +#clients-max=4096 +#objects-per-client-max=1024 +#entries-per-entry-group-max=32 +ratelimit-interval-usec=1000000 +ratelimit-burst=1000 + +[wide-area] +enable-wide-area=yes + +[publish] +#disable-publishing=no +#disable-user-service-publishing=no +#add-service-cookie=no +#publish-addresses=yes +publish-hinfo=no +publish-workstation=no +#publish-domain=yes +#publish-dns-servers=192.168.50.1, 192.168.50.2 +#publish-resolv-conf-dns-servers=yes +#publish-aaaa-on-ipv4=yes +#publish-a-on-ipv6=no + +[reflector] +#enable-reflector=no +#reflect-ipv=no +#reflect-filters=_airplay._tcp.local,_raop._tcp.local + +[rlimits] +#rlimit-as= +#rlimit-core=0 +#rlimit-data=8388608 +#rlimit-fsize=0 +#rlimit-nofile=768 +#rlimit-stack=8388608 +#rlimit-nproc=3 diff --git a/squashfs-root/etc/avahi/hosts b/squashfs-root/etc/avahi/hosts new file mode 100644 index 0000000..4483340 --- /dev/null +++ b/squashfs-root/etc/avahi/hosts @@ -0,0 +1,27 @@ +# This file is part of avahi. +# +# avahi is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# avahi is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with avahi; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. + +# This file contains static ip address <-> host name mappings. These +# can be useful to publish services on behalf of a non-avahi enabled +# device. Please bear in mind that host names are expected to be +# fully qualified domain names, i.e. ending in .local! + +# See avahi.hosts(5) for more information on this configuration file! + +# Examples: +# 192.168.0.1 router.local +# 2001::81:1 test.local diff --git a/squashfs-root/etc/default/dbus b/squashfs-root/etc/default/dbus new file mode 100644 index 0000000..4bc8e1b --- /dev/null +++ b/squashfs-root/etc/default/dbus @@ -0,0 +1,7 @@ +# This is a configuration file for /etc/init.d/dbus; it allows you to +# perform common modifications to the behavior of the dbus daemon +# startup without editing the init script (and thus getting prompted +# by dpkg on upgrades). We all love dpkg prompts. + +# Parameters to pass to dbus. +PARAMS="" diff --git a/squashfs-root/etc/ethertypes b/squashfs-root/etc/ethertypes new file mode 100644 index 0000000..261b837 --- /dev/null +++ b/squashfs-root/etc/ethertypes @@ -0,0 +1,46 @@ +# Ethernet frame types +# +# The EtherType is a two-octet field of Ethernet frames used to indicate +# which protocol is contained in their payload. +# +# More entries, mostly historical, can be found on: +# https://www.iana.org/assignments/ieee-802-numbers/ +# http://standards-oui.ieee.org/ethertype/eth.txt +# +# ... # Comment +# +IPv4 0800 ip ip4 # IP (IPv4) +X25 0805 +ARP 0806 ether-arp # Address Resolution Protocol +FR_ARP 0808 # Frame Relay ARP [RFC1701] +BPQ 08FF # G8BPQ AX.25 over Ethernet +TRILL 22F3 # TRILL [RFC6325] +L2-IS-IS 22F4 # TRILL IS-IS [RFC6325] +TEB 6558 # Transparent Ethernet Bridging [RFC1701] +RAW_FR 6559 # Raw Frame Relay [RFC1701] +RARP 8035 # Reverse ARP [RFC903] +ATALK 809B # Appletalk +AARP 80F3 # Appletalk Address Resolution Protocol +802_1Q 8100 8021q 1q 802.1q dot1q # VLAN tagged frame [802.1q] +IPX 8137 # Novell IPX +NetBEUI 8191 # NetBEUI +IPv6 86DD ip6 # IP version 6 +PPP 880B # Point-to-Point Protocol +MPLS 8847 # MPLS [RFC5332] +MPLS_MULTI 8848 # MPLS with upstream-assigned label [RFC5332] +ATMMPOA 884C # MultiProtocol over ATM +PPP_DISC 8863 # PPP over Ethernet discovery stage +PPP_SES 8864 # PPP over Ethernet session stage +ATMFATE 8884 # Frame-based ATM Transport over Ethernet +EAPOL 888E # EAP over LAN [802.1x] +S-TAG 88A8 # QinQ Service VLAN tag identifier [802.1q] +EAP_PREAUTH 88C7 # EAPOL Pre-Authentication [802.11i] +LLDP 88CC # Link Layer Discovery Protocol [802.1ab] +MACSEC 88E5 # Media Access Control Security [802.1ae] +PBB 88E7 macinmac # Provider Backbone Bridging [802.1ah] +MVRP 88F5 # Multiple VLAN Registration Protocol [802.1q] +PTP 88F7 # Precision Time Protocol +FCOE 8906 # Fibre Channel over Ethernet +FIP 8914 # FCoE Initialization Protocol +ROCE 8915 # RDMA over Converged Ethernet +LoWPAN A0ED # LoWPAN encapsulation diff --git a/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf new file mode 100644 index 0000000..9036e83 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf @@ -0,0 +1,26 @@ + + + + + + + DejaVu LGC Sans Mono + + + 7.5 + + + false + + + diff --git a/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-sans.conf b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-sans.conf new file mode 100644 index 0000000..35abebd --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-sans.conf @@ -0,0 +1,26 @@ + + + + + + + DejaVu LGC Sans + + + 7.5 + + + false + + + diff --git a/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-serif.conf b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-serif.conf new file mode 100644 index 0000000..54486e8 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-lgc-serif.conf @@ -0,0 +1,26 @@ + + + + + + + DejaVu LGC Serif + + + 7.5 + + + false + + + diff --git a/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf new file mode 100644 index 0000000..102dbcc --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-sans-mono.conf @@ -0,0 +1,26 @@ + + + + + + + DejaVu Sans Mono + + + 7.5 + + + false + + + diff --git a/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-sans.conf b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-sans.conf new file mode 100644 index 0000000..ee69996 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-sans.conf @@ -0,0 +1,26 @@ + + + + + + + DejaVu Sans + + + 7.5 + + + false + + + diff --git a/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-serif.conf b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-serif.conf new file mode 100644 index 0000000..cf6caa2 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/20-unhint-small-dejavu-serif.conf @@ -0,0 +1,26 @@ + + + + + + + DejaVu Serif + + + 7.5 + + + false + + + diff --git a/squashfs-root/etc/fonts/conf.avail/57-dejavu-sans-mono.conf b/squashfs-root/etc/fonts/conf.avail/57-dejavu-sans-mono.conf new file mode 100644 index 0000000..2c75b5c --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/57-dejavu-sans-mono.conf @@ -0,0 +1,48 @@ + + + + + + + Bepa Mono + + DejaVu Sans Mono + + + + Bitstream Prima Sans Mono + + DejaVu Sans Mono + + + + Bitstream Vera Sans Mono + + DejaVu Sans Mono + + + + DejaVu LGC Sans Mono + + DejaVu Sans Mono + + + + Olwen Sans Mono + + DejaVu Sans Mono + + + + SUSE Sans Mono + + DejaVu Sans Mono + + + diff --git a/squashfs-root/etc/fonts/conf.avail/57-dejavu-sans.conf b/squashfs-root/etc/fonts/conf.avail/57-dejavu-sans.conf new file mode 100644 index 0000000..cff7a84 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/57-dejavu-sans.conf @@ -0,0 +1,73 @@ + + + + + + + Arev Sans + + DejaVu Sans + + + + Bepa + + DejaVu Sans + + + + Bitstream Prima Sans + + DejaVu Sans + + + + Bitstream Vera Sans + + DejaVu Sans + + + + DejaVu LGC Sans + + DejaVu Sans + + + + Hunky Sans + + DejaVu Sans + + + + Olwen Sans + + DejaVu Sans + + + + SUSE Sans + + DejaVu Sans + + + + Verajja + + DejaVu Sans + + + + + VerajjaPDA + + DejaVu Sans + + + diff --git a/squashfs-root/etc/fonts/conf.avail/57-dejavu-serif.conf b/squashfs-root/etc/fonts/conf.avail/57-dejavu-serif.conf new file mode 100644 index 0000000..10ae70f --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/57-dejavu-serif.conf @@ -0,0 +1,55 @@ + + + + + + + Bitstream Prima Serif + + DejaVu Serif + + + + Bitstream Vera Serif + + DejaVu Serif + + + + DejaVu LGC Serif + + DejaVu Serif + + + + Hunky Serif + + DejaVu Serif + + + + Olwen Serif + + DejaVu Serif + + + + SUSE Serif + + DejaVu Serif + + + + + Verajja Serif + + DejaVu Serif + + + diff --git a/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-sans-mono.conf b/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-sans-mono.conf new file mode 100644 index 0000000..9d0a8b2 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-sans-mono.conf @@ -0,0 +1,62 @@ + + + + + + + Bepa Mono + + DejaVu LGC Sans Mono + + + + Bitstream Prima Sans Mono + + DejaVu LGC Sans Mono + + + + Bitstream Vera Sans Mono + + DejaVu LGC Sans Mono + + + + DejaVu Sans Mono + + DejaVu LGC Sans Mono + + + + Olwen Sans Mono + + DejaVu LGC Sans Mono + + + + SUSE Sans Mono + + DejaVu LGC Sans Mono + + + + + DejaVu LGC Sans Mono + + monospace + + + + + monospace + + DejaVu LGC Sans Mono + + + diff --git a/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-sans.conf b/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-sans.conf new file mode 100644 index 0000000..decd2a3 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-sans.conf @@ -0,0 +1,87 @@ + + + + + + + Arev Sans + + DejaVu LGC Sans + + + + Bepa + + DejaVu LGC Sans + + + + Bitstream Prima Sans + + DejaVu LGC Sans + + + + Bitstream Vera Sans + + DejaVu LGC Sans + + + + DejaVu Sans + + DejaVu LGC Sans + + + + Hunky Sans + + DejaVu LGC Sans + + + + Olwen Sans + + DejaVu LGC Sans + + + + SUSE Sans + + DejaVu LGC Sans + + + + Verajja + + DejaVu LGC Sans + + + + + VerajjaPDA + + DejaVu LGC Sans + + + + + DejaVu LGC Sans + + sans-serif + + + + + sans-serif + + DejaVu LGC Sans + + + diff --git a/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-serif.conf b/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-serif.conf new file mode 100644 index 0000000..01045e8 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.avail/58-dejavu-lgc-serif.conf @@ -0,0 +1,69 @@ + + + + + + + Bitstream Prima Serif + + DejaVu LGC Serif + + + + Bitstream Vera Serif + + DejaVu LGC Serif + + + + DejaVu Serif + + DejaVu LGC Serif + + + + Hunky Serif + + DejaVu LGC Serif + + + + Olwen Serif + + DejaVu LGC Serif + + + + SUSE Serif + + DejaVu LGC Serif + + + + + Verajja Serif + + DejaVu LGC Serif + + + + + DejaVu LGC Serif + + serif + + + + + serif + + DejaVu LGC Serif + + + diff --git a/squashfs-root/etc/fonts/conf.d/10-hinting-slight.conf b/squashfs-root/etc/fonts/conf.d/10-hinting-slight.conf new file mode 120000 index 0000000..01f79e4 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/10-hinting-slight.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/10-hinting-slight.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/10-scale-bitmap-fonts.conf b/squashfs-root/etc/fonts/conf.d/10-scale-bitmap-fonts.conf new file mode 120000 index 0000000..6cb900e --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/10-scale-bitmap-fonts.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/10-sub-pixel-rgb.conf b/squashfs-root/etc/fonts/conf.d/10-sub-pixel-rgb.conf new file mode 120000 index 0000000..79c7607 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/10-sub-pixel-rgb.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/10-yes-antialias.conf b/squashfs-root/etc/fonts/conf.d/10-yes-antialias.conf new file mode 120000 index 0000000..4564744 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/10-yes-antialias.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/10-yes-antialias.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/11-lcdfilter-default.conf b/squashfs-root/etc/fonts/conf.d/11-lcdfilter-default.conf new file mode 120000 index 0000000..bb3a46a --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/11-lcdfilter-default.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans-mono.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans-mono.conf new file mode 120000 index 0000000..068e8ea --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans-mono.conf @@ -0,0 +1 @@ +../conf.avail/20-unhint-small-dejavu-lgc-sans-mono.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans.conf new file mode 120000 index 0000000..4c76710 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-sans.conf @@ -0,0 +1 @@ +../conf.avail/20-unhint-small-dejavu-lgc-sans.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-serif.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-serif.conf new file mode 120000 index 0000000..1c8a107 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-lgc-serif.conf @@ -0,0 +1 @@ +../conf.avail/20-unhint-small-dejavu-lgc-serif.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf new file mode 120000 index 0000000..e075245 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf @@ -0,0 +1 @@ +../conf.avail/20-unhint-small-dejavu-sans-mono.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf new file mode 120000 index 0000000..61320a1 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf @@ -0,0 +1 @@ +../conf.avail/20-unhint-small-dejavu-sans.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf new file mode 120000 index 0000000..7abd5e1 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf @@ -0,0 +1 @@ +../conf.avail/20-unhint-small-dejavu-serif.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/20-unhint-small-vera.conf b/squashfs-root/etc/fonts/conf.d/20-unhint-small-vera.conf new file mode 120000 index 0000000..1146856 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/20-unhint-small-vera.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/20-unhint-small-vera.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/30-metric-aliases.conf b/squashfs-root/etc/fonts/conf.d/30-metric-aliases.conf new file mode 120000 index 0000000..5eddea4 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/30-metric-aliases.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/30-metric-aliases.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/40-nonlatin.conf b/squashfs-root/etc/fonts/conf.d/40-nonlatin.conf new file mode 120000 index 0000000..fc61c52 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/40-nonlatin.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/40-nonlatin.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/45-generic.conf b/squashfs-root/etc/fonts/conf.d/45-generic.conf new file mode 120000 index 0000000..4f59d5a --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/45-generic.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/45-generic.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/45-latin.conf b/squashfs-root/etc/fonts/conf.d/45-latin.conf new file mode 120000 index 0000000..866458f --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/45-latin.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/45-latin.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/48-spacing.conf b/squashfs-root/etc/fonts/conf.d/48-spacing.conf new file mode 120000 index 0000000..009b437 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/48-spacing.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/48-spacing.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/49-sansserif.conf b/squashfs-root/etc/fonts/conf.d/49-sansserif.conf new file mode 120000 index 0000000..1e8ffe3 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/49-sansserif.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/49-sansserif.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/50-user.conf b/squashfs-root/etc/fonts/conf.d/50-user.conf new file mode 120000 index 0000000..71574c0 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/50-user.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/50-user.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/51-local.conf b/squashfs-root/etc/fonts/conf.d/51-local.conf new file mode 120000 index 0000000..8dec1a3 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/51-local.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/51-local.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/57-dejavu-sans-mono.conf b/squashfs-root/etc/fonts/conf.d/57-dejavu-sans-mono.conf new file mode 120000 index 0000000..c0c1959 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/57-dejavu-sans-mono.conf @@ -0,0 +1 @@ +../conf.avail/57-dejavu-sans-mono.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/57-dejavu-sans.conf b/squashfs-root/etc/fonts/conf.d/57-dejavu-sans.conf new file mode 120000 index 0000000..92a40d6 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/57-dejavu-sans.conf @@ -0,0 +1 @@ +../conf.avail/57-dejavu-sans.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/57-dejavu-serif.conf b/squashfs-root/etc/fonts/conf.d/57-dejavu-serif.conf new file mode 120000 index 0000000..b7e7481 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/57-dejavu-serif.conf @@ -0,0 +1 @@ +../conf.avail/57-dejavu-serif.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-sans-mono.conf b/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-sans-mono.conf new file mode 120000 index 0000000..89ea6b2 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-sans-mono.conf @@ -0,0 +1 @@ +../conf.avail/58-dejavu-lgc-sans-mono.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-sans.conf b/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-sans.conf new file mode 120000 index 0000000..ca377e0 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-sans.conf @@ -0,0 +1 @@ +../conf.avail/58-dejavu-lgc-sans.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-serif.conf b/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-serif.conf new file mode 120000 index 0000000..603352a --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/58-dejavu-lgc-serif.conf @@ -0,0 +1 @@ +../conf.avail/58-dejavu-lgc-serif.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/60-generic.conf b/squashfs-root/etc/fonts/conf.d/60-generic.conf new file mode 120000 index 0000000..bb6fc31 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/60-generic.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/60-generic.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/60-latin.conf b/squashfs-root/etc/fonts/conf.d/60-latin.conf new file mode 120000 index 0000000..87dbfbe --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/60-latin.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/60-latin.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/65-fonts-persian.conf b/squashfs-root/etc/fonts/conf.d/65-fonts-persian.conf new file mode 120000 index 0000000..e0cfb6f --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/65-fonts-persian.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/65-fonts-persian.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/65-nonlatin.conf b/squashfs-root/etc/fonts/conf.d/65-nonlatin.conf new file mode 120000 index 0000000..83675be --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/65-nonlatin.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/65-nonlatin.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/69-unifont.conf b/squashfs-root/etc/fonts/conf.d/69-unifont.conf new file mode 120000 index 0000000..f498f7f --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/69-unifont.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/69-unifont.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/70-no-bitmaps-except-emoji.conf b/squashfs-root/etc/fonts/conf.d/70-no-bitmaps-except-emoji.conf new file mode 120000 index 0000000..1559174 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/70-no-bitmaps-except-emoji.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/70-no-bitmaps-except-emoji.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/80-delicious.conf b/squashfs-root/etc/fonts/conf.d/80-delicious.conf new file mode 120000 index 0000000..3b153fb --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/80-delicious.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/80-delicious.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/90-synthetic.conf b/squashfs-root/etc/fonts/conf.d/90-synthetic.conf new file mode 120000 index 0000000..9b4ec60 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/90-synthetic.conf @@ -0,0 +1 @@ +../../../usr/share/fontconfig/conf.avail/90-synthetic.conf \ No newline at end of file diff --git a/squashfs-root/etc/fonts/conf.d/README b/squashfs-root/etc/fonts/conf.d/README new file mode 100644 index 0000000..0d20ef4 --- /dev/null +++ b/squashfs-root/etc/fonts/conf.d/README @@ -0,0 +1,23 @@ +conf.d/README + +Each file in this directory is a fontconfig configuration file. Fontconfig +scans this directory, loading all files of the form [0-9][0-9]*.conf. +These files are normally installed in /usr/share/fontconfig/conf.avail +and then symlinked here, allowing them to be easily installed and then +enabled/disabled by adjusting the symlinks. + +The files are loaded in numeric order, the structure of the configuration +has led to the following conventions in usage: + + Files beginning with: Contain: + + 00 through 09 Font directories + 10 through 19 system rendering defaults (AA, etc) + 20 through 29 font rendering options + 30 through 39 family substitution + 40 through 49 generic identification, map family->generic + 50 through 59 alternate config file loading + 60 through 69 generic aliases, map generic->family + 70 through 79 select font (adjust which fonts are available) + 80 through 89 match target="scan" (modify scanned patterns) + 90 through 99 font synthesis diff --git a/squashfs-root/etc/fonts/fonts.conf b/squashfs-root/etc/fonts/fonts.conf new file mode 100644 index 0000000..128a0ee --- /dev/null +++ b/squashfs-root/etc/fonts/fonts.conf @@ -0,0 +1,115 @@ + + + + + Default configuration file + + + + + + /usr/share/fonts + /usr/local/share/fonts + fonts + + ~/.fonts + + + + + mono + + + monospace + + + + + + + sans serif + + + sans-serif + + + + + + + sans + + + sans-serif + + + + + + system ui + + + system-ui + + + + + + + *.dpkg-tmp + + + + + *.dpkg-new + + + + + conf.d + + + + /var/cache/fontconfig + fontconfig + + ~/.fontconfig + + + + + 30 + + + + diff --git a/squashfs-root/etc/gnutls/config b/squashfs-root/etc/gnutls/config new file mode 100644 index 0000000..a545960 --- /dev/null +++ b/squashfs-root/etc/gnutls/config @@ -0,0 +1,6 @@ +[overrides] +disabled-version = tls1.0 +disabled-version = tls1.1 +disabled-version = dtls0.9 +disabled-version = dtls1.0 + diff --git a/squashfs-root/etc/init.d/dbus b/squashfs-root/etc/init.d/dbus new file mode 100755 index 0000000..105c83b --- /dev/null +++ b/squashfs-root/etc/init.d/dbus @@ -0,0 +1,129 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: dbus +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: D-Bus systemwide message bus +# Description: D-Bus is a simple interprocess messaging system, used +# for sending messages between applications. +### END INIT INFO +# -*- coding: utf-8 -*- +# Debian init.d script for D-BUS +# Copyright © 2003 Colin Walters +# Copyright © 2005 Sjoerd Simons + +set -e + +DAEMON=/usr/bin/dbus-daemon +UUIDGEN=/usr/bin/dbus-uuidgen +UUIDGEN_OPTS=--ensure +NAME=dbus +DAEMONUSER=messagebus +PIDDIR=/var/run/dbus +PIDFILE=$PIDDIR/pid +DESC="system message bus" + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +# Source defaults file; edit that file to configure this script. +PARAMS="" +if [ -e /etc/default/dbus ]; then + . /etc/default/dbus +fi + +create_machineid() { + # Create machine-id file + if [ -x $UUIDGEN ]; then + $UUIDGEN $UUIDGEN_OPTS + fi +} + +start_it_up() +{ + if [ ! -d $PIDDIR ]; then + mkdir -p $PIDDIR + chown $DAEMONUSER $PIDDIR + chgrp $DAEMONUSER $PIDDIR + fi + + if ! mountpoint -q /proc/ ; then + log_failure_msg "Can't start $DESC - /proc is not mounted" + return + fi + + if [ -e $PIDFILE ]; then + if $0 status > /dev/null ; then + log_success_msg "$DESC already started; not starting." + return + else + log_success_msg "Removing stale PID file $PIDFILE." + rm -f $PIDFILE + fi + fi + + create_machineid + + # Force libnss-systemd to avoid trying to communicate via D-Bus, which + # is never going to work well from within dbus-daemon. systemd + # special-cases this internally, but we might need to do the same when + # booting with sysvinit if libnss-systemd is still installed. + # (Workaround for #940971) + export SYSTEMD_NSS_BYPASS_BUS=1 + + log_daemon_msg "Starting $DESC" "$NAME" + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- --system $PARAMS + log_end_msg $? +} + +shut_it_down() +{ + log_daemon_msg "Stopping $DESC" "$NAME" + start-stop-daemon --stop --retry 5 --quiet --oknodo --pidfile $PIDFILE \ + --user $DAEMONUSER + # We no longer include these arguments so that start-stop-daemon + # can do its job even given that we may have been upgraded. + # We rely on the pidfile being sanely managed + # --exec $DAEMON -- --system $PARAMS + log_end_msg $? + rm -f $PIDFILE +} + +reload_it() +{ + create_machineid + log_action_begin_msg "Reloading $DESC config" + dbus-send --print-reply --system --type=method_call \ + --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.ReloadConfig > /dev/null + # hopefully this is enough time for dbus to reload it's config file. + log_action_end_msg $? +} + +case "$1" in + start) + start_it_up + ;; + stop) + shut_it_down + ;; + reload|force-reload) + reload_it + ;; + restart) + shut_it_down + start_it_up + ;; + status) + status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|status}" >&2 + exit 2 + ;; +esac + diff --git a/squashfs-root/etc/init.d/procps b/squashfs-root/etc/init.d/procps new file mode 100755 index 0000000..c9a494b --- /dev/null +++ b/squashfs-root/etc/init.d/procps @@ -0,0 +1,35 @@ +#! /bin/sh +# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. +if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then + set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script +fi +### BEGIN INIT INFO +# Provides: procps +# Required-Start: mountkernfs $local_fs +# Required-Stop: +# Should-Start: udev module-init-tools +# X-Start-Before: $network +# Default-Start: S +# Default-Stop: +# Short-Description: Configure kernel parameters at boottime +# Description: Loads kernel parameters that are specified in /etc/sysctl.conf +### END INIT INFO +# +# written by Elrond + +DESC="Setting kernel variables" +DAEMON=/sbin/sysctl +PIDFILE=none + +# Comment this out for sysctl to print every item changed +QUIET_SYSCTL="-q" + +do_start_cmd() { + STATUS=0 + $DAEMON $QUIET_SYSCTL --system || STATUS=$? + return $STATUS +} + +do_reload() { call do_start_cmd; } +do_stop() { return 0; } +do_status() { return 0; } diff --git a/squashfs-root/etc/ld.so.conf.d/x86_64-linux-gnu.conf b/squashfs-root/etc/ld.so.conf.d/x86_64-linux-gnu.conf new file mode 100644 index 0000000..cd691ab --- /dev/null +++ b/squashfs-root/etc/ld.so.conf.d/x86_64-linux-gnu.conf @@ -0,0 +1,4 @@ +# Multiarch support +/usr/local/lib/x86_64-linux-gnu +/lib/x86_64-linux-gnu +/usr/lib/x86_64-linux-gnu diff --git a/squashfs-root/etc/libaudit.conf b/squashfs-root/etc/libaudit.conf new file mode 100644 index 0000000..90855d7 --- /dev/null +++ b/squashfs-root/etc/libaudit.conf @@ -0,0 +1,7 @@ +# This is the configuration file for libaudit tunables. +# It is currently only used for the failure_action tunable. + +# failure_action can be: log, ignore, terminate +failure_action = ignore + + diff --git a/squashfs-root/etc/mime.types b/squashfs-root/etc/mime.types new file mode 100644 index 0000000..b6a8be0 --- /dev/null +++ b/squashfs-root/etc/mime.types @@ -0,0 +1,2323 @@ +############################################################################### +# +# Media (MIME) types and the extensions that represent them. +# +# The format of this file is a media type on the left and zero or more +# filename extensions on the right. Programs using this file will map +# files ending with those extensions to the associated type. +# +# This file is part of the "media-types" package. Please report a bug using +# the "reportbug" command of the "reportbug" package if you would like new +# types or extensions to be added. +# +# The reason that all types are managed by the media-types package instead +# allowing individual packages to install types in much the same way as they +# add entries in to the mailcap file is so these types can be referenced by +# other programs (such as a web server) even if the specific support package +# for that type is not installed. +# +# Users can add their own types if they wish by creating a ".mime.types" +# file in their home directory. Definitions included there will take +# precedence over those listed here. +# +############################################################################### + +application/1d-interleaved-parityfec +application/3gpdash-qoe-report+xml +application/3gpp-ims+xml +application/3gppHal+json +application/3gppHalForms+json +application/A2L a2l +application/ace+cbor +application/ace+json +application/activemessage +application/activity+json +application/aif+cbor +application/aif+json +application/alto-cdni+json +application/alto-cdnifilter+json +application/alto-costmap+json +application/alto-costmapfilter+json +application/alto-directory+json +application/alto-endpointcost+json +application/alto-endpointcostparams+json +application/alto-endpointprop+json +application/alto-endpointpropparams+json +application/alto-error+json +application/alto-networkmap+json +application/alto-networkmapfilter+json +application/alto-propmap+json +application/alto-propmapparams+json +application/alto-updatestreamcontrol+json +application/alto-updatestreamparams+json +application/AML aml +application/andrew-inset ez +application/annodex anx +application/applefile +application/at+jwt +application/ATF atf +application/ATFX atfx +application/atom+xml atom +application/atomcat+xml atomcat +application/atomdeleted+xml atomdeleted +application/atomicmail +application/atomserv+xml atomsrv +application/atomsvc+xml atomsvc +application/atsc-dwd+xml dwd +application/atsc-dynamic-event-message +application/atsc-held+xml held +application/atsc-rdt+json +application/atsc-rsat+xml rsat +application/ATXML atxml +application/auth-policy+xml apxml +application/automationml-aml+xml +application/automationml-amlx+zip amlx +application/bacnet-xdd+zip xdd +application/batch-SMTP +application/bbolin lin +application/beep+xml +application/calendar+json +application/calendar+xml xcs +application/call-completion +application/CALS-1840 +application/captive+json +application/cbor cbor +application/cbor-seq +application/cccex c3ex +application/ccmp+xml ccmp +application/ccxml+xml ccxml +application/cda+xml +application/CDFX+XML cdfx +application/cdmi-capability cdmia +application/cdmi-container cdmic +application/cdmi-domain cdmid +application/cdmi-object cdmio +application/cdmi-queue cdmiq +application/cdni +application/CEA cea +application/cea-2018+xml +application/cellml+xml cellml cml +application/cfw +application/city+json +application/clr 1clr +application/clue+xml +application/clue_info+xml clue +application/cms cmsc +application/cnrp+xml +application/coap-group+json +application/coap-payload +application/commonground +application/concise-problem-details+cbor +application/conference-info+xml +application/cose +application/cose-key +application/cose-key-set +application/cose-x509 +application/cpl+xml cpl +application/csrattrs csrattrs +application/csta+xml +application/CSTAdata+xml +application/csvm+json +application/cu-seeme cu +application/cwl cwl +application/cwl+json cwl.json +application/cwt +application/cybercash +application/dash+xml mpd +application/dash-patch+xml +application/dashdelta mpdd +application/davmount+xml davmount +application/dca-rft +application/DCD dcd +application/dec-dx +application/dialog-info+xml +application/dicom dcm +application/dicom+json +application/dicom+xml +application/DII dii +application/DIT dit +application/dns +application/dns+json +application/dns-message +application/dots+cbor +application/dpop+jwt +application/dskpp+xml xmls +application/dsptype tsp +application/dssc+der dssc +application/dssc+xml xdssc +application/dvcs dvc +application/EDI-consent +application/EDI-X12 +application/EDIFACT +application/efi efi +application/elm+json +application/elm+xml +application/EmergencyCallData.cap+xml +application/EmergencyCallData.Comment+xml +application/EmergencyCallData.Control+xml +application/EmergencyCallData.DeviceInfo+xml +application/EmergencyCallData.eCall.MSD +application/EmergencyCallData.LegacyESN+json +application/EmergencyCallData.ProviderInfo+xml +application/EmergencyCallData.ServiceInfo+xml +application/EmergencyCallData.SubscriberInfo+xml +application/EmergencyCallData.VEDS+xml +application/emma+xml emma +application/emotionml+xml emotionml +application/encaprtp +application/epp+xml +application/epub+zip epub +application/eshop +application/example +application/exi exi +application/expect-ct-report+json +application/express exp +application/fastinfoset finf +application/fastsoap +application/fdf fdf +application/fdt+xml fdt +application/fhir+json +application/fhir+xml +application/fits +application/flexfec +application/font-tdpfr pfr +application/framework-attributes+xml +application/futuresplash spl +application/geo+json geojson +application/geo+json-seq +application/geopackage+sqlite3 gpkg +application/geoxacml+xml +application/gltf-buffer glbin glbuf +application/gml+xml gml +application/gzip gz +application/H224 +application/held+xml +application/hl7v2+xml +application/hta hta +application/http +application/hyperstudio stk +application/ibe-key-request+xml +application/ibe-pkg-reply+xml +application/ibe-pp-data +application/iges +application/im-iscomposing+xml +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/inkml+xml ink inkml +application/IOTP +application/ipfix ipfix +application/ipp +application/ISUP +application/its+xml its +application/java-archive jar +application/java-serialized-object ser +application/java-vm class +application/jf2feed+json +application/jose +application/jose+json +application/jrd+json jrd +application/jscalendar+json +application/json json +application/json-patch+json json-patch +application/json-seq +application/jwk+json +application/jwk-set+json +application/jwt +application/kpml-request+xml +application/kpml-response+xml +application/ld+json jsonld +application/lgr+xml lgr +application/link-format wlnk +application/linkset +application/linkset+json +application/load-control+xml +application/logout+jwt +application/lost+xml lostxml +application/lostsync+xml lostsyncxml +application/lpf+zip lpf +application/LXF lxf +application/m3g m3g +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/mads+xml mads +application/manifest+json webmanifest +application/marc mrc +application/marcxml+xml mrcx +application/mathematica ma mb +application/mathml+xml mml +application/mathml-content+xml +application/mathml-presentation+xml +application/mbms-associated-procedure-description+xml +application/mbms-deregister+xml +application/mbms-envelope+xml +application/mbms-msk+xml +application/mbms-msk-response+xml +application/mbms-protection-description+xml +application/mbms-reception-report+xml +application/mbms-register+xml +application/mbms-register-response+xml +application/mbms-schedule+xml +application/mbms-user-service-description+xml +application/mbox mbox +application/media-policy-dataset+xml +application/mediaservercontrol+xml +application/media_control+xml +application/merge-patch+json +application/metalink4+xml meta4 +application/mets+xml mets +application/MF4 mf4 +application/mikey +application/mipc +application/missing-blocks+cbor-seq +application/mmt-aei+xml maei +application/mmt-usd+xml musd +application/mods+xml mods +application/moss-keys +application/moss-signature +application/mosskey-data +application/mosskey-request +application/mp21 m21 mp21 +application/mp4 +application/mpeg4-generic +application/mpeg4-iod +application/mpeg4-iod-xmt +application/mrb-consumer+xml +application/mrb-publish+xml +application/msaccess mdb +application/msc-ivr+xml +application/msc-mixer+xml +application/msword doc +application/mud+json +application/multipart-core +application/mxf mxf +application/n-quads nq +application/n-triples nt +application/nasdata +application/news-checkgroups +application/news-groupinfo +application/news-transmission +application/nlsml+xml +application/node +application/nss +application/oauth-authz-req+jwt +application/oblivious-dns-message +application/ocsp-request orq +application/ocsp-response ors +application/octet-stream bin deploy msu msp +application/ODA oda +application/odm+xml +application/ODX odx +application/oebps-package+xml opf +application/ogg ogx +application/ohttp-keys +application/onenote one onetoc2 onetmp onepkg +application/opc-nodeset+xml +application/oscore +application/oxps oxps +application/p21 p21 stpnc 210 ifc +application/p21+zip +application/p2p-overlay+xml relo +application/parityfec +application/passport +application/patch-ops-error+xml +application/pdf pdf +application/PDX pdx +application/pem-certificate-chain pem +application/pgp-encrypted pgp +application/pgp-keys asc key +application/pgp-signature sig +application/pics-rules prf +application/pidf+xml +application/pidf-diff+xml +application/pkcs10 p10 +application/pkcs12 p12 pfx +application/pkcs7-mime p7m p7c p7z +application/pkcs7-signature p7s +application/pkcs8 p8 +application/pkcs8-encrypted p8e +application/pkix-attr-cert ac +application/pkix-cert cer +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pkixcmp pki +application/pls+xml +application/poc-settings+xml +application/postscript ps ai eps epsi epsf eps2 eps3 +application/ppsp-tracker+json +application/problem+json +application/problem+xml +application/provenance+xml provx +application/prs.alvestrand.titrax-sheet +application/prs.cww cw cww +application/prs.cyn +application/prs.hpub+zip hpub +application/prs.implied-document+xml +application/prs.implied-executable +application/prs.implied-structure +application/prs.nprend rnd rct +application/prs.plucker +application/prs.rdf-xml-crypt rdf-crypt +application/prs.xsf+xml xsf +application/pskc+xml pskcxml +application/pvd+json +application/QSIG +application/raptorfec +application/rdap+json +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +application/reputon+json +application/resource-lists+xml rl +application/resource-lists-diff+xml rld +application/rfc+xml rfcxml +application/riscos +application/rlmi+xml +application/rls-services+xml rs +application/route-apd+xml rapd +application/route-s-tsid+xml sls +application/route-usd+xml rusd +application/rpki-checklist +application/rpki-ghostbusters gbr +application/rpki-manifest mft +application/rpki-publication +application/rpki-roa roa +application/rpki-updown +application/rtf rtf +application/rtploopback +application/rtx +application/samlassertion+xml +application/samlmetadata+xml +application/sarif+json sarif sarif.json +application/sarif-external-properties+json sarif-external-properties sarif-external-properties.json +application/sbe +application/sbml+xml +application/scaip+xml +application/scim+json scim +application/scvp-cv-request scq +application/scvp-cv-response scs +application/scvp-vp-request spq +application/scvp-vp-response spp +application/sdp sdp +application/secevent+jwt +application/senml+cbor senmlc +application/senml+json senml +application/senml+xml senmlx +application/senml-etch+cbor senml-etchc +application/senml-etch+json senml-etchj +application/senml-exi senmle +application/sensml+cbor sensmlc +application/sensml+json sensml +application/sensml+xml sensmlx +application/sensml-exi sensmle +application/sep+xml +application/sep-exi +application/session-info +application/set-payment +application/set-payment-initiation +application/set-registration +application/set-registration-initiation +application/SGML +application/sgml-open-catalog soc +application/shf+xml shf +application/sieve siv sieve +application/simple-filter+xml cl +application/simple-message-summary +application/simpleSymbolContainer +application/sipc +application/slate +application/smil+xml smil smi sml +application/smpte336m +application/soap+fastinfoset +application/soap+xml +application/sparql-query rq +application/sparql-results+xml srx +application/spdx+json spdx.json +application/spirits-event+xml +application/sql sql +application/srgs gram +application/srgs+xml grxml +application/sru+xml sru +application/ssml+xml ssml +application/stix+json stix +application/swid+cbor coswid +application/swid+xml swidtag +application/tamp-apex-update tau +application/tamp-apex-update-confirm auc +application/tamp-community-update tcu +application/tamp-community-update-confirm cuc +application/tamp-error ter +application/tamp-sequence-adjust tsa +application/tamp-sequence-adjust-confirm sac +application/tamp-status-query +application/tamp-status-response +application/tamp-update tur +application/tamp-update-confirm tuc +application/taxii+json +application/td+json jsontd +application/tei+xml tei teiCorpus odd +application/TETRA_ISI +application/thraud+xml tfi +application/timestamp-query tsq +application/timestamp-reply tsr +application/timestamped-data tsd +application/tlsrpt+gzip +application/tlsrpt+json +application/tm+json tm.jsonld tm.json jsontm +application/tnauthlist +application/token-introspection+jwt +application/trickle-ice-sdpfrag +application/trig trig +application/ttml+xml ttml +application/tve-trigger +application/tzif +application/tzif-leap +application/ulpfec +application/urc-grpsheet+xml gsheet +application/urc-ressheet+xml rsheet +application/urc-targetdesc+xml td +application/urc-uisocketdesc+xml uis +application/vcard+json +application/vcard+xml +application/vemmi +application/vnd.1000minds.decision-model+xml 1km +application/vnd.1ob ob +application/vnd.3gpp-prose+xml +application/vnd.3gpp-prose-pc3a+xml +application/vnd.3gpp-prose-pc3ach+xml +application/vnd.3gpp-prose-pc3ch+xml +application/vnd.3gpp-prose-pc8+xml +application/vnd.3gpp-v2x-local-service-information +application/vnd.3gpp.5gnas +application/vnd.3gpp.access-transfer-events+xml +application/vnd.3gpp.bsf+xml +application/vnd.3gpp.crs+xml +application/vnd.3gpp.current-location-discovery+xml +application/vnd.3gpp.GMOP+xml +application/vnd.3gpp.gtpc +application/vnd.3gpp.interworking-data +application/vnd.3gpp.lpp +application/vnd.3gpp.mc-signalling-ear +application/vnd.3gpp.mcdata-affiliation-command+xml +application/vnd.3gpp.mcdata-info+xml +application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml +application/vnd.3gpp.mcdata-payload +application/vnd.3gpp.mcdata-regroup+xml +application/vnd.3gpp.mcdata-service-config+xml +application/vnd.3gpp.mcdata-signalling +application/vnd.3gpp.mcdata-ue-config+xml +application/vnd.3gpp.mcdata-user-profile+xml +application/vnd.3gpp.mcptt-affiliation-command+xml +application/vnd.3gpp.mcptt-floor-request+xml +application/vnd.3gpp.mcptt-info+xml +application/vnd.3gpp.mcptt-location-info+xml +application/vnd.3gpp.mcptt-mbms-usage-info+xml +application/vnd.3gpp.mcptt-regroup+xml +application/vnd.3gpp.mcptt-service-config+xml +application/vnd.3gpp.mcptt-signed+xml +application/vnd.3gpp.mcptt-ue-config+xml +application/vnd.3gpp.mcptt-ue-init-config+xml +application/vnd.3gpp.mcptt-user-profile+xml +application/vnd.3gpp.mcvideo-affiliation-command+xml +application/vnd.3gpp.mcvideo-info+xml +application/vnd.3gpp.mcvideo-location-info+xml +application/vnd.3gpp.mcvideo-mbms-usage-info+xml +application/vnd.3gpp.mcvideo-regroup+xml +application/vnd.3gpp.mcvideo-service-config+xml +application/vnd.3gpp.mcvideo-transmission-request+xml +application/vnd.3gpp.mcvideo-ue-config+xml +application/vnd.3gpp.mcvideo-user-profile+xml +application/vnd.3gpp.mid-call+xml +application/vnd.3gpp.ngap +application/vnd.3gpp.pfcp +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +application/vnd.3gpp.s1ap +application/vnd.3gpp.seal-group-doc+xml +application/vnd.3gpp.seal-info+xml +application/vnd.3gpp.seal-location-info+xml +application/vnd.3gpp.seal-mbms-usage-info+xml +application/vnd.3gpp.seal-network-QoS-management-info+xml +application/vnd.3gpp.seal-ue-config-info+xml +application/vnd.3gpp.seal-unicast-info+xml +application/vnd.3gpp.seal-user-profile-info+xml +application/vnd.3gpp.sms +application/vnd.3gpp.sms+xml +application/vnd.3gpp.srvcc-ext+xml +application/vnd.3gpp.SRVCC-info+xml +application/vnd.3gpp.state-and-event-info+xml +application/vnd.3gpp.ussd+xml +application/vnd.3gpp.v2x +application/vnd.3gpp.vae-info+xml +application/vnd.3gpp2.bcmcsinfo+xml +application/vnd.3gpp2.sms sms +application/vnd.3gpp2.tcap tcap +application/vnd.3lightssoftware.imagescal imgcal +application/vnd.3M.Post-it-Notes pwn +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acm.addressxfer+json +application/vnd.acucobol acu +application/vnd.acucorp atc acutc +application/vnd.adobe.flash.movie swf +application/vnd.adobe.formscentral.fcdt fcdt +application/vnd.adobe.fxp fxp fxpl +application/vnd.adobe.partial-upload +application/vnd.adobe.xdp+xml xdp +application/vnd.aether.imp +application/vnd.afpc.afplinedata +application/vnd.afpc.afplinedata-pagedef +application/vnd.afpc.cmoca-cmresource +application/vnd.afpc.foca-charset +application/vnd.afpc.foca-codedfont +application/vnd.afpc.foca-codepage +application/vnd.afpc.modca list3820 listafp afp pseg3820 +application/vnd.afpc.modca-formdef +application/vnd.afpc.modca-mediummap +application/vnd.afpc.modca-objectcontainer +application/vnd.afpc.modca-overlay ovl +application/vnd.afpc.modca-pagesegment psg +application/vnd.age age +application/vnd.ah-barcode +application/vnd.ahead.space ahead +application/vnd.airzip.filesecure.azf azf +application/vnd.airzip.filesecure.azs azs +application/vnd.amadeus+json +application/vnd.amazon.mobi8-ebook azw3 +application/vnd.americandynamics.acc acc +application/vnd.amiga.ami ami +application/vnd.amundsen.maze+xml +application/vnd.android.ota ota +application/vnd.android.package-archive apk +application/vnd.anki apkg +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component +application/vnd.apache.arrow.file arrow +application/vnd.apache.arrow.stream arrows +application/vnd.apache.thrift.binary +application/vnd.apache.thrift.compact +application/vnd.apache.thrift.json +application/vnd.apexlang apexlang apex +application/vnd.api+json +application/vnd.aplextor.warrp+json +application/vnd.apothekende.reservation+json +application/vnd.apple.installer+xml dist distz pkg mpkg +application/vnd.apple.keynote keynote +application/vnd.apple.mpegurl m3u8 +application/vnd.apple.numbers numbers +application/vnd.apple.pages pages +application/vnd.aristanetworks.swi swi +application/vnd.artisan+json artisan +application/vnd.artsquare +application/vnd.astraea-software.iota iota +application/vnd.audiograph aep +application/vnd.autopackage package +application/vnd.avalon+json +application/vnd.avistar+xml +application/vnd.balsamiq.bmml+xml bmml +application/vnd.balsamiq.bmpr bmpr +application/vnd.banana-accounting ac2 +application/vnd.bbf.usp.error +application/vnd.bbf.usp.msg +application/vnd.bbf.usp.msg+json +application/vnd.bekitzur-stech+json +application/vnd.belightsoft.lhzd+zip lhzd +application/vnd.belightsoft.lhzl+zip lhzl +application/vnd.bint.med-content +application/vnd.biopax.rdf+xml +application/vnd.blink-idb-value-wrapper +application/vnd.blueice.multipass mpm +application/vnd.bluetooth.ep.oob ep +application/vnd.bluetooth.le.oob le +application/vnd.bmi bmi +application/vnd.bpf +application/vnd.bpf3 +application/vnd.businessobjects rep +application/vnd.byu.uapi+json +application/vnd.cab-jscript +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.capasystems-pg+json +application/vnd.cendio.thinlinc.clientconf tlclient +application/vnd.century-systems.tcp_stream +application/vnd.chemdraw+xml cdxml +application/vnd.chess-pgn pgn +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.ciedi +application/vnd.cinderella cdy +application/vnd.cirpack.isdn-ext +application/vnd.citationstyles.style+xml csl +application/vnd.claymore cla +application/vnd.cloanto.rp9 rp9 +application/vnd.clonk.c4group c4g c4d c4f c4p c4u +application/vnd.cluetrust.cartomobile-config c11amc +application/vnd.cluetrust.cartomobile-config-pkg c11amz +application/vnd.cncf.helm.chart.content.v1.tar+gzip +application/vnd.cncf.helm.chart.provenance.v1.prov +application/vnd.cncf.helm.config.v1+json +application/vnd.coffeescript coffee +application/vnd.collabio.xodocuments.document xodt +application/vnd.collabio.xodocuments.document-template xott +application/vnd.collabio.xodocuments.presentation xodp +application/vnd.collabio.xodocuments.presentation-template xotp +application/vnd.collabio.xodocuments.spreadsheet xods +application/vnd.collabio.xodocuments.spreadsheet-template xots +application/vnd.collection+json +application/vnd.collection.doc+json +application/vnd.collection.next+json +application/vnd.comicbook+zip cbz +application/vnd.comicbook-rar cbr +application/vnd.commerce-battelle icf icd ic0 ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8 +application/vnd.commonspace csp cst +application/vnd.contact.cmsg cdbcmsg +application/vnd.coreos.ignition+json ign ignition +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.cryptii.pipe+json +application/vnd.crypto-shade-file ssvc +application/vnd.cryptomator.encrypted c9r c9s +application/vnd.cryptomator.vault cryptomator +application/vnd.ctc-posml pml +application/vnd.ctct.ws+xml +application/vnd.cups-pdf +application/vnd.cups-postscript +application/vnd.cups-ppd ppd +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.curl +application/vnd.cyan.dean.root+xml +application/vnd.cybank +application/vnd.cyclonedx+json +application/vnd.cyclonedx+xml +application/vnd.d2l.coursepackage1p0+zip +application/vnd.d3m-dataset +application/vnd.d3m-problem +application/vnd.dart dart +application/vnd.data-vision.rdz rdz +application/vnd.datalog dl +application/vnd.datapackage+json +application/vnd.dataresource+json +application/vnd.dbf dbf +application/vnd.debian.binary-package deb ddeb udeb +application/vnd.dece.data uvf uvvf uvd uvvd +application/vnd.dece.ttml+xml uvt uvvt +application/vnd.dece.unspecified uvx uvvx +application/vnd.dece.zip uvz uvvz +application/vnd.denovo.fcselayout-link fe_launch +application/vnd.desmume.movie dsm +application/vnd.dir-bi.plate-dl-nosuffix +application/vnd.dm.delegation+xml +application/vnd.dna dna +application/vnd.document+json docjson +application/vnd.dolby.mobile.1 +application/vnd.dolby.mobile.2 +application/vnd.doremir.scorecloud-binary-document scld +application/vnd.dpgraph dpg mwc dpgraph +application/vnd.dreamfactory dfac +application/vnd.drive+json +application/vnd.dtg.local +application/vnd.dtg.local.flash fla +application/vnd.dtg.local.html +application/vnd.dvb.ait ait +application/vnd.dvb.dvbisl+xml +application/vnd.dvb.dvbj +application/vnd.dvb.esgcontainer +application/vnd.dvb.ipdcdftnotifaccess +application/vnd.dvb.ipdcesgaccess +application/vnd.dvb.ipdcesgaccess2 +application/vnd.dvb.ipdcesgpdd +application/vnd.dvb.ipdcroaming +application/vnd.dvb.iptv.alfec-base +application/vnd.dvb.iptv.alfec-enhancement +application/vnd.dvb.notif-aggregate-root+xml +application/vnd.dvb.notif-container+xml +application/vnd.dvb.notif-generic+xml +application/vnd.dvb.notif-ia-msglist+xml +application/vnd.dvb.notif-ia-registration-request+xml +application/vnd.dvb.notif-ia-registration-response+xml +application/vnd.dvb.notif-init+xml +application/vnd.dvb.pfr +application/vnd.dvb.service svc +application/vnd.dxr +application/vnd.dynageo geo +application/vnd.dzr dzr +application/vnd.easykaraoke.cdgdownload +application/vnd.ecdis-update +application/vnd.ecip.rlp +application/vnd.eclipse.ditto+json +application/vnd.ecowin.chart mag +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.efi.img +application/vnd.efi.iso +application/vnd.eln+zip ELN +application/vnd.emclient.accessrequest+xml +application/vnd.enliven nml +application/vnd.enphase.envoy +application/vnd.eprints.data+xml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +application/vnd.ericsson.quickcall qcall qca +application/vnd.espass-espass+zip espass +application/vnd.eszigno3+xml es3 et3 +application/vnd.etsi.aoc+xml +application/vnd.etsi.asic-e+zip asice sce +application/vnd.etsi.asic-s+zip asics +application/vnd.etsi.cug+xml +application/vnd.etsi.iptvcommand+xml +application/vnd.etsi.iptvdiscovery+xml +application/vnd.etsi.iptvprofile+xml +application/vnd.etsi.iptvsad-bc+xml +application/vnd.etsi.iptvsad-cod+xml +application/vnd.etsi.iptvsad-npvr+xml +application/vnd.etsi.iptvservice+xml +application/vnd.etsi.iptvsync+xml +application/vnd.etsi.iptvueprofile+xml +application/vnd.etsi.mcid+xml +application/vnd.etsi.mheg5 +application/vnd.etsi.overload-control-policy-dataset+xml +application/vnd.etsi.pstn+xml +application/vnd.etsi.sci+xml +application/vnd.etsi.simservs+xml +application/vnd.etsi.timestamp-token tst +application/vnd.etsi.tsl+xml +application/vnd.etsi.tsl.der +application/vnd.eu.kasparian.car+json carjson +application/vnd.eudora.data +application/vnd.evolv.ecig.profile ecigprofile +application/vnd.evolv.ecig.settings ecig +application/vnd.evolv.ecig.theme ecigtheme +application/vnd.exstream-empower+zip mpw +application/vnd.exstream-package pub +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +application/vnd.f-secure.mobile +application/vnd.familysearch.gedcom+zip gdz +application/vnd.fastcopy-disk-image dim +application/vnd.fdsn.mseed msd mseed +application/vnd.fdsn.seed seed dataless +application/vnd.ffsns +application/vnd.ficlab.flb+zip flb +application/vnd.filmit.zfc zfc +application/vnd.fints +application/vnd.firemonkeys.cloudcell +application/vnd.FloGraphIt gph +application/vnd.fluxtime.clip ftc +application/vnd.font-fontforge-sfd sfd +application/vnd.framemaker fm +application/vnd.freelog.comic +application/vnd.fsc.weblaunch fsc +application/vnd.fujifilm.fb.docuworks +application/vnd.fujifilm.fb.docuworks.binder +application/vnd.fujifilm.fb.docuworks.container +application/vnd.fujifilm.fb.jfi+xml +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +application/vnd.fujixerox.ART-EX +application/vnd.fujixerox.ART4 +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +application/vnd.fujixerox.docuworks.container xct +application/vnd.fujixerox.HBPL +application/vnd.fut-misnet +application/vnd.futoin+cbor +application/vnd.futoin+json +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +application/vnd.genozip genozip +application/vnd.gentics.grd+json grd +application/vnd.gentoo.catmetadata+xml +application/vnd.gentoo.ebuild ebuild +application/vnd.gentoo.eclass eclass +application/vnd.gentoo.gpkg gpkg.tar +application/vnd.gentoo.manifest +application/vnd.gentoo.pkgmetadata+xml +application/vnd.gentoo.xpak xpak +application/vnd.geogebra.file ggb +application/vnd.geogebra.slides ggs +application/vnd.geogebra.tool ggt +application/vnd.geometry-explorer gex gre +application/vnd.geonext gxt +application/vnd.geoplan g2w +application/vnd.geospace g3w +application/vnd.gerber +application/vnd.globalplatform.card-content-mgt +application/vnd.globalplatform.card-content-mgt-response +application/vnd.gnu.taler.exchange+json +application/vnd.gnu.taler.merchant+json +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.gov.sk.e-form+xml +application/vnd.gov.sk.e-form+zip +application/vnd.gov.sk.xmldatacontainer+xml +application/vnd.gpxsee.map+xml +application/vnd.grafeq gqf gqs +application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +application/vnd.hal+json +application/vnd.hal+xml hal +application/vnd.HandHeld-Entertainment+xml zmm +application/vnd.hbci hbci hbc kom upa pkd bpd +application/vnd.hc+json +application/vnd.hcl-bireports +application/vnd.hdt hdt +application/vnd.heroku+json +application/vnd.hhe.lesson-player les +application/vnd.hp-HPGL hpgl +application/vnd.hp-hpid hpi hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-PCL pcl +application/vnd.hp-PCLXL +application/vnd.hsl hsl +application/vnd.httphone +application/vnd.hydrostatix.sof-data sfd-hdstx +application/vnd.hyper+json +application/vnd.hyper-item+json +application/vnd.hyperdrive+json +application/vnd.hzn-3d-crossword +application/vnd.ibm.electronic-media emm +application/vnd.ibm.MiniPay mpy +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.iccprofile icc icm +application/vnd.ieee.1905 1905.1 +application/vnd.igloader igl +application/vnd.imagemeter.folder+zip imf +application/vnd.imagemeter.image+zip imi +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +application/vnd.ims.imsccv1p1 imscc +application/vnd.ims.imsccv1p2 +application/vnd.ims.imsccv1p3 +application/vnd.ims.lis.v2.result+json +application/vnd.ims.lti.v2.toolconsumerprofile+json +application/vnd.ims.lti.v2.toolproxy+json +application/vnd.ims.lti.v2.toolproxy.id+json +application/vnd.ims.lti.v2.toolsettings+json +application/vnd.ims.lti.v2.toolsettings.simple+json +application/vnd.informedcontrol.rms+xml +application/vnd.infotech.project +application/vnd.infotech.project+xml +application/vnd.innopath.wamp.notification +application/vnd.insors.igm igm +application/vnd.intercon.formnet xpw xpx +application/vnd.intergeo i2g +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +application/vnd.ipfs.ipns-record ipns-record +application/vnd.ipld.car car +application/vnd.ipld.dag-cbor +application/vnd.ipld.dag-json +application/vnd.ipld.raw +application/vnd.iptc.g2.catalogitem+xml +application/vnd.iptc.g2.conceptitem+xml +application/vnd.iptc.g2.knowledgeitem+xml +application/vnd.iptc.g2.newsitem+xml +application/vnd.iptc.g2.newsmessage+xml +application/vnd.iptc.g2.packageitem+xml +application/vnd.iptc.g2.planningitem+xml +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.is-xpr xpr +application/vnd.isac.fcs fcs +application/vnd.iso11783-10+zip +application/vnd.jam jam +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.joost.joda-archive joda +application/vnd.jsk.isdn-ngn +application/vnd.kahootz ktz ktr +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.Kinar kne knp sdf +application/vnd.koan skp skd skm skt +application/vnd.kodak-descriptor sse +application/vnd.las las +application/vnd.las.las+json lasjson +application/vnd.las.las+xml lasxml +application/vnd.laszip +application/vnd.leap+json +application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.logipipe.circuit+zip lcs lca +application/vnd.loom loom +application/vnd.lotus-1-2-3 123 wk4 wk3 wk1 +application/vnd.lotus-approach apr vew +application/vnd.lotus-freelance prz pre +application/vnd.lotus-notes nsf ntf ndl ns4 ns3 ns2 nsh nsg +application/vnd.lotus-organizer or3 or2 org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp sam +application/vnd.macports.portpkg portpkg +application/vnd.mapbox-vector-tile mvt +application/vnd.marlin.drm.actiontoken+xml +application/vnd.marlin.drm.conftoken+xml +application/vnd.marlin.drm.license+xml +application/vnd.marlin.drm.mdcf mdc +application/vnd.mason+json +application/vnd.maxar.archive.3tz+zip 3tz +application/vnd.maxmind.maxmind-db mmdb +application/vnd.mcd mcd +application/vnd.mdl mdl +application/vnd.mdl-mbsdf mbsdf +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +application/vnd.medicalholodeck.recordxr rxt +application/vnd.meridian-slingshot +application/vnd.MFER mwf +application/vnd.mfmp mfm +application/vnd.micro+json +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +application/vnd.microsoft.portable-executable +application/vnd.microsoft.windows.thumbnail-cache +application/vnd.miele+json +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.Mobius.DAF daf +application/vnd.Mobius.DIS dis +application/vnd.Mobius.MBK mbk +application/vnd.Mobius.MQY mqy +application/vnd.Mobius.MSL msl +application/vnd.Mobius.PLC plc +application/vnd.Mobius.TXF txf +application/vnd.modl modl +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.motorola.iprm +application/vnd.mozilla.xul+xml xul +application/vnd.ms-3mfdocument 3mf +application/vnd.ms-artgalry cil +application/vnd.ms-asf asf +application/vnd.ms-cab-compressed cab +application/vnd.ms-excel xls xlm xla xlc xlt xlw +application/vnd.ms-excel.addin.macroEnabled.12 xlam +application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb +application/vnd.ms-excel.sheet.macroEnabled.12 xlsm +application/vnd.ms-excel.template.macroEnabled.12 xltm +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +application/vnd.ms-office.activeX+xml +application/vnd.ms-officetheme thmx +application/vnd.ms-pki.seccat cat +application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint ppt pps +application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam +application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm +application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm +application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm +application/vnd.ms-powerpoint.template.macroEnabled.12 potm +application/vnd.ms-PrintDeviceCapabilities+xml +application/vnd.ms-PrintSchemaTicket+xml +application/vnd.ms-project mpp mpt +application/vnd.ms-tnef tnef tnf +application/vnd.ms-windows.devicepairing +application/vnd.ms-windows.nwprinting.oob +application/vnd.ms-windows.printerpairing +application/vnd.ms-windows.wsd.oob +application/vnd.ms-wmdrm.lic-chlg-req +application/vnd.ms-wmdrm.lic-resp +application/vnd.ms-wmdrm.meter-chlg-req +application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-word.document.macroEnabled.12 docm +application/vnd.ms-word.template.macroEnabled.12 dotm +application/vnd.ms-works wcm wdb wks wps +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +application/vnd.msa-disk-image msa +application/vnd.mseq mseq +application/vnd.msign +application/vnd.multiad.creator crtr +application/vnd.multiad.creator.cif cif +application/vnd.music-niff +application/vnd.musician mus +application/vnd.muvee.style msty +application/vnd.mynfc taglet +application/vnd.nacamar.ybrid+json +application/vnd.ncd.control +application/vnd.ncd.reference +application/vnd.nearst.inv+json +application/vnd.nebumind.line nebul line +application/vnd.nervana entity request bkm kcm +application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +application/vnd.nimn nimn +application/vnd.nintendo.nitro.rom nds +application/vnd.nintendo.snes.rom sfc smc +application/vnd.nitf nitf +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +application/vnd.nokia.catalogs +application/vnd.nokia.conml+wbxml +application/vnd.nokia.conml+xml +application/vnd.nokia.iptv.config+xml +application/vnd.nokia.iSDS-radio-presets +application/vnd.nokia.landmark+wbxml +application/vnd.nokia.landmark+xml +application/vnd.nokia.landmarkcollection+xml +application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.ncd +application/vnd.nokia.pcd+wbxml +application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.EDM edm +application/vnd.novadigm.EDX edx +application/vnd.novadigm.EXT ext +application/vnd.ntt-local.content-share +application/vnd.ntt-local.file-transfer +application/vnd.ntt-local.ogw_remote-access +application/vnd.ntt-local.sip-ta_remote +application/vnd.ntt-local.sip-ta_tcp_stream +application/vnd.oasis.opendocument.base odb +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-master-template otm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.obn +application/vnd.ocf+cbor +application/vnd.oci.image.manifest.v1+json +application/vnd.oftn.l10n+json +application/vnd.oipf.contentaccessdownload+xml +application/vnd.oipf.contentaccessstreaming+xml +application/vnd.oipf.cspg-hexbinary +application/vnd.oipf.dae.svg+xml +application/vnd.oipf.dae.xhtml+xml +application/vnd.oipf.mippvcontrolmessage+xml +application/vnd.oipf.pae.gem +application/vnd.oipf.spdiscovery+xml +application/vnd.oipf.spdlist+xml +application/vnd.oipf.ueprofile+xml +application/vnd.oipf.userprofile+xml +application/vnd.olpc-sugar xo +application/vnd.oma-scws-config +application/vnd.oma-scws-http-request +application/vnd.oma-scws-http-response +application/vnd.oma.bcast.associated-procedure-parameter+xml +application/vnd.oma.bcast.drm-trigger+xml +application/vnd.oma.bcast.imd+xml +application/vnd.oma.bcast.ltkm +application/vnd.oma.bcast.notification+xml +application/vnd.oma.bcast.provisioningtrigger +application/vnd.oma.bcast.sgboot +application/vnd.oma.bcast.sgdd+xml +application/vnd.oma.bcast.sgdu +application/vnd.oma.bcast.simple-symbol-container +application/vnd.oma.bcast.smartcard-trigger+xml +application/vnd.oma.bcast.sprov+xml +application/vnd.oma.bcast.stkm +application/vnd.oma.cab-address-book+xml +application/vnd.oma.cab-feature-handler+xml +application/vnd.oma.cab-pcc+xml +application/vnd.oma.cab-subs-invite+xml +application/vnd.oma.cab-user-prefs+xml +application/vnd.oma.dcd +application/vnd.oma.dcdc +application/vnd.oma.dd2+xml dd2 +application/vnd.oma.drm.risd+xml +application/vnd.oma.group-usage-list+xml +application/vnd.oma.lwm2m+cbor +application/vnd.oma.lwm2m+json +application/vnd.oma.lwm2m+tlv +application/vnd.oma.pal+xml +application/vnd.oma.poc.detailed-progress-report+xml +application/vnd.oma.poc.final-report+xml +application/vnd.oma.poc.groups+xml +application/vnd.oma.poc.invocation-descriptor+xml +application/vnd.oma.poc.optimized-progress-report+xml +application/vnd.oma.push +application/vnd.oma.scidm.messages+xml +application/vnd.oma.xcap-directory+xml +application/vnd.omads-email+xml +application/vnd.omads-file+xml +application/vnd.omads-folder+xml +application/vnd.omaloc-supl-init +application/vnd.onepager tam +application/vnd.onepagertamp tamp +application/vnd.onepagertamx tamx +application/vnd.onepagertat tat +application/vnd.onepagertatp tatp +application/vnd.onepagertatx tatx +application/vnd.onvif.metadata +application/vnd.openblox.game+xml obgx +application/vnd.openblox.game-binary obg +application/vnd.openeye.oeb oeb +application/vnd.openofficeorg.extension oxt +application/vnd.openstreetmap.data+xml osm +application/vnd.opentimestamps.ots +application/vnd.openxmlformats-officedocument.custom-properties+xml +application/vnd.openxmlformats-officedocument.customXmlProperties+xml +application/vnd.openxmlformats-officedocument.drawing+xml +application/vnd.openxmlformats-officedocument.drawingml.chart+xml +application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml +application/vnd.openxmlformats-officedocument.extended-properties+xml +application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml +application/vnd.openxmlformats-officedocument.presentationml.comments+xml +application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml +application/vnd.openxmlformats-officedocument.presentationml.presProps+xml +application/vnd.openxmlformats-officedocument.presentationml.slide sldx +application/vnd.openxmlformats-officedocument.presentationml.slide+xml +application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml +application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml +application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml +application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml +application/vnd.openxmlformats-officedocument.presentationml.tags+xml +application/vnd.openxmlformats-officedocument.presentationml.template potx +application/vnd.openxmlformats-officedocument.presentationml.template.main+xml +application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml +application/vnd.openxmlformats-officedocument.theme+xml +application/vnd.openxmlformats-officedocument.themeOverride+xml +application/vnd.openxmlformats-officedocument.vmlDrawing +application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml +application/vnd.openxmlformats-package.core-properties+xml +application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml +application/vnd.openxmlformats-package.relationships+xml +application/vnd.oracle.resource+json +application/vnd.orange.indata +application/vnd.osa.netdeploy ndc +application/vnd.osgeo.mapguide.package mgp +application/vnd.osgi.bundle +application/vnd.osgi.dp dp +application/vnd.osgi.subsystem esa +application/vnd.otps.ct-kip+xml +application/vnd.oxli.countgraph oxlicg +application/vnd.pagerduty+json +application/vnd.palm pdb pqa oprc +application/vnd.panoply plp +application/vnd.paos.xml +application/vnd.patentdive dive +application/vnd.patientecommsdoc +application/vnd.pawaafile paw +application/vnd.pcos +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +application/vnd.piaccess.application-licence pil +application/vnd.picsel efif +application/vnd.pmi.widget wg +application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.preminet preminet +application/vnd.previewsystems.box box vbox +application/vnd.proteus.magazine mgz +application/vnd.psfs psfs +application/vnd.pt.mundusmundi +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +application/vnd.pwg-multiplexed +application/vnd.pwg-xhtml-print+xml +application/vnd.qualcomm.brew-app-res bar +application/vnd.quarantainenet +application/vnd.Quark.QuarkXPress qxd qxt qwd qwt qxl qxb +application/vnd.quobject-quoxdocument quox quiz +application/vnd.radisys.moml+xml +application/vnd.radisys.msml+xml +application/vnd.radisys.msml-audit+xml +application/vnd.radisys.msml-audit-conf+xml +application/vnd.radisys.msml-audit-conn+xml +application/vnd.radisys.msml-audit-dialog+xml +application/vnd.radisys.msml-audit-stream+xml +application/vnd.radisys.msml-conf+xml +application/vnd.radisys.msml-dialog+xml +application/vnd.radisys.msml-dialog-base+xml +application/vnd.radisys.msml-dialog-fax-detect+xml +application/vnd.radisys.msml-dialog-fax-sendrecv+xml +application/vnd.radisys.msml-dialog-group+xml +application/vnd.radisys.msml-dialog-speech+xml +application/vnd.radisys.msml-dialog-transform+xml +application/vnd.rainstor.data tree +application/vnd.rapid +application/vnd.rar rar +application/vnd.realvnc.bed bed +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml +application/vnd.RenLearn.rlprint +application/vnd.resilient.logic rlm reload +application/vnd.restful+json +application/vnd.rig.cryptonote cryptonote +application/vnd.rim.cod cod +application/vnd.route66.link66+xml link66 +application/vnd.rs-274x +application/vnd.ruckus.download +application/vnd.s3sms +application/vnd.sailingtracker.track st +application/vnd.sar SAR +application/vnd.sbm.cid +application/vnd.sbm.mid2 +application/vnd.scribus scd sla slaz +application/vnd.sealed.3df s3df +application/vnd.sealed.csf scsf +application/vnd.sealed.doc sdoc sdo s1w +application/vnd.sealed.eml seml sem +application/vnd.sealed.mht smht smh +application/vnd.sealed.net +application/vnd.sealed.ppt sppt s1p +application/vnd.sealed.tiff stif +application/vnd.sealed.xls sxls sxl s1e +application/vnd.sealedmedia.softseal.html stml s1h +application/vnd.sealedmedia.softseal.pdf spdf spd s1a +application/vnd.seemail see +application/vnd.seis+json +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shade-save-file ssv +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.shootproof+json +application/vnd.shopkick+json +application/vnd.shp shp +application/vnd.shx shx +application/vnd.sigrok.session sr +application/vnd.SimTech-MindMapper twd twds +application/vnd.siren+json +application/vnd.smaf mmf +application/vnd.smart.notebook notebook +application/vnd.smart.teacher teacher +application/vnd.smintio.portals.archive sipa +application/vnd.snesdev-page-table ptrom pt +application/vnd.software602.filler.form+xml fo +application/vnd.software602.filler.form-xml-zip zfo +application/vnd.solent.sdkm+xml sdkm sdkd +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +application/vnd.sqlite3 sqlite sqlite3 +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.chart sds +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.math smf +application/vnd.stardivision.writer sdw +application/vnd.stardivision.writer-global sgl +application/vnd.stepmania.package smzip +application/vnd.stepmania.stepchart sm +application/vnd.street-stream +application/vnd.sun.wadl+xml wadl +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.sus-calendar sus susp +application/vnd.svd +application/vnd.swiftview-ics +application/vnd.sybyl.mol2 ml2 mol2 sy2 +application/vnd.sycle+xml scl +application/vnd.syft+json syft.json +application/vnd.symbian.install sis +application/vnd.syncml+xml xsm +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +application/vnd.syncml.dm.notification +application/vnd.syncml.dmddf+wbxml +application/vnd.syncml.dmddf+xml ddf +application/vnd.syncml.dmtnds+wbxml +application/vnd.syncml.dmtnds+xml +application/vnd.syncml.ds.notification +application/vnd.tableschema+json +application/vnd.tao.intent-module-archive tao +application/vnd.tcpdump.pcap pcap cap dmp +application/vnd.theqvd qvd +application/vnd.think-cell.ppttc+json ppttc +application/vnd.tmd.mediaflex.api+xml +application/vnd.tml vfr viaframe +application/vnd.tmobile-livetv tmo +application/vnd.tri.onesource +application/vnd.trid.tpt tpt +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +application/vnd.truedoc +application/vnd.ubisoft.webplayer +application/vnd.ufdl ufdl ufd frm +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml uo +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.uri-map urim urimap +application/vnd.valve.source.material vmt +application/vnd.vcx vcx +application/vnd.vd-study mxi study-inter model-inter +application/vnd.vectorworks vwx +application/vnd.vel+json +application/vnd.verimatrix.vcas +application/vnd.veritone.aion+json aion vtnstd +application/vnd.veryant.thin istc isws +application/vnd.ves.encrypted VES +application/vnd.vidsoft.vidconference vsc +application/vnd.visio vsd vst vsw vss +application/vnd.visionary vis +application/vnd.vividence.scriptfile +application/vnd.vsf vsf +application/vnd.wap.sic sic +application/vnd.wap.slc slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.wasmflow.wafl wafl +application/vnd.webturbo wtb +application/vnd.wfa.dpp +application/vnd.wfa.p2p p2p +application/vnd.wfa.wsc wsc +application/vnd.windows.devicepairing +application/vnd.wmc wmc +application/vnd.wmf.bootstrap +application/vnd.wolfram.mathematica nb +application/vnd.wolfram.mathematica.package m +application/vnd.wolfram.player nbp +application/vnd.wordlift +application/vnd.wordperfect wpd +application/vnd.wqd wqd +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +application/vnd.wv.csp+wbxml wv +application/vnd.wv.csp+xml +application/vnd.wv.ssp+xml +application/vnd.xacml+json +application/vnd.xara xar +application/vnd.xfdl xfdl xfd +application/vnd.xfdl.webform +application/vnd.xmi+xml +application/vnd.xmpie.cpkg cpkg +application/vnd.xmpie.dpkg dpkg +application/vnd.xmpie.plan +application/vnd.xmpie.ppkg ppkg +application/vnd.xmpie.xlim xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.openscoreformat osf +application/vnd.yamaha.openscoreformat.osfpvg+xml +application/vnd.yamaha.remote-setup +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +application/vnd.yamaha.through-ngn +application/vnd.yamaha.tunnel-udpencap +application/vnd.yaoweme yme +application/vnd.yellowriver-custom-menu cmp +application/vnd.zul zir zirz +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +application/voucher-cms+json vcj +application/vq-rtcpxr +application/wasm wasm +application/watcherinfo+xml wif +application/webpush-options+json +application/whoispp-query +application/whoispp-response +application/widget wgt +application/wita +application/wordperfect5.1 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-123 wk +application/x-7z-compressed 7z +application/x-abiword abw +application/x-apple-diskimage dmg +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-cdf cdf cda +application/x-cdlink vcd +application/x-comsol mph +application/x-cpio cpio +application/x-csh csh +application/x-director dcr dir dxr +application/x-doom wad +application/x-dvi dvi +application/x-font pfa pfb gsf +application/x-font-pcf pcf pcf.Z +application/x-freemind mm +application/x-ganttproject gan +application/x-gnumeric gnumeric +application/x-go-sgf sgf +application/x-graphing-calculator gcf +application/x-gtar gtar +application/x-gtar-compressed tgz taz +application/x-hdf hdf +application/x-hwp hwp +application/x-ica ica +application/x-info info +application/x-internet-signup ins isp +application/x-iphone iii +application/x-iso9660-image iso +application/x-java-jnlp-file jnlp +application/x-jmol jmz +application/x-killustrator kil +application/x-latex latex +application/x-lha lha +application/x-lyx lyx +application/x-lzh lzh +application/x-lzx lzx +application/x-maker frm maker frame fm fb book fbdoc +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-msdos-program com exe bat dll +application/x-msi msi +application/x-netcdf nc +application/x-ns-proxy-autoconfig pac +application/x-nwc nwc +application/x-object o +application/x-oz-application oza +application/x-pkcs7-certreqresp p7r +application/x-pki-message +application/x-python-code pyc pyo +application/x-qgis qgs shp shx +application/x-quicktimeplayer qtl +application/x-rdp rdp +application/x-redhat-package-manager rpm +application/x-rss+xml rss +application/x-ruby rb +application/x-scilab sci sce +application/x-scilab-xcos xcos +application/x-sh sh +application/x-shar shar +application/x-silverlight scr +application/x-stuffit sit sitx +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl tcl +application/x-tex-gf gf +application/x-tex-pk pk +application/x-texinfo texinfo texi +application/x-trash ~ % bak old sik +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/x-wingz wz +application/x-www-form-urlencoded +application/x-x509-ca-cert crt +application/x-x509-ca-ra-cert +application/x-x509-next-ca-cert +application/x-xfig fig +application/x-xpinstall xpi +application/x-xz xz +application/x400-bp +application/xacml+xml +application/xcap-att+xml xav +application/xcap-caps+xml xca +application/xcap-diff+xml xdf +application/xcap-el+xml xel +application/xcap-error+xml xer +application/xcap-ns+xml xns +application/xcon-conference-info+xml +application/xcon-conference-info-diff+xml +application/xenc+xml +application/xfdf xfdf +application/xhtml+xml xhtml xhtm xht +application/xliff+xml xlf +application/xml xml +application/xml-dtd dtd mod +application/xml-external-parsed-entity ent +application/xml-patch+xml +application/xmpp+xml +application/xop+xml xop +application/xslt+xml xsl xslt +application/xspf+xml xspf +application/xv+xml mxml xhvml xvml xvm +application/yaml yaml yml +application/yang yang +application/yang-data+cbor +application/yang-data+json +application/yang-data+xml +application/yang-patch+json +application/yang-patch+xml +application/yin+xml yin +application/zip zip +application/zlib +application/zstd zst + +audio/1d-interleaved-parityfec +audio/32kadpcm 726 +audio/3gpp +audio/3gpp2 +audio/aac adts aac ass +audio/ac3 ac3 +audio/AMR amr AMR +audio/AMR-WB awb AWB +audio/amr-wb+ +audio/annodex axa +audio/aptx +audio/asc acn +audio/ATRAC-ADVANCED-LOSSLESS aal +audio/ATRAC-X atx +audio/ATRAC3 at3 aa3 omg +audio/basic au snd +audio/BV16 +audio/BV32 +audio/clearmode +audio/CN +audio/csound csd orc sco +audio/DAT12 +audio/dls dls +audio/dsr-es201108 +audio/dsr-es202050 +audio/dsr-es202211 +audio/dsr-es202212 +audio/DV +audio/DVI4 +audio/eac3 +audio/encaprtp +audio/EVRC evc +audio/EVRC-QCP qcp QCP +audio/EVRC0 +audio/EVRC1 +audio/EVRCB evb +audio/EVRCB0 +audio/EVRCB1 +audio/EVRCNW enw +audio/EVRCNW0 +audio/EVRCNW1 +audio/EVRCWB evw +audio/EVRCWB0 +audio/EVRCWB1 +audio/EVS +audio/example +audio/flac flac +audio/flexfec +audio/fwdred +audio/G711-0 +audio/G719 +audio/G722 +audio/G7221 +audio/G723 +audio/G726-16 +audio/G726-24 +audio/G726-32 +audio/G726-40 +audio/G728 +audio/G729 +audio/G7291 +audio/G729D +audio/G729E +audio/GSM +audio/GSM-EFR +audio/GSM-HR-08 +audio/iLBC lbc +audio/ip-mr_v2.5 +audio/L16 l16 +audio/L20 +audio/L24 +audio/L8 +audio/LPC +audio/MELP +audio/MELP1200 +audio/MELP2400 +audio/MELP600 +audio/mhas mhas +audio/mobile-xmf mxmf +audio/mp4 m4a +audio/MP4A-LATM +audio/MPA +audio/mpa-robust +audio/mpeg mpga mpega mp1 mp2 mp3 +audio/mpeg4-generic +audio/mpegurl m3u +audio/ogg oga ogg opus spx +audio/opus +audio/parityfec +audio/PCMA +audio/PCMA-WB +audio/PCMU +audio/PCMU-WB +audio/prs.sid sid psid +audio/QCELP +audio/raptorfec +audio/RED +audio/rtp-enc-aescm128 +audio/rtp-midi +audio/rtploopback +audio/rtx +audio/scip +audio/SMV smv +audio/SMV-QCP +audio/SMV0 +audio/sofa sofa +audio/sp-midi mid +audio/speex +audio/t140c +audio/t38 +audio/telephone-event +audio/TETRA_ACELP +audio/TETRA_ACELP_BB +audio/tone +audio/TSVCIS +audio/UEMCLIP +audio/ulpfec +audio/usac loas xhe +audio/VDVI +audio/VMR-WB +audio/vnd.3gpp.iufp +audio/vnd.4SB +audio/vnd.audiokoz koz +audio/vnd.CELP +audio/vnd.cisco.nse +audio/vnd.cmles.radio-events +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.dece.audio uva uvva +audio/vnd.digital-winds eol +audio/vnd.dlna.adts +audio/vnd.dolby.heaac.1 +audio/vnd.dolby.heaac.2 +audio/vnd.dolby.mlp mlp +audio/vnd.dolby.mps +audio/vnd.dolby.pl2 +audio/vnd.dolby.pl2x +audio/vnd.dolby.pl2z +audio/vnd.dolby.pulse.1 +audio/vnd.dra +audio/vnd.dts dts +audio/vnd.dts.hd dtshd +audio/vnd.dts.uhd +audio/vnd.dvb.file +audio/vnd.everad.plj plj +audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.ms-playready.media.pya pya +audio/vnd.nokia.mobile-xmf +audio/vnd.nortel.vbk vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +audio/vnd.octel.sbc +audio/vnd.presonus.multitrack multitrack +audio/vnd.rhetorex.32kadpcm +audio/vnd.rip rip +audio/vnd.sealedmedia.softseal.mpeg smp3 smp s1m +audio/vnd.vmx.cvsd +audio/vorbis +audio/vorbis-config +audio/x-aiff aif aiff aifc +audio/x-gsm gsm +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ra rm ram +audio/x-scpls pls +audio/x-sd2 sd2 +audio/x-wav wav + +chemical/x-alchemy alc +chemical/x-cache cac cache +chemical/x-cache-csf csf +chemical/x-cactvs-binary cbin cascii ctab +chemical/x-cdx cdx +chemical/x-cerius +chemical/x-chem3d c3d +chemical/x-chemdraw chm +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-compass cpa +chemical/x-crossfire bsd +chemical/x-csml csml csm +chemical/x-ctx ctx +chemical/x-cxf cxf cef +#chemical/x-daylight-smiles smi +chemical/x-embl-dl-nucleotide emb embl +chemical/x-galactic-spc spc +chemical/x-gamess-input inp gam gamin +chemical/x-gaussian-checkpoint fch fchk +chemical/x-gaussian-cube cub +chemical/x-gaussian-input gau gjc gjf +chemical/x-gaussian-log gal +chemical/x-gcg8-sequence gcg +chemical/x-genbank gen +chemical/x-hin hin +chemical/x-isostar istr ist +chemical/x-jcamp-dx jdx dx +chemical/x-kinemage kin +chemical/x-macmolecule mcm +chemical/x-macromodel-input mmod +chemical/x-mdl-molfile mol +chemical/x-mdl-rdfile rd +chemical/x-mdl-rxnfile rxn +chemical/x-mdl-sdfile sd sdf +chemical/x-mdl-tgf tgf +#chemical/x-mif mif +chemical/x-mmcif mcif +chemical/x-molconn-Z b +chemical/x-mopac-graph gpt +chemical/x-mopac-input mop mopcrt mpc zmt +chemical/x-mopac-out moo +chemical/x-mopac-vib mvb +chemical/x-ncbi-asn1 asn +chemical/x-ncbi-asn1-ascii prt +chemical/x-ncbi-asn1-binary val aso +chemical/x-ncbi-asn1-spec asn +chemical/x-pdb pdb +chemical/x-rosdal ros +chemical/x-swissprot sw +chemical/x-vamas-iso14976 vms +chemical/x-vmd vmd +chemical/x-xtel xtel +chemical/x-xyz xyz + +font/collection ttc +font/otf otf +font/sfnt +font/ttf ttf +font/woff woff +font/woff2 woff2 + +image/aces exr +image/apng apng +image/avci avci +image/avcs avcs +image/avif avif hif +image/bmp bmp +image/cgm cgm +image/dicom-rle drle +image/dpx dpx +image/emf emf +image/example +image/fits fits fit fts +image/g3fax +image/gif gif +image/heic heic +image/heic-sequence heics +image/heif heif +image/heif-sequence heifs +image/hej2k hej2 +image/hsj2 hsj2 +image/ief ief +image/j2c j2c J2C j2k J2K +image/jls jls +image/jp2 jp2 jpg2 +image/jpeg jpeg jpg jpe jfif +image/jph jph +image/jphc jhc jphc +image/jpm jpm jpgm +image/jpx jpx jpf +image/jxl jxl +image/jxr jxr +image/jxrA jxra +image/jxrS jxrs +image/jxs jxs +image/jxsc jxsc +image/jxsi jxsi +image/jxss jxss +image/ktx ktx +image/ktx2 ktx2 +image/naplps +image/png png +image/prs.btif btif btf +image/prs.pti pti +image/pwg-raster +image/svg+xml svg svgz +image/t38 +image/tiff tiff tif +image/tiff-fx tfx +image/vnd.adobe.photoshop psd +image/vnd.airzip.accelerator.azv azv +image/vnd.cns.inf2 +image/vnd.dece.graphic uvi uvvi uvg uvvg +image/vnd.djvu djvu djv +image/vnd.dvb.subtitle +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +image/vnd.globalgraphics.pgb PGB pgb +image/vnd.microsoft.icon ico +image/vnd.mix +image/vnd.ms-modi mdi +image/vnd.net-fpx +image/vnd.pco.b16 b16 +image/vnd.radiance hdr rgbe xyze +image/vnd.sealed.png spng spn s1n +image/vnd.sealedmedia.softseal.gif sgif sgi s1g +image/vnd.sealedmedia.softseal.jpg sjpg sjp s1j +image/vnd.svf +image/vnd.tencent.tap tap +image/vnd.valve.source.texture vtf +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +image/vnd.zbrush.pcx pcx +image/webp webp +image/wmf wmf +image/x-canon-cr2 cr2 +image/x-canon-crw crw +image/x-cmu-raster ras +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-epson-erf erf +image/x-jg art +image/x-jng jng +image/x-nikon-nef nef +image/x-olympus-orf orf +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xcf xcf +image/x-xpixmap xpm +image/x-xwindowdump xwd + +inode/blockdevice +inode/chardevice +inode/directory +inode/directory-locked +inode/fifo +inode/socket + +message/bhttp +message/CPIM +message/delivery-status +message/disposition-notification +message/example +message/external-body +message/feedback-report +message/global u8msg +message/global-delivery-status u8dsn +message/global-disposition-notification u8mdn +message/global-headers u8hdr +message/http +message/imdn+xml +message/mls +message/ohttp-req +message/ohttp-res +message/partial +message/rfc822 eml mail art +message/s-http +message/sip +message/sipfrag +message/tracking-status +message/vnd.wfa.wsc + +model/3mf +model/e57 +model/example +model/gltf+json gltf +model/gltf-binary glb +model/iges igs iges +model/JT jt +model/mesh msh mesh silo +model/mtl mtl +model/obj obj +model/prc prc +model/step stp step +model/step+xml stpx +model/step+zip stpz +model/step-xml+zip stpxz +model/stl stl +model/u3d u3d +model/vnd.bary bary +model/vnd.cld cld +model/vnd.collada+xml dae +model/vnd.dwf dwf +model/vnd.flatland.3dml +model/vnd.gdl gdl gsm win dor lmp rsm msm ism +model/vnd.gs-gdl +model/vnd.gtw gtw +model/vnd.moml+xml moml +model/vnd.mts mts +model/vnd.opengex ogex +model/vnd.parasolid.transmit.binary x_b xmt_bin +model/vnd.parasolid.transmit.text x_t xmt_txt +model/vnd.pytha.pyox pyox +model/vnd.rosette.annotated-data-model +model/vnd.sap.vds vds +model/vnd.usda usda +model/vnd.usdz+zip usdz +model/vnd.valve.source.compiled-map bsp +model/vnd.vtu vtu +model/vrml wrl vrm vrml +model/x3d+fastinfoset x3db +model/x3d+xml x3d x3dz +model/x3d-vrml x3dv x3dvz + +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/example +multipart/form-data +multipart/header-set +multipart/mixed +multipart/multilingual +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/vnd.bint.med-plus bmed +multipart/voice-message vpm +multipart/x-mixed-replace + +text/1d-interleaved-parityfec +text/cache-manifest appcache manifest +text/calendar ics ifb +text/cql CQL +text/cql-extension +text/cql-identifier +text/css css +text/csv csv +text/csv-schema csvs +text/dns soa zone +text/encaprtp +text/enriched +text/example +text/fhirpath +text/flexfec +text/fwdred +text/gff3 gff3 +text/grammar-ref-list +text/hl7v2 +text/html html htm shtml +text/javascript es js mjs +text/jcr-cnd cnd +text/markdown md markdown +text/mizar miz +text/n3 n3 +text/parameters +text/parityfec +text/plain txt text pot brf srt +text/provenance-notation provn +text/prs.fallenstein.rst rst +text/prs.lines.tag tag dsc +text/prs.prop.logic +text/raptorfec +text/RED +text/rfc822-headers +text/rtf +text/rtp-enc-aescm128 +text/rtploopback +text/rtx +text/SGML sgml sgm +text/shaclc shaclc shc +text/shex shex +text/spdx spdx +text/strings +text/t140 +text/tab-separated-values tsv +text/texmacs tm +text/troff t tr roff +text/turtle ttl +text/ulpfec +text/uri-list uris uri +text/vcard vcf vcard +text/vnd.a a +text/vnd.abc abc +text/vnd.ascii-art ascii +text/vnd.curl curl +text/vnd.debian.copyright copyright +text/vnd.DMClientScript dms +text/vnd.dvb.subtitle +text/vnd.esmertec.theme-descriptor jtd +text/vnd.exchangeable VFK +text/vnd.familysearch.gedcom ged +text/vnd.ficlab.flt flt +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.gml +text/vnd.graphviz gv dot +text/vnd.hans hans +text/vnd.hgl hgl +text/vnd.in3d.3dml 3dml 3dm +text/vnd.in3d.spot spot spo +text/vnd.IPTC.NewsML +text/vnd.IPTC.NITF +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage mpf +text/vnd.net2phone.commcenter.command ccc +text/vnd.radisys.msml-basic-layout +text/vnd.senx.warpscript mc2 +text/vnd.sosi sos +text/vnd.sun.j2me.app-descriptor jad +text/vnd.trolltech.linguist ts +text/vnd.wap.si si +text/vnd.wap.sl sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/vtt vtt +text/wgsl wgsl +text/x-bibtex bib +text/x-boo boo +text/x-c++hdr h++ hpp hxx hh +text/x-c++src c++ cpp cxx cc +text/x-chdr h +text/x-component htc +text/x-csh csh +text/x-csrc c +text/x-diff diff patch +text/x-dsrc d +text/x-haskell hs +text/x-java java +text/x-lilypond ly +text/x-literate-haskell lhs +text/x-moc moc +text/x-pascal p pas +text/x-pcs-gcd gcd +text/x-perl pl pm +text/x-python py +text/x-scala scala +text/x-setext etx +text/x-sfv sfv +text/x-sh sh +text/x-tcl tcl tk +text/x-tex tex ltx sty cls +text/x-vcalendar vcs +text/xml +text/xml-dtd +text/xml-external-parsed-entity + +video/1d-interleaved-parityfec +video/3gpp +video/3gpp-tt +video/3gpp2 +video/annodex axv +video/AV1 +video/BMPEG +video/BT656 +video/CelB +video/DV +video/dv dif dv +video/encaprtp +video/example +video/FFV1 +video/flexfec +video/fli fli +video/gl gl +video/H261 +video/H263 +video/H263-1998 +video/H263-2000 +video/H264 +video/H264-RCDO +video/H264-SVC +video/H265 +video/H266 +video/iso.segment m4s +video/JPEG +video/jpeg2000 +video/jxsv +video/mj2 mj2 mjp2 +video/MP1S +video/MP2P +video/MP2T +video/mp4 mp4 mpg4 m4v +video/MP4V-ES +video/mpeg mpeg mpg mpe m1v m2v +video/mpeg4-generic +video/MPV +video/nv +video/ogg ogv +video/parityfec +video/pointer +video/quicktime qt mov +video/raptorfec +video/raw +video/rtp-enc-aescm128 +video/rtploopback +video/rtx +video/scip +video/smpte291 +video/SMPTE292M +video/ulpfec +video/vc1 +video/vc2 +video/vnd.CCTV +video/vnd.dece.hd uvh uvvh +video/vnd.dece.mobile uvm uvvm +video/vnd.dece.mp4 uvu uvvu +video/vnd.dece.pd uvp uvvp +video/vnd.dece.sd uvs uvvs +video/vnd.dece.video uvv uvvv +video/vnd.directv.mpeg +video/vnd.directv.mpeg-tts +video/vnd.dlna.mpeg-tts +video/vnd.dvb.file dvb +video/vnd.fvt fvt +video/vnd.hns.video +video/vnd.iptvforum.1dparityfec-1010 +video/vnd.iptvforum.1dparityfec-2005 +video/vnd.iptvforum.2dparityfec-1010 +video/vnd.iptvforum.2dparityfec-2005 +video/vnd.iptvforum.ttsavc +video/vnd.iptvforum.ttsmpeg2 +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl mxu m4u +video/vnd.ms-playready.media.pyv pyv +video/vnd.nokia.interleaved-multimedia nim +video/vnd.nokia.mp4vr +video/vnd.nokia.videovoip +video/vnd.objectvideo +video/vnd.radgamettools.bink bik bk2 +video/vnd.radgamettools.smacker smk +video/vnd.sealed.mpeg1 smpg s11 +video/vnd.sealed.mpeg4 s14 +video/vnd.sealed.swf sswf ssw +video/vnd.sealedmedia.softseal.mov smov smo s1q +video/vnd.uvvu.mp4 +video/vnd.vivo viv +video/vnd.youtube.yt yt +video/VP8 +video/VP9 +video/webm webm +video/x-flv flv +video/x-la-asf lsf lsx +video/x-matroska mpv mkv +video/x-mng mng +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie diff --git a/squashfs-root/etc/modules-load.d/modules.conf b/squashfs-root/etc/modules-load.d/modules.conf new file mode 120000 index 0000000..464b823 --- /dev/null +++ b/squashfs-root/etc/modules-load.d/modules.conf @@ -0,0 +1 @@ +../modules \ No newline at end of file diff --git a/squashfs-root/etc/pam.conf b/squashfs-root/etc/pam.conf new file mode 100644 index 0000000..3eeb72d --- /dev/null +++ b/squashfs-root/etc/pam.conf @@ -0,0 +1,15 @@ +# ---------------------------------------------------------------------------# +# /etc/pam.conf # +# ---------------------------------------------------------------------------# +# +# NOTE +# ---- +# +# NOTE: Most program use a file under the /etc/pam.d/ directory to setup their +# PAM service modules. This file is used only if that directory does not exist. +# ---------------------------------------------------------------------------# + +# Format: +# serv. module ctrl module [path] ...[args..] # +# name type flag # + diff --git a/squashfs-root/etc/pam.d/other b/squashfs-root/etc/pam.d/other new file mode 100644 index 0000000..59d776c --- /dev/null +++ b/squashfs-root/etc/pam.d/other @@ -0,0 +1,16 @@ +# +# /etc/pam.d/other - specify the PAM fallback behaviour +# +# Note that this file is used for any unspecified service; for example +#if /etc/pam.d/cron specifies no session modules but cron calls +#pam_open_session, the session module out of /etc/pam.d/other is +#used. If you really want nothing to happen then use pam_permit.so or +#pam_deny.so as appropriate. + +# We fall back to the system default in /etc/pam.d/common-* +# + +@include common-auth +@include common-account +@include common-password +@include common-session diff --git a/squashfs-root/etc/pam.d/runuser b/squashfs-root/etc/pam.d/runuser new file mode 100644 index 0000000..37f0e84 --- /dev/null +++ b/squashfs-root/etc/pam.d/runuser @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +session optional pam_keyinit.so revoke +session required pam_limits.so +session required pam_unix.so diff --git a/squashfs-root/etc/pam.d/runuser-l b/squashfs-root/etc/pam.d/runuser-l new file mode 100644 index 0000000..7a9a48c --- /dev/null +++ b/squashfs-root/etc/pam.d/runuser-l @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include runuser +session optional pam_keyinit.so force revoke +-session optional pam_systemd.so +session include runuser diff --git a/squashfs-root/etc/pam.d/su b/squashfs-root/etc/pam.d/su new file mode 100644 index 0000000..6729598 --- /dev/null +++ b/squashfs-root/etc/pam.d/su @@ -0,0 +1,61 @@ +# +# The PAM configuration file for the Shadow `su' service +# + +# This allows root to su without passwords (normal operation) +auth sufficient pam_rootok.so + +# Uncomment this to force users to be a member of group wheel +# before they can use `su'. You can also add "group=foo" +# to the end of this line if you want to use a group other +# than the default "wheel" (but this may have side effect of +# denying "root" user, unless she's a member of "foo" or explicitly +# permitted earlier by e.g. "sufficient pam_rootok.so"). +# (Replaces the `SU_WHEEL_ONLY' option from login.defs) +# auth required pam_wheel.so + +# Uncomment this if you want wheel members to be able to +# su without a password. +# auth sufficient pam_wheel.so trust + +# Uncomment this if you want members of a specific group to not +# be allowed to use su at all. +# auth required pam_wheel.so deny group=nosu + +# Uncomment and edit /etc/security/time.conf if you need to set +# time restrainst on su usage. +# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs +# as well as /etc/porttime) +# account requisite pam_time.so + +# This module parses environment configuration file(s) +# and also allows you to use an extended config +# file /etc/security/pam_env.conf. +# +# parsing /etc/environment needs "readenv=1" +session required pam_env.so readenv=1 +# locale variables are also kept into /etc/default/locale in etch +# reading this file *in addition to /etc/environment* does not hurt +session required pam_env.so readenv=1 envfile=/etc/default/locale + +# Defines the MAIL environment variable +# However, userdel also needs MAIL_DIR and MAIL_FILE variables +# in /etc/login.defs to make sure that removing a user +# also removes the user's mail spool file. +# See comments in /etc/login.defs +# +# "nopen" stands to avoid reporting new mail when su'ing to another user +session optional pam_mail.so nopen + +# Sets up user limits according to /etc/security/limits.conf +# (Replaces the use of /etc/limits in old login) +session required pam_limits.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +@include common-auth +@include common-account +@include common-session + + diff --git a/squashfs-root/etc/pam.d/su-l b/squashfs-root/etc/pam.d/su-l new file mode 100644 index 0000000..656a139 --- /dev/null +++ b/squashfs-root/etc/pam.d/su-l @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth include su +account include su +password include su +session optional pam_keyinit.so force revoke +session include su diff --git a/squashfs-root/etc/protocols b/squashfs-root/etc/protocols new file mode 100644 index 0000000..2fcc52f --- /dev/null +++ b/squashfs-root/etc/protocols @@ -0,0 +1,68 @@ +# Internet (IP) protocols +# +# Updated from http://www.iana.org/assignments/protocol-numbers and other +# sources. +# New protocols will be added on request if they have been officially +# assigned by IANA and are not historical. +# If you need a huge list of used numbers please install the nmap package. + +ip 0 IP # internet protocol, pseudo protocol number +hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883] +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # Internet Group Management +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st 5 ST # ST datagram mode +tcp 6 TCP # transmission control protocol +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco) +pup 12 PUP # PARC universal packet protocol +udp 17 UDP # user datagram protocol +hmp 20 HMP # host monitoring protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +rdp 27 RDP # "reliable datagram" protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905] +dccp 33 DCCP # Datagram Congestion Control Prot. [RFC4340] +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport +ipv6 41 IPv6 # Internet Protocol, version 6 +ipv6-route 43 IPv6-Route # Routing Header for IPv6 +ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Reservation Protocol +gre 47 GRE # General Routing Encapsulation +esp 50 IPSEC-ESP # Encap Security Payload [RFC2406] +ah 51 IPSEC-AH # Authentication Header [RFC2402] +skip 57 SKIP # SKIP +ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6 +ipv6-opts 60 IPv6-Opts # Destination Options for IPv6 +rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB) +vmtp 81 VMTP # Versatile Message Transport +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +ax.25 93 AX.25 # AX.25 frames +ipip 94 IPIP # IP-within-IP Encapsulation Protocol +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378] +encap 98 ENCAP # Yet Another IP encapsulation [RFC1241] +# 99 # any private encryption scheme +pim 103 PIM # Protocol Independent Multicast +ipcomp 108 IPCOMP # IP Payload Compression Protocol +vrrp 112 VRRP # Virtual Router Redundancy Protocol [RFC5798] +l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661] +isis 124 ISIS # IS-IS over IPv4 +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +mobility-header 135 Mobility-Header # Mobility Support for IPv6 [RFC3775] +udplite 136 UDPLite # UDP-Lite [RFC3828] +mpls-in-ip 137 MPLS-in-IP # MPLS-in-IP [RFC4023] +manet 138 # MANET Protocols [RFC5498] +hip 139 HIP # Host Identity Protocol +shim6 140 Shim6 # Shim6 Protocol [RFC5533] +wesp 141 WESP # Wrapped Encapsulating Security Payload +rohc 142 ROHC # Robust Header Compression +ethernet 143 Ethernet # Ethernet encapsulation for SRv6 [RFC8986] +# The following entries have not been assigned by IANA but are used +# internally by the Linux kernel. +mptcp 262 MPTCP # Multipath TCP connection diff --git a/squashfs-root/etc/python3.12/sitecustomize.py b/squashfs-root/etc/python3.12/sitecustomize.py new file mode 100644 index 0000000..89c6712 --- /dev/null +++ b/squashfs-root/etc/python3.12/sitecustomize.py @@ -0,0 +1,7 @@ +# install the apport exception handler if available +try: + import apport_python_hook +except ImportError: + pass +else: + apport_python_hook.install() diff --git a/squashfs-root/etc/rpc b/squashfs-root/etc/rpc new file mode 100644 index 0000000..fa84a47 --- /dev/null +++ b/squashfs-root/etc/rpc @@ -0,0 +1,41 @@ +# This file contains user readable names that can be used in place of rpc +# program numbers. + +portmapper 100000 portmap sunrpc rpcbind +rstatd 100001 rstat rstat_svc rup perfmeter +rusersd 100002 rusers +nfs 100003 nfsprog +ypserv 100004 ypprog +mountd 100005 mount showmount +ypbind 100007 +walld 100008 rwall shutdown +yppasswdd 100009 yppasswd +etherstatd 100010 etherstat +rquotad 100011 rquotaprog quota rquota +sprayd 100012 spray +3270_mapper 100013 +rje_mapper 100014 +selection_svc 100015 selnsvc +database_svc 100016 +rexd 100017 rex +alis 100018 +sched 100019 +llockmgr 100020 +nlockmgr 100021 +x25.inr 100022 +statmon 100023 +status 100024 +bootparam 100026 +ypupdated 100028 ypupdate +keyserv 100029 keyserver +tfsd 100037 +nsed 100038 +nsemntd 100039 +ypxfrd 100069 +nfs_acl 100227 +pcnfsd 150001 +amd 300019 amq +sgi_fam 391002 +ugidd 545580417 +fypxfrd 600100069 freebsd-ypxfrd +bwnfsd 788585389 diff --git a/squashfs-root/etc/security/access.conf b/squashfs-root/etc/security/access.conf new file mode 100644 index 0000000..47b6b84 --- /dev/null +++ b/squashfs-root/etc/security/access.conf @@ -0,0 +1,122 @@ +# Login access control table. +# +# Comment line must start with "#", no space at front. +# Order of lines is important. +# +# When someone logs in, the table is scanned for the first entry that +# matches the (user, host) combination, or, in case of non-networked +# logins, the first entry that matches the (user, tty) combination. The +# permissions field of that table entry determines whether the login will +# be accepted or refused. +# +# Format of the login access control table is three fields separated by a +# ":" character: +# +# [Note, if you supply a 'fieldsep=|' argument to the pam_access.so +# module, you can change the field separation character to be +# '|'. This is useful for configurations where you are trying to use +# pam_access with X applications that provide PAM_TTY values that are +# the display variable like "host:0".] +# +# permission:users:origins +# +# The first field should be a "+" (access granted) or "-" (access denied) +# character. +# +# The second field should be a list of one or more login names, group +# names, or ALL (always matches). A pattern of the form user@host is +# matched when the login name matches the "user" part, and when the +# "host" part matches the local machine name. +# +# The third field should be a list of one or more tty names (for +# non-networked logins), host names, domain names (begin with "."), host +# addresses, internet network numbers (end with "."), ALL (always +# matches), NONE (matches no tty on non-networked logins) or +# LOCAL (matches any string that does not contain a "." character). +# +# You can use @netgroupname in host or user patterns; this even works +# for @usergroup@@hostgroup patterns. +# +# The EXCEPT operator makes it possible to write very compact rules. +# +# The group file is searched only when a name does not match that of the +# logged-in user. Both the user's primary group is matched, as well as +# groups in which users are explicitly listed. +# To avoid problems with accounts, which have the same name as a group, +# you can use brackets around group names '(group)' to differentiate. +# In this case, you should also set the "nodefgroup" option. +# +# TTY NAMES: Must be in the form returned by ttyname(3) less the initial +# "/dev" (e.g. tty1 or vc/1) +# +############################################################################## +# +# Disallow non-root logins on tty1 +# +#-:ALL EXCEPT root:tty1 +# +# Disallow console logins to all but a few accounts. +# +#-:ALL EXCEPT wheel shutdown sync:LOCAL +# +# Same, but make sure that really the group wheel and not the user +# wheel is used (use nodefgroup argument, too): +# +#-:ALL EXCEPT (wheel) shutdown sync:LOCAL +# +# Disallow non-local logins to privileged accounts (group wheel). +# +#-:wheel:ALL EXCEPT LOCAL .win.tue.nl +# +# Some accounts are not allowed to login from anywhere: +# +#-:wsbscaro wsbsecr wsbspac wsbsym wscosor wstaiwde:ALL +# +# All other accounts are allowed to login from anywhere. +# +############################################################################## +# All lines from here up to the end are building a more complex example. +############################################################################## +# +# User "root" should be allowed to get access via cron .. tty5 tty6. +#+:root:cron crond :0 tty1 tty2 tty3 tty4 tty5 tty6 +# +# User "root" should be allowed to get access from hosts with ip addresses. +#+:root:192.168.200.1 192.168.200.4 192.168.200.9 +#+:root:127.0.0.1 +# +# User "root" should get access from network 192.168.201. +# This term will be evaluated by string matching. +# comment: It might be better to use network/netmask instead. +# The same is 192.168.201.0/24 or 192.168.201.0/255.255.255.0 +#+:root:192.168.201. +# +# User "root" should be able to have access from domain. +# Uses string matching also. +#+:root:.foo.bar.org +# +# User "root" should be denied to get access from all other sources. +#-:root:ALL +# +# User "foo" and members of netgroup "nis_group" should be +# allowed to get access from all sources. +# This will only work if netgroup service is available. +#+:@nis_group foo:ALL +# +# User "john" should get access from ipv4 net/mask +#+:john:127.0.0.0/24 +# +# User "john" should get access from ipv4 as ipv6 net/mask +#+:john:::ffff:127.0.0.0/127 +# +# User "john" should get access from ipv6 host address +#+:john:2001:4ca0:0:101::1 +# +# User "john" should get access from ipv6 host address (same as above) +#+:john:2001:4ca0:0:101:0:0:0:1 +# +# User "john" should get access from ipv6 net/mask +#+:john:2001:4ca0:0:101::/64 +# +# All other users should be denied to get access from all sources. +#-:ALL:ALL diff --git a/squashfs-root/etc/security/faillock.conf b/squashfs-root/etc/security/faillock.conf new file mode 100644 index 0000000..16d93df --- /dev/null +++ b/squashfs-root/etc/security/faillock.conf @@ -0,0 +1,62 @@ +# Configuration for locking the user after multiple failed +# authentication attempts. +# +# The directory where the user files with the failure records are kept. +# The default is /var/run/faillock. +# dir = /var/run/faillock +# +# Will log the user name into the system log if the user is not found. +# Enabled if option is present. +# audit +# +# Don't print informative messages. +# Enabled if option is present. +# silent +# +# Don't log informative messages via syslog. +# Enabled if option is present. +# no_log_info +# +# Only track failed user authentications attempts for local users +# in /etc/passwd and ignore centralized (AD, IdM, LDAP, etc.) users. +# The `faillock` command will also no longer track user failed +# authentication attempts. Enabling this option will prevent a +# double-lockout scenario where a user is locked out locally and +# in the centralized mechanism. +# Enabled if option is present. +# local_users_only +# +# Deny access if the number of consecutive authentication failures +# for this user during the recent interval exceeds n tries. +# The default is 3. +# deny = 3 +# +# The length of the interval during which the consecutive +# authentication failures must happen for the user account +# lock out is n seconds. +# The default is 900 (15 minutes). +# fail_interval = 900 +# +# The access will be re-enabled after n seconds after the lock out. +# The value 0 has the same meaning as value `never` - the access +# will not be re-enabled without resetting the faillock +# entries by the `faillock` command. +# The default is 600 (10 minutes). +# unlock_time = 600 +# +# Root account can become locked as well as regular accounts. +# Enabled if option is present. +# even_deny_root +# +# This option implies the `even_deny_root` option. +# Allow access after n seconds to root account after the +# account is locked. In case the option is not specified +# the value is the same as of the `unlock_time` option. +# root_unlock_time = 900 +# +# If a group name is specified with this option, members +# of the group will be handled by this module the same as +# the root account (the options `even_deny_root>` and +# `root_unlock_time` will apply to them. +# By default, the option is not set. +# admin_group = diff --git a/squashfs-root/etc/security/group.conf b/squashfs-root/etc/security/group.conf new file mode 100644 index 0000000..7c07a26 --- /dev/null +++ b/squashfs-root/etc/security/group.conf @@ -0,0 +1,106 @@ +# +# This is the configuration file for the pam_group module. +# + +# +# *** Please note that giving group membership on a session basis is +# *** NOT inherently secure. If a user can create an executable that +# *** is setgid a group that they are infrequently given membership +# *** of, they can basically obtain group membership any time they +# *** like. Example: games are allowed between the hours of 6pm and 6am +# *** user joe logs in at 7pm writes a small C-program toplay.c that +# *** invokes their favorite shell, compiles it and does +# *** "chgrp play toplay; chmod g+s toplay". They are basically able +# *** to play games any time... You have been warned. AGM +# + +# +# The syntax of the lines is as follows: +# +# services;ttys;users;times;groups +# +# white space is ignored and lines maybe extended with '\\n' (escaped +# newlines). From reading these comments, it is clear that +# text following a '#' is ignored to the end of the line. +# +# the combination of individual users/terminals etc is a logic list +# namely individual tokens that are optionally prefixed with '!' (logical +# not) and separated with '&' (logical and) and '|' (logical or). +# +# services +# is a logic list of PAM service names that the rule applies to. +# +# ttys +# is a logic list of terminal names that this rule applies to. +# +# users +# is a logic list of users or a netgroup of users to whom this +# rule applies. +# +# NB. For these items the simple wildcard '*' may be used only once. +# With netgroups no wildcards or logic operators are allowed. +# +# times +# It is used to indicate "when" these groups are to be given to the +# user. The format here is a logic list of day/time-range +# entries the days are specified by a sequence of two character +# entries, MoTuSa for example is Monday Tuesday and Saturday. Note +# that repeated days are unset MoMo = no day, and MoWk = all weekdays +# bar Monday. The two character combinations accepted are +# +# Mo Tu We Th Fr Sa Su Wk Wd Al +# +# the last two being week-end days and all 7 days of the week +# respectively. As a final example, AlFr means all days except Friday. +# +# Each day/time-range can be prefixed with a '!' to indicate "anything +# but" +# +# The time-range part is two 24-hour times HHMM separated by a hyphen +# indicating the start and finish time (if the finish time is smaller +# than the start time it is deemed to apply on the following day). +# +# groups +# The (comma or space separated) list of groups that the user +# inherits membership of. These groups are added if the previous +# fields are satisfied by the user's request +# +# For a rule to be active, ALL of service+ttys+users must be satisfied +# by the applying process. +# + +# +# Note, to get this to work as it is currently typed you need +# +# 1. to run an application as root +# 2. add the following groups to the /etc/group file: +# floppy, play, sound +# + +# +# Here is a simple example: running 'xsh' on tty* (any ttyXXX device), +# the user 'us' is given access to the floppy (through membership of +# the floppy group) +# + +#xsh;tty*&!ttyp*;us;Al0000-2400;floppy + +# +# another example: running 'xsh' on tty* (any ttyXXX device), +# the user 'sword' is given access to games (through membership of +# the sound and play group) after work hours. +# + +#xsh; tty* ;sword;!Wk0900-1800;sound, play +#xsh; tty* ;*;Al0900-1800;floppy + +# +# yet another example: any member of the group 'admin' running +# 'xsh' on tty*, is granted access (at any time) to the group 'plugdev' +# + +#xsh; tty* ;%admin;Al0000-2400;plugdev + +# +# End of group.conf file +# diff --git a/squashfs-root/etc/security/limits.conf b/squashfs-root/etc/security/limits.conf new file mode 100644 index 0000000..6b3865c --- /dev/null +++ b/squashfs-root/etc/security/limits.conf @@ -0,0 +1,67 @@ +# /etc/security/limits.conf +# +#This file sets the resource limits for the users logged in via PAM. +#It does not affect resource limits of the system services. +# +#Also note that configuration files in /etc/security/limits.d directory, +#which are read in alphabetical order, override the settings in this +#file in case the domain is the same or more specific. +#That means, for example, that setting a limit for wildcard domain here +#can be overridden with a wildcard setting in a config file in the +#subdirectory, but a user specific setting here can be overridden only +#with a user specific setting in the subdirectory. +# +#Each line describes a limit for a user in the form: +# +# +# +#Where: +# can be: +# - a user name +# - a group name, with @group syntax +# - the wildcard *, for default entry +# - the wildcard %, can be also used with %group syntax, +# for maxlogin limit +# - NOTE: group and wildcard limits are not applied to root. +# To apply a limit to the root user, must be +# the literal username root. +# +# can have the two values: +# - "soft" for enforcing the soft limits +# - "hard" for enforcing hard limits +# +# can be one of the following: +# - core - limits the core file size (KB) +# - data - max data size (KB) +# - fsize - maximum filesize (KB) +# - memlock - max locked-in-memory address space (KB) +# - nofile - max number of open file descriptors +# - rss - max resident set size (KB) +# - stack - max stack size (KB) +# - cpu - max CPU time (MIN) +# - nproc - max number of processes +# - as - address space limit (KB) +# - maxlogins - max number of logins for this user +# - maxsyslogins - max number of logins on the system +# - priority - the priority to run user process with +# - locks - max number of file locks the user can hold +# - sigpending - max number of pending signals +# - msgqueue - max memory used by POSIX message queues (bytes) +# - nice - max nice priority allowed to raise to values: [-20, 19] +# - rtprio - max realtime priority +# - chroot - change root to directory (Debian-specific) +# +# +# + +#* soft core 0 +#root hard core 100000 +#* hard rss 10000 +#@student hard nproc 20 +#@faculty soft nproc 20 +#@faculty hard nproc 50 +#ftp hard nproc 0 +#ftp - chroot /ftp +#@student - maxlogins 4 + +# End of file diff --git a/squashfs-root/etc/security/namespace.conf b/squashfs-root/etc/security/namespace.conf new file mode 100644 index 0000000..75ec619 --- /dev/null +++ b/squashfs-root/etc/security/namespace.conf @@ -0,0 +1,31 @@ +# /etc/security/namespace.conf +# +# See /usr/share/doc/pam-*/txts/README.pam_namespace for more information. +# +# Uncommenting the following three lines will polyinstantiate +# /tmp, /var/tmp and user's home directories. /tmp and /var/tmp will +# be polyinstantiated based on the MLS level part of the security context as well as user +# name, Polyinstantion will not be performed for user root and adm for directories +# /tmp and /var/tmp, whereas home directories will be polyinstantiated for all users. +# The user name and context is appended to the instance prefix. +# +# Note that instance directories do not have to reside inside the +# polyinstantiated directory. In the examples below, instances of /tmp +# will be created in /tmp-inst directory, where as instances of /var/tmp +# and users home directories will reside within the directories that +# are being polyinstantiated. +# +# Instance parent directories must exist for the polyinstantiation +# mechanism to work. By default, they should be created with the mode +# of 000. pam_namespace module will enforce this mode unless it +# is explicitly called with an argument to ignore the mode of the +# instance parent. System administrators should use this argument with +# caution, as it will reduce security and isolation achieved by +# polyinstantiation. The parent directories (except $HOME) are created +# at boot by pam_namespace_helper, but in a live system, system +# administrators should create the parent directories before enabling +# them here. +# +#/tmp /tmp-inst/ level root,adm +#/var/tmp /var/tmp/tmp-inst/ level root,adm +#$HOME $HOME/$USER.inst/ level diff --git a/squashfs-root/etc/security/namespace.init b/squashfs-root/etc/security/namespace.init new file mode 100755 index 0000000..8782178 --- /dev/null +++ b/squashfs-root/etc/security/namespace.init @@ -0,0 +1,43 @@ +#!/bin/sh +# It receives as arguments: +# - $1 polydir path (see WARNING below) +# - $2 instance path (see WARNING below) +# - $3 flag whether the instance dir was newly created (0 - no, 1 - yes) +# - $4 user name +# - $5 flag whether the polydir path ($1) is safe (0 - unsafe, 1 -safe) +# - $6 flag whether the instance path ($2) is safe (0 - unsafe, 1 - safe) +# +# WARNING: This script is invoked with full root privileges. Accessing +# the polydir ($1) and the instance ($2) directories in this context may be +# extremely dangerous as those can be under user control. The flags $5 and $6 +# are provided to let you know if all the segments part of the path (except the +# last one) are owned by root and are writable by root only. If the path does +# not meet these criteria, you expose yourself to possible symlink attacks when +# accessing these path. +# However, even if the path components are safe, the content of the +# directories may still be owned/writable by a user, so care must be taken! +# +# The following section will copy the contents of /etc/skel if this is a +# newly created home directory. + +# Executes only if the polydir path is safe +if [ "$5" = 1 ]; then + + if [ "$3" = 1 ]; then + # This line will fix the labeling on all newly created directories + [ -x /sbin/restorecon ] && /sbin/restorecon "$1" + user="$4" + passwd=$(getent passwd "$user") + homedir=$(echo "$passwd" | cut -f6 -d":") + if [ "$1" = "$homedir" ]; then + gid=$(echo "$passwd" | cut -f4 -d":") + cp -rT /etc/skel "$homedir" + chown -R "$user":"$gid" "$homedir" + mask=$(sed -E -n 's/^UMASK[[:space:]]+([^#[:space:]]+).*/\1/p' /etc/login.defs) + mode=$(printf "%o" $((0777 & ~mask))) + chmod ${mode:-700} "$homedir" + [ -x /sbin/restorecon ] && /sbin/restorecon -R "$homedir" + fi + fi +fi +exit 0 diff --git a/squashfs-root/etc/security/pam_env.conf b/squashfs-root/etc/security/pam_env.conf new file mode 100644 index 0000000..2549e43 --- /dev/null +++ b/squashfs-root/etc/security/pam_env.conf @@ -0,0 +1,73 @@ +# +# This is the configuration file for pam_env, a PAM module to load in +# a configurable list of environment variables for a +# +# The original idea for this came from Andrew G. Morgan ... +# +# Mmm. Perhaps you might like to write a pam_env module that reads a +# default environment from a file? I can see that as REALLY +# useful... Note it would be an "auth" module that returns PAM_IGNORE +# for the auth part and sets the environment returning PAM_SUCCESS in +# the setcred function... +# +# +# What I wanted was the REMOTEHOST variable set, purely for selfish +# reasons, and AGM didn't want it added to the SimpleApps login +# program (which is where I added the patch). So, my first concern is +# that variable, from there there are numerous others that might/would +# be useful to be set: NNTPSERVER, LESS, PATH, PAGER, MANPAGER ..... +# +# Of course, these are a different kind of variable than REMOTEHOST in +# that they are things that are likely to be configured by +# administrators rather than set by logging in, how to treat them both +# in the same config file? +# +# Here is my idea: +# +# Each line starts with the variable name, there are then two possible +# options for each variable DEFAULT and OVERRIDE. +# DEFAULT allows an administrator to set the value of the +# variable to some default value, if none is supplied then the empty +# string is assumed. The OVERRIDE option tells pam_env that it should +# enter in its value (overriding the default value) if there is one +# to use. OVERRIDE is not used, "" is assumed and no override will be +# done. +# +# VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]] +# +# (Possibly non-existent) environment variables may be used in values +# using the ${string} syntax and (possibly non-existent) PAM_ITEMs may +# be used in values using the @{string} syntax. Both the $ and @ +# characters can be backslash escaped to be used as literal values +# values can be delimited with "", escaped " not supported. +# Note that many environment variables that you would like to use +# may not be set by the time the module is called. +# For example, HOME is used below several times, but +# many PAM applications don't make it available by the time you need it. +# +# +# First, some special variables +# +# Set the REMOTEHOST variable for any hosts that are remote, default +# to "localhost" rather than not being set at all +#REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST} +# +# Set the DISPLAY variable if it seems reasonable +#DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY} +# +# +# Now some simple variables +# +#PAGER DEFAULT=less +#MANPAGER DEFAULT=less +#LESS DEFAULT="M q e h15 z23 b80" +#NNTPSERVER DEFAULT=localhost +#PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\ +#:/usr/bin:/usr/local/bin/X11:/usr/bin/X11 +# +# silly examples of escaped variables, just to show how they work. +# +#DOLLAR DEFAULT=\$ +#DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR} +#DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST} +#ATSIGN DEFAULT="" OVERRIDE=\@ diff --git a/squashfs-root/etc/security/pwhistory.conf b/squashfs-root/etc/security/pwhistory.conf new file mode 100644 index 0000000..070b719 --- /dev/null +++ b/squashfs-root/etc/security/pwhistory.conf @@ -0,0 +1,21 @@ +# Configuration for remembering the last passwords used by a user. +# +# Enable the debugging logs. +# Enabled if option is present. +# debug +# +# root account's passwords are also remembered. +# Enabled if option is present. +# enforce_for_root +# +# Number of passwords to remember. +# The default is 10. +# remember = 10 +# +# Number of times to prompt for the password. +# The default is 1. +# retry = 1 +# +# The directory where the last passwords are kept. +# The default is /etc/security/opasswd. +# file = /etc/security/opasswd diff --git a/squashfs-root/etc/security/sepermit.conf b/squashfs-root/etc/security/sepermit.conf new file mode 100644 index 0000000..0a12cd8 --- /dev/null +++ b/squashfs-root/etc/security/sepermit.conf @@ -0,0 +1,11 @@ +# /etc/security/sepermit.conf +# +# Each line contains either: +# - a user name +# - a group name, with @group syntax +# - a SELinux user name, with %seuser syntax +# Each line can contain optional arguments separated by : +# The possible arguments are: +# - exclusive - only single login session will +# be allowed for the user and the user's processes +# will be killed on logout diff --git a/squashfs-root/etc/security/time.conf b/squashfs-root/etc/security/time.conf new file mode 100644 index 0000000..68d2dad --- /dev/null +++ b/squashfs-root/etc/security/time.conf @@ -0,0 +1,65 @@ +# this is an example configuration file for the pam_time module. Its syntax +# was initially based heavily on that of the shadow package (shadow-960129). +# +# the syntax of the lines is as follows: +# +# services;ttys;users;times +# +# white space is ignored and lines maybe extended with '\\n' (escaped +# newlines). As should be clear from reading these comments, +# text following a '#' is ignored to the end of the line. +# +# the combination of individual users/terminals etc is a logic list +# namely individual tokens that are optionally prefixed with '!' (logical +# not) and separated with '&' (logical and) and '|' (logical or). +# +# services +# is a logic list of PAM service names that the rule applies to. +# +# ttys +# is a logic list of terminal names that this rule applies to. +# +# users +# is a logic list of users or a netgroup of users to whom this +# rule applies. +# +# NB. For these items the simple wildcard '*' may be used only once. +# +# times +# the format here is a logic list of day/time-range +# entries the days are specified by a sequence of two character +# entries, MoTuSa for example is Monday Tuesday and Saturday. Note +# that repeated days are unset MoMo = no day, and MoWk = all weekdays +# bar Monday. The two character combinations accepted are +# +# Mo Tu We Th Fr Sa Su Wk Wd Al +# +# the last two being week-end days and all 7 days of the week +# respectively. As a final example, AlFr means all days except Friday. +# +# each day/time-range can be prefixed with a '!' to indicate "anything +# but" +# +# The time-range part is two 24-hour times HHMM separated by a hyphen +# indicating the start and finish time (if the finish time is smaller +# than the start time it is deemed to apply on the following day). +# +# for a rule to be active, ALL of service+ttys+users must be satisfied +# by the applying process. +# + +# +# Here is a simple example: running blank on tty* (any ttyXXX device), +# the users 'you' and 'me' are denied service all of the time +# + +#blank;tty* & !ttyp*;you|me;!Al0000-2400 + +# Another silly example, user 'root' is denied xsh access +# from pseudo terminals at the weekend and on mondays. + +#xsh;ttyp*;root;!WdMo0000-2400 + +# +# End of example file. +# diff --git a/squashfs-root/etc/services b/squashfs-root/etc/services new file mode 100644 index 0000000..f90e9de --- /dev/null +++ b/squashfs-root/etc/services @@ -0,0 +1,361 @@ +# Network services, Internet style +# +# Updated from https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml . +# +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +domain 53/tcp # Domain Name Server +domain 53/udp +bootps 67/udp +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +pop3 110/tcp pop-3 # POP version 3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/udp # Network Time Protocol +epmap 135/tcp loc-srv # DCE endpoint resolution +netbios-ns 137/udp # NETBIOS Name Service +netbios-dgm 138/udp # NETBIOS Datagram Service +netbios-ssn 139/tcp # NETBIOS session service +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +xdmcp 177/udp # X Display Manager Control Protocol +bgp 179/tcp # Border Gateway Protocol +smux 199/tcp # SNMP Unix Multiplexer +qmtp 209/tcp # Quick Mail Transfer Protocol +z3950 210/tcp wais # NISO Z39.50 database +ipx 213/udp # IPX [RFC1234] +ptp-event 319/udp +ptp-general 320/udp +pawserv 345/tcp # Perf Analysis Workbench +zserv 346/tcp # Zebra server +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/udp Clearcase +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp # HTTP/3 +snpp 444/tcp # Simple Network Paging Protocol +microsoft-ds 445/tcp # Microsoft Naked CIFS +kpasswd 464/tcp +kpasswd 464/udp +submissions 465/tcp ssmtp smtps urd # Submission over TLS [RFC8314] +saft 487/tcp # Simple Asynchronous File Transfer +isakmp 500/udp # IPSEC key management +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +ipp 631/tcp # Internet Printing Protocol +ldp 646/tcp # Label Distribution Protocol +ldp 646/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd syslog # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/udp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +nntps 563/tcp snntp # NNTP over SSL +submission 587/tcp # Submission [RFC4409] +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +domain-s 853/tcp # DNS over TLS [RFC7858] +domain-s 853/udp # DNS over DTLS [RFC8094] +rsync 873/tcp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +imaps 993/tcp # IMAP over SSL +pop3s 995/tcp # POP-3 over SSL +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +proofd 1093/tcp +rootd 1094/tcp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +lotusnote 1352/tcp lotusnotes # Lotus Note +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-m 1434/udp # Microsoft SQL Monitor +ingreslock 1524/tcp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +groupwise 1677/tcp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +cisco-sccp 2000/tcp # Cisco SCCP +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gris 2135/tcp # Grid Resource Information Server +cvspserver 2401/tcp # CVS client/server operations +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +f5-globalsite 2792/tcp +gsiftp 2811/tcp +gpsd 2947/tcp +gds-db 3050/tcp gds_db # InterBase server +icpv2 3130/udp icp # Internet Cache Protocol +isns 3205/tcp # iSNS Server Port +isns 3205/udp # iSNS Server Port +iscsi-target 3260/tcp +mysql 3306/tcp +ms-wbt-server 3389/tcp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +daap 3689/tcp # Digital Audio Access Protocol +svn 3690/tcp subversion # Subversion protocol +suucp 4031/tcp # UUCP over SSL +sysrqd 4094/tcp # sysrq daemon +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +remctl 4373/tcp # Remote Authenticated Command Service +f5-iquery 4353/tcp # F5 iQuery +ntske 4460/tcp # Network Time Security Key Establishment +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/udp # Inter-Asterisk eXchange +mtn 4691/tcp # monotone Netsync Protocol +radmin-port 4899/tcp # RAdmin Port +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +cfengine 5308/tcp +mdns 5353/udp # Multicast DNS +postgresql 5432/tcp postgres # PostgreSQL Database +freeciv 5556/tcp rptp # Freeciv gameplay +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/sctp +x11 6000/tcp x11-0 # X Window System +x11-1 6001/tcp +x11-2 6002/tcp +x11-3 6003/tcp +x11-4 6004/tcp +x11-5 6005/tcp +x11-6 6006/tcp +x11-7 6007/tcp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +redis 6379/tcp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +mysql-proxy 6446/tcp # MySQL Proxy +babel 6696/udp # Babel Routing Protocol +ircs-u 6697/tcp # Internet Relay Chat via TLS/SSL +bbs 7000/tcp +afs3-fileserver 7000/udp +afs3-callback 7001/udp # callbacks to cache managers +afs3-prserver 7002/udp # users & groups database +afs3-vlserver 7003/udp # volume location database +afs3-kaserver 7004/udp # AFS/Kerberos authentication +afs3-volser 7005/udp # volume managment server +afs3-bos 7007/udp # basic overseer process +afs3-update 7008/udp # server-to-server updater +afs3-rmtsys 7009/udp # remote cache manager service +font-service 7100/tcp xfs # X Font Service +http-alt 8080/tcp webcache # WWW caching service +puppet 8140/tcp # The Puppet master service +bacula-dir 9101/tcp # Bacula Director +bacula-fd 9102/tcp # Bacula File Daemon +bacula-sd 9103/tcp # Bacula Storage Daemon +xmms2 9667/tcp # Cross-platform Music Multiplexing System +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-trapper 10051/tcp # Zabbix Trapper +amanda 10080/tcp # amanda backup services +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +iprop 2121/tcp # incremental propagation +supfilesrv 871/tcp # Software Upgrade Protocol server +supfiledbg 1127/tcp # Software Upgrade Protocol debugging + +# +# Services added for the Debian GNU/Linux distribution +# +poppassd 106/tcp # Eudora +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +munin 4949/tcp lrrd # Munin +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/squashfs-root/etc/ssl/openssl.cnf b/squashfs-root/etc/ssl/openssl.cnf new file mode 100644 index 0000000..12bc408 --- /dev/null +++ b/squashfs-root/etc/ssl/openssl.cnf @@ -0,0 +1,390 @@ +# +# OpenSSL example configuration file. +# See doc/man5/config.pod for more info. +# +# This is mostly being used for generation of certificate requests, +# but may be used for auto loading of providers + +# Note that you can include other files from the main configuration +# file using the .include directive. +#.include filename + +# This definition stops the following lines choking if HOME isn't +# defined. +HOME = . + + # Use this in order to automatically load providers. +openssl_conf = openssl_init + +# Comment out the next line to ignore configuration errors +config_diagnostics = 1 + +# Extra OBJECT IDENTIFIER info: +# oid_file = $ENV::HOME/.oid +oid_section = new_oids + +# To use this configuration file with the "-extfile" option of the +# "openssl x509" utility, name here the section containing the +# X.509v3 extensions to use: +# extensions = +# (Alternatively, use a configuration file that has only +# X.509v3 extensions in its main [= default] section.) + +[ new_oids ] +# We can add new OIDs in here for use by 'ca', 'req' and 'ts'. +# Add a simple OID like this: +# testoid1=1.2.3.4 +# Or use config file substitution like this: +# testoid2=${testoid1}.5.6 + +# Policies used by the TSA examples. +tsa_policy1 = 1.2.3.4.1 +tsa_policy2 = 1.2.3.4.5.6 +tsa_policy3 = 1.2.3.4.5.7 + +# For FIPS +# Optionally include a file that is generated by the OpenSSL fipsinstall +# application. This file contains configuration data required by the OpenSSL +# fips provider. It contains a named section e.g. [fips_sect] which is +# referenced from the [provider_sect] below. +# Refer to the OpenSSL security policy for more information. +# .include fipsmodule.cnf + +[openssl_init] +providers = provider_sect + +# List of providers to load +[provider_sect] +default = default_sect +# The fips section name should match the section name inside the +# included fipsmodule.cnf. +# fips = fips_sect + +# If no providers are activated explicitly, the default one is activated implicitly. +# See man 7 OSSL_PROVIDER-default for more details. +# +# If you add a section explicitly activating any other provider(s), you most +# probably need to explicitly activate the default provider, otherwise it +# becomes unavailable in openssl. As a consequence applications depending on +# OpenSSL may not work correctly which could lead to significant system +# problems including inability to remotely access the system. +[default_sect] +# activate = 1 + + +#################################################################### +[ ca ] +default_ca = CA_default # The default ca section + +#################################################################### +[ CA_default ] + +dir = ./demoCA # Where everything is kept +certs = $dir/certs # Where the issued certs are kept +crl_dir = $dir/crl # Where the issued crl are kept +database = $dir/index.txt # database index file. +#unique_subject = no # Set to 'no' to allow creation of + # several certs with same subject. +new_certs_dir = $dir/newcerts # default place for new certs. + +certificate = $dir/cacert.pem # The CA certificate +serial = $dir/serial # The current serial number +crlnumber = $dir/crlnumber # the current crl number + # must be commented out to leave a V1 CRL +crl = $dir/crl.pem # The current CRL +private_key = $dir/private/cakey.pem# The private key + +x509_extensions = usr_cert # The extensions to add to the cert + +# Comment out the following two lines for the "traditional" +# (and highly broken) format. +name_opt = ca_default # Subject Name options +cert_opt = ca_default # Certificate field options + +# Extension copying option: use with caution. +# copy_extensions = copy + +# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs +# so this is commented out by default to leave a V1 CRL. +# crlnumber must also be commented out to leave a V1 CRL. +# crl_extensions = crl_ext + +default_days = 365 # how long to certify for +default_crl_days= 30 # how long before next CRL +default_md = default # use public key default MD +preserve = no # keep passed DN ordering + +# A few difference way of specifying how similar the request should look +# For type CA, the listed attributes must be the same, and the optional +# and supplied fields are just that :-) +policy = policy_match + +# For the CA policy +[ policy_match ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +# For the 'anything' policy +# At this point in time, you must list all acceptable 'object' +# types. +[ policy_anything ] +countryName = optional +stateOrProvinceName = optional +localityName = optional +organizationName = optional +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +#################################################################### +[ req ] +default_bits = 2048 +default_keyfile = privkey.pem +distinguished_name = req_distinguished_name +attributes = req_attributes +x509_extensions = v3_ca # The extensions to add to the self signed cert + +# Passwords for private keys if not present they will be prompted for +# input_password = secret +# output_password = secret + +# This sets a mask for permitted string types. There are several options. +# default: PrintableString, T61String, BMPString. +# pkix : PrintableString, BMPString (PKIX recommendation before 2004) +# utf8only: only UTF8Strings (PKIX recommendation after 2004). +# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). +# MASK:XXXX a literal mask value. +# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings. +string_mask = utf8only + +# req_extensions = v3_req # The extensions to add to a certificate request + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = AU +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = Some-State + +localityName = Locality Name (eg, city) + +0.organizationName = Organization Name (eg, company) +0.organizationName_default = Internet Widgits Pty Ltd + +# we can do this but it is not needed normally :-) +#1.organizationName = Second Organization Name (eg, company) +#1.organizationName_default = World Wide Web Pty Ltd + +organizationalUnitName = Organizational Unit Name (eg, section) +#organizationalUnitName_default = + +commonName = Common Name (e.g. server FQDN or YOUR name) +commonName_max = 64 + +emailAddress = Email Address +emailAddress_max = 64 + +# SET-ex3 = SET extension number 3 + +[ req_attributes ] +challengePassword = A challenge password +challengePassword_min = 4 +challengePassword_max = 20 + +unstructuredName = An optional company name + +[ usr_cert ] + +# These extensions are added when 'ca' signs a request. + +# This goes against PKIX guidelines but some CAs do it and some software +# requires this to avoid interpreting an end user certificate as a CA. + +basicConstraints=CA:FALSE + +# This is typical in keyUsage for a client certificate. +# keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +# PKIX recommendations harmless if included in all certificates. +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer + +# This stuff is for subjectAltName and issuerAltname. +# Import the email address. +# subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move + +# Copy subject details +# issuerAltName=issuer:copy + +# This is required for TSA certificates. +# extendedKeyUsage = critical,timeStamping + +[ v3_req ] + +# Extensions to add to a certificate request + +basicConstraints = CA:FALSE +keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +[ v3_ca ] + + +# Extensions for a typical CA + + +# PKIX recommendation. + +subjectKeyIdentifier=hash + +authorityKeyIdentifier=keyid:always,issuer + +basicConstraints = critical,CA:true + +# Key usage: this is typical for a CA certificate. However since it will +# prevent it being used as an test self-signed certificate it is best +# left out by default. +# keyUsage = cRLSign, keyCertSign + +# Include email address in subject alt name: another PKIX recommendation +# subjectAltName=email:copy +# Copy issuer details +# issuerAltName=issuer:copy + +# DER hex encoding of an extension: beware experts only! +# obj=DER:02:03 +# Where 'obj' is a standard or added object +# You can even override a supported extension: +# basicConstraints= critical, DER:30:03:01:01:FF + +[ crl_ext ] + +# CRL extensions. +# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. + +# issuerAltName=issuer:copy +authorityKeyIdentifier=keyid:always + +[ proxy_cert_ext ] +# These extensions should be added when creating a proxy certificate + +# This goes against PKIX guidelines but some CAs do it and some software +# requires this to avoid interpreting an end user certificate as a CA. + +basicConstraints=CA:FALSE + +# This is typical in keyUsage for a client certificate. +# keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +# PKIX recommendations harmless if included in all certificates. +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer + +# This stuff is for subjectAltName and issuerAltname. +# Import the email address. +# subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move + +# Copy subject details +# issuerAltName=issuer:copy + +# This really needs to be in place for it to be a proxy certificate. +proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo + +#################################################################### +[ tsa ] + +default_tsa = tsa_config1 # the default TSA section + +[ tsa_config1 ] + +# These are used by the TSA reply generation only. +dir = ./demoCA # TSA root directory +serial = $dir/tsaserial # The current serial number (mandatory) +crypto_device = builtin # OpenSSL engine to use for signing +signer_cert = $dir/tsacert.pem # The TSA signing certificate + # (optional) +certs = $dir/cacert.pem # Certificate chain to include in reply + # (optional) +signer_key = $dir/private/tsakey.pem # The TSA private key (optional) +signer_digest = sha256 # Signing digest to use. (Optional) +default_policy = tsa_policy1 # Policy if request did not specify it + # (optional) +other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional) +digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory) +accuracy = secs:1, millisecs:500, microsecs:100 # (optional) +clock_precision_digits = 0 # number of digits after dot. (optional) +ordering = yes # Is ordering defined for timestamps? + # (optional, default: no) +tsa_name = yes # Must the TSA name be included in the reply? + # (optional, default: no) +ess_cert_id_chain = no # Must the ESS cert id chain be included? + # (optional, default: no) +ess_cert_id_alg = sha1 # algorithm to compute certificate + # identifier (optional, default: sha1) + +[insta] # CMP using Insta Demo CA +# Message transfer +server = pki.certificate.fi:8700 +# proxy = # set this as far as needed, e.g., http://192.168.1.1:8080 +# tls_use = 0 +path = pkix/ + +# Server authentication +recipient = "/C=FI/O=Insta Demo/CN=Insta Demo CA" # or set srvcert or issuer +ignore_keyusage = 1 # potentially needed quirk +unprotected_errors = 1 # potentially needed quirk +extracertsout = insta.extracerts.pem + +# Client authentication +ref = 3078 # user identification +secret = pass:insta # can be used for both client and server side + +# Generic message options +cmd = ir # default operation, can be overridden on cmd line with, e.g., kur + +# Certificate enrollment +subject = "/CN=openssl-cmp-test" +newkey = insta.priv.pem +out_trusted = apps/insta.ca.crt # does not include keyUsage digitalSignature +certout = insta.cert.pem + +[pbm] # Password-based protection for Insta CA +# Server and client authentication +ref = $insta::ref # 3078 +secret = $insta::secret # pass:insta + +[signature] # Signature-based protection for Insta CA +# Server authentication +trusted = $insta::out_trusted # apps/insta.ca.crt + +# Client authentication +secret = # disable PBM +key = $insta::newkey # insta.priv.pem +cert = $insta::certout # insta.cert.pem + +[ir] +cmd = ir + +[cr] +cmd = cr + +[kur] +# Certificate update +cmd = kur +oldcert = $insta::certout # insta.cert.pem + +[rr] +# Certificate revocation +cmd = rr +oldcert = $insta::certout # insta.cert.pem diff --git a/squashfs-root/etc/sysctl.conf b/squashfs-root/etc/sysctl.conf new file mode 100644 index 0000000..c9d1e48 --- /dev/null +++ b/squashfs-root/etc/sysctl.conf @@ -0,0 +1,64 @@ +# +# /etc/sysctl.conf - Configuration file for setting system variables +# See /etc/sysctl.d/ for additional system variables. +# See sysctl.conf (5) for information. +# + +#kernel.domainname = example.com + +# Uncomment the following to stop low-level messages on console +#kernel.printk = 3 4 1 3 + +################################################################### +# Functions previously found in netbase +# + +# Uncomment the next two lines to enable Spoof protection (reverse-path filter) +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks +#net.ipv4.conf.default.rp_filter=1 +#net.ipv4.conf.all.rp_filter=1 + +# Uncomment the next line to enable TCP/IP SYN cookies +# See http://lwn.net/Articles/277146/ +# Note: This may impact IPv6 TCP sessions too +#net.ipv4.tcp_syncookies=1 + +# Uncomment the next line to enable packet forwarding for IPv4 +#net.ipv4.ip_forward=1 + +# Uncomment the next line to enable packet forwarding for IPv6 +# Enabling this option disables Stateless Address Autoconfiguration +# based on Router Advertisements for this host +#net.ipv6.conf.all.forwarding=1 + + +################################################################### +# Additional settings - these settings can improve the network +# security of the host and prevent against some network attacks +# including spoofing attacks and man in the middle attacks through +# redirection. Some network environments, however, require that these +# settings are disabled so review and enable them as needed. +# +# Do not accept ICMP redirects (prevent MITM attacks) +#net.ipv4.conf.all.accept_redirects = 0 +#net.ipv4.conf.default.accept_redirects = 0 +# _or_ +# Accept ICMP redirects only for gateways listed in our default +# gateway list (enabled by default) +# net.ipv4.conf.all.secure_redirects = 1 +# +# Do not send ICMP redirects (we are not a router) +#net.ipv4.conf.all.send_redirects = 0 +# +# Log Martian Packets +#net.ipv4.conf.all.log_martians = 1 +# + +################################################################### +# Magic system request Key +# 0=disable, 1=enable all, >1 bitmask of sysrq functions +# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html +# for what other values do +#kernel.sysrq=438 + diff --git a/squashfs-root/etc/sysctl.d/10-bufferbloat.conf b/squashfs-root/etc/sysctl.d/10-bufferbloat.conf new file mode 100644 index 0000000..55a0c44 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-bufferbloat.conf @@ -0,0 +1,8 @@ +# The Fair Queue CoDel packet scheduler is an across the board improvement to +# the default pfifo_fast qdisc. It reduces bottleneck delays, provides accurate +# RTT estimates to elephant TCP flows, and still allows shorter (sparser) flows +# like DNS, ARP, SYN, routing, etc packets priority access. For technical +# details, refer to https://www.bufferbloat.net/projects/codel/wiki/ +# +# To fight bufferbloat, set it as the default qdisc in Ubuntu. +-net.core.default_qdisc = fq_codel diff --git a/squashfs-root/etc/sysctl.d/10-console-messages.conf b/squashfs-root/etc/sysctl.d/10-console-messages.conf new file mode 100644 index 0000000..8402cf4 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-console-messages.conf @@ -0,0 +1,3 @@ + +# the following stops low-level messages on console +kernel.printk = 4 4 1 7 diff --git a/squashfs-root/etc/sysctl.d/10-ipv6-privacy.conf b/squashfs-root/etc/sysctl.d/10-ipv6-privacy.conf new file mode 100644 index 0000000..e0eac25 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-ipv6-privacy.conf @@ -0,0 +1,12 @@ +# IPv6 Privacy Extensions (RFC 4941) +# --- +# IPv6 typically uses a device's MAC address when choosing an IPv6 address +# to use in autoconfiguration. Privacy extensions allow using a randomly +# generated IPv6 address, which increases privacy. +# +# Acceptable values: +# 0 - don’t use privacy extensions. +# 1 - generate privacy addresses +# 2 - prefer privacy addresses and use them over the normal addresses. +net.ipv6.conf.all.use_tempaddr = 2 +net.ipv6.conf.default.use_tempaddr = 2 diff --git a/squashfs-root/etc/sysctl.d/10-kernel-hardening.conf b/squashfs-root/etc/sysctl.d/10-kernel-hardening.conf new file mode 100644 index 0000000..91bc8c8 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-kernel-hardening.conf @@ -0,0 +1,25 @@ +# These settings are specific to hardening the kernel itself from attack +# from userspace, rather than protecting userspace from other malicious +# userspace things. +# +# +# When an attacker is trying to exploit the local kernel, it is often +# helpful to be able to examine where in memory the kernel, modules, +# and data structures live. As such, kernel addresses should be treated +# as sensitive information. +# +# Many files and interfaces contain these addresses (e.g. /proc/kallsyms, +# /proc/modules, etc), and this setting can censor the addresses. A value +# of "0" allows all users to see the kernel addresses. A value of "1" +# limits visibility to the root user, and "2" blocks even the root user. +kernel.kptr_restrict = 1 + +# Access to the kernel log buffer can be especially useful for an attacker +# attempting to exploit the local kernel, as kernel addresses and detailed +# call traces are frequently found in kernel oops messages. Setting +# dmesg_restrict to "0" allows all users to view the kernel log buffer, +# and setting it to "1" restricts access to those with CAP_SYSLOG. +# +# dmesg_restrict defaults to 1 via CONFIG_SECURITY_DMESG_RESTRICT, only +# uncomment the following line to disable. +# kernel.dmesg_restrict = 0 diff --git a/squashfs-root/etc/sysctl.d/10-magic-sysrq.conf b/squashfs-root/etc/sysctl.d/10-magic-sysrq.conf new file mode 100644 index 0000000..d98a64d --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-magic-sysrq.conf @@ -0,0 +1,26 @@ +# The magic SysRq key enables certain keyboard combinations to be +# interpreted by the kernel to help with debugging. The kernel will respond +# to these keys regardless of the current running applications. +# +# In general, the magic SysRq key is not needed for the average Ubuntu +# system, and having it enabled by default can lead to security issues on +# the console such as being able to dump memory or to kill arbitrary +# processes including the running screen lock. +# +# Here is the list of possible values: +# 0 - disable sysrq completely +# 1 - enable all functions of sysrq +# >1 - enable certain functions by adding up the following values: +# 2 - enable control of console logging level +# 4 - enable control of keyboard (SAK, unraw) +# 8 - enable debugging dumps of processes etc. +# 16 - enable sync command +# 32 - enable remount read-only +# 64 - enable signalling of processes (term, kill, oom-kill) +# 128 - allow reboot/poweroff +# 256 - allow nicing of all RT tasks +# +# For example, to enable both control of console logging level and +# debugging dumps of processes: kernel.sysrq = 10 +# +kernel.sysrq = 176 diff --git a/squashfs-root/etc/sysctl.d/10-map-count.conf b/squashfs-root/etc/sysctl.d/10-map-count.conf new file mode 100644 index 0000000..9e9ab23 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-map-count.conf @@ -0,0 +1,3 @@ +# Increase the number of virtual memory areas that one process may request +# https://bugs.launchpad.net/ubuntu/+source/procps/+bug/2057792 +vm.max_map_count=1048576 diff --git a/squashfs-root/etc/sysctl.d/10-network-security.conf b/squashfs-root/etc/sysctl.d/10-network-security.conf new file mode 100644 index 0000000..dc18125 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-network-security.conf @@ -0,0 +1,6 @@ + +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks. +net.ipv4.conf.default.rp_filter=2 +net.ipv4.conf.all.rp_filter=2 + diff --git a/squashfs-root/etc/sysctl.d/10-ptrace.conf b/squashfs-root/etc/sysctl.d/10-ptrace.conf new file mode 100644 index 0000000..bb39c6b --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-ptrace.conf @@ -0,0 +1,22 @@ +# The PTRACE system is used for debugging. With it, a single user process +# can attach to any other dumpable process owned by the same user. In the +# case of malicious software, it is possible to use PTRACE to access +# credentials that exist in memory (re-using existing SSH connections, +# extracting GPG agent information, etc). +# +# A PTRACE scope of "0" is the more permissive mode. A scope of "1" limits +# PTRACE only to direct child processes (e.g. "gdb name-of-program" and +# "strace -f name-of-program" work, but gdb's "attach" and "strace -fp $PID" +# do not). The PTRACE scope is ignored when a user has CAP_SYS_PTRACE, so +# "sudo strace -fp $PID" will work as before. For more details see: +# https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace +# +# For applications launching crash handlers that need PTRACE, exceptions can +# be registered by the debugee by declaring in the segfault handler +# specifically which process will be using PTRACE on the debugee: +# prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0); +# +# In general, PTRACE is not needed for the average running Ubuntu system. +# To that end, the default is to set the PTRACE scope to "1". This value +# may not be appropriate for developers or servers with only admin accounts. +kernel.yama.ptrace_scope = 1 diff --git a/squashfs-root/etc/sysctl.d/10-zeropage.conf b/squashfs-root/etc/sysctl.d/10-zeropage.conf new file mode 100644 index 0000000..d2faee6 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/10-zeropage.conf @@ -0,0 +1,9 @@ +# Protect the zero page of memory from userspace mmap to prevent kernel +# NULL-dereference attacks against potential future kernel security +# vulnerabilities. (Added in kernel 2.6.23.) +# +# While this default is built into the Ubuntu kernel, there is no way to +# restore the kernel default if the value is changed during runtime; for +# example via package removal (e.g. wine, dosemu). Therefore, this value +# is reset to the secure default each time the sysctl values are loaded. +vm.mmap_min_addr = 65536 diff --git a/squashfs-root/etc/sysctl.d/99-sysctl.conf b/squashfs-root/etc/sysctl.d/99-sysctl.conf new file mode 120000 index 0000000..2b0036b --- /dev/null +++ b/squashfs-root/etc/sysctl.d/99-sysctl.conf @@ -0,0 +1 @@ +../sysctl.conf \ No newline at end of file diff --git a/squashfs-root/etc/sysctl.d/README.sysctl b/squashfs-root/etc/sysctl.d/README.sysctl new file mode 100644 index 0000000..2409081 --- /dev/null +++ b/squashfs-root/etc/sysctl.d/README.sysctl @@ -0,0 +1,16 @@ +Kernel system variables configuration files + +Files found under the /etc/sysctl.d directory that end with .conf are +parsed within sysctl(8) at boot time. If you want to set kernel variables +you can either edit /etc/sysctl.conf or make a new file. + +The filename isn't important, but don't make it a package name as it may clash +with something the package builder needs later. It must end with .conf though. + +My personal preference would be for local system settings to go into +/etc/sysctl.d/local.conf but as long as you follow the rules for the names +of the file, anything will work. See sysctl.conf(8) man page for details +of the format. + +After making any changes, please run "service procps force-reload" (or, from +a Debian package maintainer script "deb-systemd-invoke restart procps.service"). diff --git a/squashfs-root/etc/systemd/journald.conf b/squashfs-root/etc/systemd/journald.conf new file mode 100644 index 0000000..7b9e232 --- /dev/null +++ b/squashfs-root/etc/systemd/journald.conf @@ -0,0 +1,49 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/journald.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/journald.conf' to display the full config. +# +# See journald.conf(5) for details. + +[Journal] +#Storage=auto +#Compress=yes +#Seal=yes +#SplitMode=uid +#SyncIntervalSec=5m +#RateLimitIntervalSec=30s +#RateLimitBurst=10000 +#SystemMaxUse= +#SystemKeepFree= +#SystemMaxFileSize= +#SystemMaxFiles=100 +#RuntimeMaxUse= +#RuntimeKeepFree= +#RuntimeMaxFileSize= +#RuntimeMaxFiles=100 +#MaxRetentionSec= +#MaxFileSec=1month +#ForwardToSyslog=no +#ForwardToKMsg=no +#ForwardToConsole=no +#ForwardToWall=yes +#TTYPath=/dev/console +#MaxLevelStore=debug +#MaxLevelSyslog=debug +#MaxLevelKMsg=notice +#MaxLevelConsole=info +#MaxLevelWall=emerg +#LineMax=48K +#ReadKMsg=yes +#Audit=yes diff --git a/squashfs-root/etc/systemd/logind.conf b/squashfs-root/etc/systemd/logind.conf new file mode 100644 index 0000000..53d7563 --- /dev/null +++ b/squashfs-root/etc/systemd/logind.conf @@ -0,0 +1,51 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/logind.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config. +# +# See logind.conf(5) for details. + +[Login] +#NAutoVTs=6 +#ReserveVT=6 +#KillUserProcesses=no +#KillOnlyUsers= +#KillExcludeUsers=root +#InhibitDelayMaxSec=5 +#UserStopDelaySec=10 +#HandlePowerKey=poweroff +#HandlePowerKeyLongPress=ignore +#HandleRebootKey=reboot +#HandleRebootKeyLongPress=poweroff +#HandleSuspendKey=suspend +#HandleSuspendKeyLongPress=hibernate +#HandleHibernateKey=hibernate +#HandleHibernateKeyLongPress=ignore +#HandleLidSwitch=suspend +#HandleLidSwitchExternalPower=suspend +#HandleLidSwitchDocked=ignore +#PowerKeyIgnoreInhibited=no +#SuspendKeyIgnoreInhibited=no +#HibernateKeyIgnoreInhibited=no +#LidSwitchIgnoreInhibited=yes +#RebootKeyIgnoreInhibited=no +#HoldoffTimeoutSec=30s +#IdleAction=ignore +#IdleActionSec=30min +#RuntimeDirectorySize=10% +#RuntimeDirectoryInodesMax= +#RemoveIPC=yes +#InhibitorsMax=8192 +#SessionsMax=8192 +#StopIdleSessionSec=infinity diff --git a/squashfs-root/etc/systemd/networkd.conf b/squashfs-root/etc/systemd/networkd.conf new file mode 100644 index 0000000..e5a5e88 --- /dev/null +++ b/squashfs-root/etc/systemd/networkd.conf @@ -0,0 +1,33 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/networkd.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/networkd.conf' to display the full config. +# +# See networkd.conf(5) for details. + +[Network] +#SpeedMeter=no +#SpeedMeterIntervalSec=10sec +#ManageForeignRoutingPolicyRules=yes +#ManageForeignRoutes=yes +#RouteTable= +#IPv6PrivacyExtensions=no + +[DHCPv4] +#DUIDType=vendor +#DUIDRawData= + +[DHCPv6] +#DUIDType=vendor +#DUIDRawData= diff --git a/squashfs-root/etc/systemd/pstore.conf b/squashfs-root/etc/systemd/pstore.conf new file mode 100644 index 0000000..22b18b5 --- /dev/null +++ b/squashfs-root/etc/systemd/pstore.conf @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/pstore.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/pstore.conf' to display the full config. +# +# See pstore.conf(5) for details. + +[PStore] +#Storage=external +#Unlink=yes diff --git a/squashfs-root/etc/systemd/sleep.conf b/squashfs-root/etc/systemd/sleep.conf new file mode 100644 index 0000000..fad95b3 --- /dev/null +++ b/squashfs-root/etc/systemd/sleep.conf @@ -0,0 +1,27 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/sleep.conf.d/ directory. The latter is generally +# recommended. Defaults can be restored by simply deleting the main +# configuration file and all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/sleep.conf' to display the full config. +# +# See systemd-sleep.conf(5) for details. + +[Sleep] +#AllowSuspend=yes +#AllowHibernation=yes +#AllowSuspendThenHibernate=yes +#AllowHybridSleep=yes +#SuspendState=mem standby freeze +#HibernateMode=platform shutdown +#HibernateDelaySec= +#SuspendEstimationSec=60min diff --git a/squashfs-root/etc/systemd/system-generators/systemd-gpt-auto-generator b/squashfs-root/etc/systemd/system-generators/systemd-gpt-auto-generator new file mode 120000 index 0000000..b13eb42 --- /dev/null +++ b/squashfs-root/etc/systemd/system-generators/systemd-gpt-auto-generator @@ -0,0 +1 @@ +../../../dev/null \ No newline at end of file diff --git a/squashfs-root/etc/systemd/system.conf b/squashfs-root/etc/systemd/system.conf new file mode 100644 index 0000000..e9d4cd0 --- /dev/null +++ b/squashfs-root/etc/systemd/system.conf @@ -0,0 +1,83 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# /etc/systemd/system.conf.d/ directory. The latter is generally recommended. +# Defaults can be restored by simply deleting the main configuration file and +# all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/system.conf' to display the full config. +# +# See systemd-system.conf(5) for details. + +[Manager] +#LogLevel=info +#LogTarget=journal-or-kmsg +#LogColor=yes +#LogLocation=no +#LogTime=no +#DumpCore=yes +#ShowStatus=yes +#CrashChangeVT=no +#CrashShell=no +#CrashReboot=no +#CtrlAltDelBurstAction=reboot-force +#CPUAffinity= +#NUMAPolicy=default +#NUMAMask= +#RuntimeWatchdogSec=off +#RuntimeWatchdogPreSec=off +#RuntimeWatchdogPreGovernor= +#RebootWatchdogSec=10min +#KExecWatchdogSec=off +#WatchdogDevice= +#CapabilityBoundingSet= +#NoNewPrivileges=no +#SystemCallArchitectures= +#TimerSlackNSec= +#StatusUnitFormat=combined +#DefaultTimerAccuracySec=1min +#DefaultStandardOutput=journal +#DefaultStandardError=inherit +#DefaultTimeoutStartSec=90s +#DefaultTimeoutStopSec=90s +#DefaultTimeoutAbortSec= +#DefaultDeviceTimeoutSec=90s +#DefaultRestartSec=100ms +#DefaultStartLimitIntervalSec=10s +#DefaultStartLimitBurst=5 +#DefaultEnvironment= +#DefaultCPUAccounting=yes +#DefaultIOAccounting=no +#DefaultIPAccounting=no +#DefaultMemoryAccounting=yes +#DefaultTasksAccounting=yes +#DefaultTasksMax=15% +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +#DefaultLimitNOFILE=1024:524288 +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK=8M +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= +#DefaultMemoryPressureThresholdSec=200ms +#DefaultMemoryPressureWatch=auto +#DefaultOOMPolicy=stop +#DefaultSmackProcessLabel= +#ReloadLimitIntervalSec= +#ReloadLimitBurst= diff --git a/squashfs-root/etc/systemd/user.conf b/squashfs-root/etc/systemd/user.conf new file mode 100644 index 0000000..ae06e27 --- /dev/null +++ b/squashfs-root/etc/systemd/user.conf @@ -0,0 +1,59 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file (or a copy of it placed in +# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in +# the /etc/systemd/user.conf.d/ directory. The latter is generally recommended. +# Defaults can be restored by simply deleting the main configuration file and +# all drop-ins located in /etc/. +# +# Use 'systemd-analyze cat-config systemd/user.conf' to display the full config. +# +# See systemd-user.conf(5) for details. + +[Manager] +#LogLevel=info +#LogTarget=auto +#LogColor=yes +#LogLocation=no +#LogTime=no +#SystemCallArchitectures= +#TimerSlackNSec= +#StatusUnitFormat=combined +#DefaultTimerAccuracySec=1min +#DefaultStandardOutput=inherit +#DefaultStandardError=inherit +#DefaultTimeoutStartSec=90s +#DefaultTimeoutStopSec=90s +#DefaultTimeoutAbortSec= +#DefaultDeviceTimeoutSec=90s +#DefaultRestartSec=100ms +#DefaultStartLimitIntervalSec=10s +#DefaultStartLimitBurst=5 +#DefaultEnvironment= +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +#DefaultLimitNOFILE= +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK= +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= +#DefaultMemoryPressureThresholdSec=200ms +#DefaultMemoryPressureWatch=auto +#DefaultSmackProcessLabel= +#ReloadLimitIntervalSec= +#ReloadLimitBurst diff --git a/squashfs-root/etc/xdg/systemd/user b/squashfs-root/etc/xdg/systemd/user new file mode 120000 index 0000000..1c75bd3 --- /dev/null +++ b/squashfs-root/etc/xdg/systemd/user @@ -0,0 +1 @@ +../../systemd/user \ No newline at end of file diff --git a/squashfs-root/lib/x86_64-linux-gnu/libcryptsetup.so.12 b/squashfs-root/lib/x86_64-linux-gnu/libcryptsetup.so.12 new file mode 120000 index 0000000..0ac1ccd --- /dev/null +++ b/squashfs-root/lib/x86_64-linux-gnu/libcryptsetup.so.12 @@ -0,0 +1 @@ +libcryptsetup.so.12.10.0 \ No newline at end of file diff --git a/squashfs-root/lib/x86_64-linux-gnu/libcryptsetup.so.12.10.0 b/squashfs-root/lib/x86_64-linux-gnu/libcryptsetup.so.12.10.0 new file mode 100644 index 0000000..9d59a84 Binary files /dev/null and b/squashfs-root/lib/x86_64-linux-gnu/libcryptsetup.so.12.10.0 differ diff --git a/squashfs-root/lib/x86_64-linux-gnu/liblzo2.so.2 b/squashfs-root/lib/x86_64-linux-gnu/liblzo2.so.2 new file mode 120000 index 0000000..9966132 --- /dev/null +++ b/squashfs-root/lib/x86_64-linux-gnu/liblzo2.so.2 @@ -0,0 +1 @@ +liblzo2.so.2.0.0 \ No newline at end of file diff --git a/squashfs-root/lib/x86_64-linux-gnu/liblzo2.so.2.0.0 b/squashfs-root/lib/x86_64-linux-gnu/liblzo2.so.2.0.0 new file mode 100644 index 0000000..83f12e4 Binary files /dev/null and b/squashfs-root/lib/x86_64-linux-gnu/liblzo2.so.2.0.0 differ diff --git a/squashfs-root/lib/x86_64/libapprun_hooks.so b/squashfs-root/lib/x86_64/libapprun_hooks.so new file mode 100644 index 0000000..ef02180 Binary files /dev/null and b/squashfs-root/lib/x86_64/libapprun_hooks.so differ diff --git a/squashfs-root/runtime/compat/usr/bin/python3 b/squashfs-root/runtime/compat/usr/bin/python3 new file mode 120000 index 0000000..1ef1428 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/bin/python3 @@ -0,0 +1 @@ +../../../../usr/bin/python3 \ No newline at end of file diff --git a/squashfs-root/runtime/compat/usr/bin/python3.12 b/squashfs-root/runtime/compat/usr/bin/python3.12 new file mode 120000 index 0000000..2d95b4d --- /dev/null +++ b/squashfs-root/runtime/compat/usr/bin/python3.12 @@ -0,0 +1 @@ +../../../../usr/bin/python3.12 \ No newline at end of file diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ANSI_X3.110.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ANSI_X3.110.so new file mode 100644 index 0000000..1d05b36 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ANSI_X3.110.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ARMSCII-8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ARMSCII-8.so new file mode 100644 index 0000000..e09537d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ARMSCII-8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ASMO_449.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ASMO_449.so new file mode 100644 index 0000000..babb11e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ASMO_449.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BIG5.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BIG5.so new file mode 100644 index 0000000..46c9ddc Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BIG5.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BIG5HKSCS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BIG5HKSCS.so new file mode 100644 index 0000000..7e9e139 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BIG5HKSCS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BRF.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BRF.so new file mode 100644 index 0000000..1e76ddb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/BRF.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP10007.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP10007.so new file mode 100644 index 0000000..f637877 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP10007.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1125.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1125.so new file mode 100644 index 0000000..c8152e1 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1125.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1250.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1250.so new file mode 100644 index 0000000..40263a8 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1250.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1251.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1251.so new file mode 100644 index 0000000..635d0f8 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1251.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1252.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1252.so new file mode 100644 index 0000000..c00b8d4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1252.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1253.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1253.so new file mode 100644 index 0000000..a98bd86 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1253.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1254.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1254.so new file mode 100644 index 0000000..d74a6bf Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1254.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1255.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1255.so new file mode 100644 index 0000000..b7f21f0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1255.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1256.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1256.so new file mode 100644 index 0000000..d86b137 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1256.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1257.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1257.so new file mode 100644 index 0000000..31c62a7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1257.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1258.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1258.so new file mode 100644 index 0000000..25892d9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP1258.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP737.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP737.so new file mode 100644 index 0000000..d1ea570 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP737.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP770.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP770.so new file mode 100644 index 0000000..e861f89 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP770.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP771.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP771.so new file mode 100644 index 0000000..8cce3a9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP771.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP772.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP772.so new file mode 100644 index 0000000..c422ee9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP772.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP773.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP773.so new file mode 100644 index 0000000..dc8bc08 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP773.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP774.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP774.so new file mode 100644 index 0000000..a6865eb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP774.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP775.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP775.so new file mode 100644 index 0000000..07a9793 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP775.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP932.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP932.so new file mode 100644 index 0000000..9b3b94e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CP932.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CSN_369103.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CSN_369103.so new file mode 100644 index 0000000..8aa3489 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CSN_369103.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CWI.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CWI.so new file mode 100644 index 0000000..3855b73 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/CWI.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/DEC-MCS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/DEC-MCS.so new file mode 100644 index 0000000..8b01910 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/DEC-MCS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-AT-DE-A.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-AT-DE-A.so new file mode 100644 index 0000000..be97902 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-AT-DE-A.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-AT-DE.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-AT-DE.so new file mode 100644 index 0000000..df4625c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-AT-DE.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-CA-FR.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-CA-FR.so new file mode 100644 index 0000000..1d3817b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-CA-FR.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-DK-NO-A.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-DK-NO-A.so new file mode 100644 index 0000000..8c3be44 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-DK-NO-A.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-DK-NO.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-DK-NO.so new file mode 100644 index 0000000..5ab8002 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-DK-NO.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES-A.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES-A.so new file mode 100644 index 0000000..9390a82 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES-A.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES-S.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES-S.so new file mode 100644 index 0000000..76ec94f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES-S.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES.so new file mode 100644 index 0000000..dfaf16b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-ES.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FI-SE-A.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FI-SE-A.so new file mode 100644 index 0000000..a4a25a0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FI-SE-A.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FI-SE.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FI-SE.so new file mode 100644 index 0000000..012f591 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FI-SE.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FR.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FR.so new file mode 100644 index 0000000..cf4a1b2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-FR.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-IS-FRISS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-IS-FRISS.so new file mode 100644 index 0000000..e07f4e2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-IS-FRISS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-IT.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-IT.so new file mode 100644 index 0000000..3bf52ee Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-IT.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-PT.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-PT.so new file mode 100644 index 0000000..eb5310d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-PT.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-UK.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-UK.so new file mode 100644 index 0000000..078600e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-UK.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-US.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-US.so new file mode 100644 index 0000000..9a8fb65 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EBCDIC-US.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ECMA-CYRILLIC.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ECMA-CYRILLIC.so new file mode 100644 index 0000000..8651d8f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ECMA-CYRILLIC.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-CN.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-CN.so new file mode 100644 index 0000000..8349b16 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-CN.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JISX0213.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JISX0213.so new file mode 100644 index 0000000..fff1e2a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JISX0213.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JP-MS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JP-MS.so new file mode 100644 index 0000000..8c494e2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JP-MS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JP.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JP.so new file mode 100644 index 0000000..d461da8 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-JP.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-KR.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-KR.so new file mode 100644 index 0000000..3673802 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-KR.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-TW.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-TW.so new file mode 100644 index 0000000..6f15c98 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/EUC-TW.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GB18030.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GB18030.so new file mode 100644 index 0000000..3bf2d1f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GB18030.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBBIG5.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBBIG5.so new file mode 100644 index 0000000..aced28f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBBIG5.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBGBK.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBGBK.so new file mode 100644 index 0000000..337754a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBGBK.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBK.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBK.so new file mode 100644 index 0000000..cf4c3aa Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GBK.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GEORGIAN-ACADEMY.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GEORGIAN-ACADEMY.so new file mode 100644 index 0000000..4328cec Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GEORGIAN-ACADEMY.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GEORGIAN-PS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GEORGIAN-PS.so new file mode 100644 index 0000000..91aeb78 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GEORGIAN-PS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GOST_19768-74.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GOST_19768-74.so new file mode 100644 index 0000000..a9e62de Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GOST_19768-74.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK-CCITT.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK-CCITT.so new file mode 100644 index 0000000..095bddc Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK-CCITT.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK7-OLD.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK7-OLD.so new file mode 100644 index 0000000..d8f098e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK7-OLD.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK7.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK7.so new file mode 100644 index 0000000..6a48f14 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/GREEK7.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-GREEK8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-GREEK8.so new file mode 100644 index 0000000..f489cea Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-GREEK8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-ROMAN8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-ROMAN8.so new file mode 100644 index 0000000..a04738b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-ROMAN8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-ROMAN9.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-ROMAN9.so new file mode 100644 index 0000000..3e9b08d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-ROMAN9.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-THAI8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-THAI8.so new file mode 100644 index 0000000..9e71d13 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-THAI8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-TURKISH8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-TURKISH8.so new file mode 100644 index 0000000..53c7323 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/HP-TURKISH8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM037.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM037.so new file mode 100644 index 0000000..e323212 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM037.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM038.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM038.so new file mode 100644 index 0000000..1214087 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM038.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1004.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1004.so new file mode 100644 index 0000000..bc0ba71 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1004.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1008.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1008.so new file mode 100644 index 0000000..f7ff60c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1008.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1008_420.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1008_420.so new file mode 100644 index 0000000..a46c731 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1008_420.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1025.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1025.so new file mode 100644 index 0000000..6ed026c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1025.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1026.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1026.so new file mode 100644 index 0000000..5a5d11d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1026.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1046.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1046.so new file mode 100644 index 0000000..dec9e44 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1046.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1047.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1047.so new file mode 100644 index 0000000..af13f9d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1047.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1097.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1097.so new file mode 100644 index 0000000..56206f5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1097.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1112.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1112.so new file mode 100644 index 0000000..e8f16a0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1112.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1122.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1122.so new file mode 100644 index 0000000..247a7d2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1122.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1123.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1123.so new file mode 100644 index 0000000..56feeee Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1123.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1124.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1124.so new file mode 100644 index 0000000..01f8aa7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1124.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1129.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1129.so new file mode 100644 index 0000000..4d32c8a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1129.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1130.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1130.so new file mode 100644 index 0000000..49a655a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1130.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1132.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1132.so new file mode 100644 index 0000000..4d9f76a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1132.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1133.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1133.so new file mode 100644 index 0000000..87c02cb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1133.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1137.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1137.so new file mode 100644 index 0000000..2fb6cbb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1137.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1140.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1140.so new file mode 100644 index 0000000..3780c14 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1140.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1141.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1141.so new file mode 100644 index 0000000..c4b856b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1141.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1142.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1142.so new file mode 100644 index 0000000..8d14cb0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1142.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1143.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1143.so new file mode 100644 index 0000000..af262d9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1143.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1144.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1144.so new file mode 100644 index 0000000..87b343e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1144.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1145.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1145.so new file mode 100644 index 0000000..f0526f7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1145.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1146.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1146.so new file mode 100644 index 0000000..3982a00 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1146.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1147.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1147.so new file mode 100644 index 0000000..81d62ea Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1147.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1148.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1148.so new file mode 100644 index 0000000..d41af57 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1148.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1149.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1149.so new file mode 100644 index 0000000..2c404e4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1149.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1153.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1153.so new file mode 100644 index 0000000..6ccac7b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1153.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1154.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1154.so new file mode 100644 index 0000000..553b29a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1154.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1155.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1155.so new file mode 100644 index 0000000..d284b6e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1155.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1156.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1156.so new file mode 100644 index 0000000..54588f5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1156.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1157.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1157.so new file mode 100644 index 0000000..bf32f29 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1157.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1158.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1158.so new file mode 100644 index 0000000..d9bba1f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1158.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1160.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1160.so new file mode 100644 index 0000000..6cb4716 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1160.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1161.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1161.so new file mode 100644 index 0000000..bfe3539 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1161.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1162.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1162.so new file mode 100644 index 0000000..c4c46b6 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1162.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1163.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1163.so new file mode 100644 index 0000000..e01f848 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1163.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1164.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1164.so new file mode 100644 index 0000000..3cfcd89 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1164.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1166.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1166.so new file mode 100644 index 0000000..94385b8 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1166.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1167.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1167.so new file mode 100644 index 0000000..1a79db1 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1167.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM12712.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM12712.so new file mode 100644 index 0000000..7bf6911 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM12712.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1364.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1364.so new file mode 100644 index 0000000..21ffd53 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1364.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1371.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1371.so new file mode 100644 index 0000000..d60bb3d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1371.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1388.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1388.so new file mode 100644 index 0000000..8b96fda Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1388.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1390.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1390.so new file mode 100644 index 0000000..7cb0cef Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1390.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1399.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1399.so new file mode 100644 index 0000000..d6caa89 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM1399.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM16804.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM16804.so new file mode 100644 index 0000000..c85b4a4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM16804.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM256.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM256.so new file mode 100644 index 0000000..fbc2e75 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM256.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM273.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM273.so new file mode 100644 index 0000000..4bb173c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM273.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM274.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM274.so new file mode 100644 index 0000000..c9420d2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM274.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM275.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM275.so new file mode 100644 index 0000000..3dae7ab Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM275.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM277.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM277.so new file mode 100644 index 0000000..9939e18 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM277.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM278.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM278.so new file mode 100644 index 0000000..e0bfd96 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM278.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM280.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM280.so new file mode 100644 index 0000000..2064797 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM280.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM281.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM281.so new file mode 100644 index 0000000..4a28601 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM281.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM284.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM284.so new file mode 100644 index 0000000..9c5635d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM284.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM285.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM285.so new file mode 100644 index 0000000..2fafdde Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM285.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM290.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM290.so new file mode 100644 index 0000000..3556b83 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM290.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM297.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM297.so new file mode 100644 index 0000000..0057fc2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM297.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM420.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM420.so new file mode 100644 index 0000000..e87befb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM420.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM423.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM423.so new file mode 100644 index 0000000..a94c1b4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM423.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM424.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM424.so new file mode 100644 index 0000000..bc25e78 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM424.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM437.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM437.so new file mode 100644 index 0000000..4cb2013 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM437.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4517.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4517.so new file mode 100644 index 0000000..bd7042b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4517.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4899.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4899.so new file mode 100644 index 0000000..a65ef17 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4899.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4909.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4909.so new file mode 100644 index 0000000..b7c4a77 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4909.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4971.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4971.so new file mode 100644 index 0000000..434aa11 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM4971.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM500.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM500.so new file mode 100644 index 0000000..3d83a26 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM500.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM5347.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM5347.so new file mode 100644 index 0000000..ec5b5a6 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM5347.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM803.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM803.so new file mode 100644 index 0000000..a7c7db0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM803.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM850.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM850.so new file mode 100644 index 0000000..1686350 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM850.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM851.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM851.so new file mode 100644 index 0000000..526784f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM851.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM852.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM852.so new file mode 100644 index 0000000..33dc7ee Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM852.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM855.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM855.so new file mode 100644 index 0000000..d40e957 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM855.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM856.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM856.so new file mode 100644 index 0000000..b301431 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM856.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM857.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM857.so new file mode 100644 index 0000000..c5847ce Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM857.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM858.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM858.so new file mode 100644 index 0000000..91d92fd Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM858.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM860.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM860.so new file mode 100644 index 0000000..3be5982 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM860.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM861.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM861.so new file mode 100644 index 0000000..812b4ce Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM861.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM862.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM862.so new file mode 100644 index 0000000..32760d4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM862.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM863.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM863.so new file mode 100644 index 0000000..9513b81 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM863.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM864.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM864.so new file mode 100644 index 0000000..faeffac Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM864.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM865.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM865.so new file mode 100644 index 0000000..d9f793b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM865.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM866.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM866.so new file mode 100644 index 0000000..d04e6d7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM866.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM866NAV.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM866NAV.so new file mode 100644 index 0000000..2fc8df6 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM866NAV.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM868.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM868.so new file mode 100644 index 0000000..b6e7d6f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM868.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM869.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM869.so new file mode 100644 index 0000000..04a8ed3 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM869.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM870.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM870.so new file mode 100644 index 0000000..f167822 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM870.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM871.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM871.so new file mode 100644 index 0000000..60b59db Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM871.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM874.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM874.so new file mode 100644 index 0000000..f2944e7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM874.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM875.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM875.so new file mode 100644 index 0000000..d397cb5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM875.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM880.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM880.so new file mode 100644 index 0000000..6c5cb07 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM880.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM891.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM891.so new file mode 100644 index 0000000..f81f96f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM891.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM901.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM901.so new file mode 100644 index 0000000..f1aa6e6 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM901.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM902.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM902.so new file mode 100644 index 0000000..2a4b674 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM902.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM903.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM903.so new file mode 100644 index 0000000..7e804dc Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM903.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9030.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9030.so new file mode 100644 index 0000000..dbd9ff5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9030.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM904.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM904.so new file mode 100644 index 0000000..a26601b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM904.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM905.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM905.so new file mode 100644 index 0000000..735e515 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM905.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9066.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9066.so new file mode 100644 index 0000000..d08e8c1 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9066.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM918.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM918.so new file mode 100644 index 0000000..07eb726 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM918.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM921.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM921.so new file mode 100644 index 0000000..e009c7f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM921.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM922.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM922.so new file mode 100644 index 0000000..dd3869d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM922.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM930.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM930.so new file mode 100644 index 0000000..9a4705e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM930.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM932.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM932.so new file mode 100644 index 0000000..9f15382 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM932.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM933.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM933.so new file mode 100644 index 0000000..aac21f2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM933.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM935.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM935.so new file mode 100644 index 0000000..35e6011 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM935.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM937.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM937.so new file mode 100644 index 0000000..073bca5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM937.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM939.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM939.so new file mode 100644 index 0000000..42e407a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM939.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM943.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM943.so new file mode 100644 index 0000000..1f967b9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM943.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9448.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9448.so new file mode 100644 index 0000000..6a441c1 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IBM9448.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IEC_P27-1.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IEC_P27-1.so new file mode 100644 index 0000000..0699031 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/IEC_P27-1.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS-8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS-8.so new file mode 100644 index 0000000..5dce855 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS-8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS-CYRILLIC.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS-CYRILLIC.so new file mode 100644 index 0000000..d332be6 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS-CYRILLIC.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS.so new file mode 100644 index 0000000..8028e67 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/INIS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISIRI-3342.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISIRI-3342.so new file mode 100644 index 0000000..ee1c0f1 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISIRI-3342.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-CN-EXT.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-CN-EXT.so new file mode 100644 index 0000000..dcbb3b7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-CN-EXT.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-CN.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-CN.so new file mode 100644 index 0000000..d70fee3 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-CN.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-JP-3.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-JP-3.so new file mode 100644 index 0000000..a41f499 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-JP-3.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-JP.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-JP.so new file mode 100644 index 0000000..c041806 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-JP.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-KR.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-KR.so new file mode 100644 index 0000000..125e567 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-2022-KR.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-IR-197.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-IR-197.so new file mode 100644 index 0000000..fd7835c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-IR-197.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-IR-209.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-IR-209.so new file mode 100644 index 0000000..cc6aac6 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO-IR-209.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO646.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO646.so new file mode 100644 index 0000000..0012c88 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO646.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so new file mode 100644 index 0000000..540c319 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-10.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-10.so new file mode 100644 index 0000000..ae8bd9e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-10.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-11.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-11.so new file mode 100644 index 0000000..7ebdb2d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-11.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-13.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-13.so new file mode 100644 index 0000000..c46d057 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-13.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-14.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-14.so new file mode 100644 index 0000000..245c939 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-14.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-15.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-15.so new file mode 100644 index 0000000..545cb6c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-15.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-16.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-16.so new file mode 100644 index 0000000..d338592 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-16.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-2.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-2.so new file mode 100644 index 0000000..0e31272 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-2.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-3.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-3.so new file mode 100644 index 0000000..50b8057 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-3.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-4.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-4.so new file mode 100644 index 0000000..6210e91 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-4.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-5.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-5.so new file mode 100644 index 0000000..ee32ada Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-5.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-6.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-6.so new file mode 100644 index 0000000..4f98c35 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-6.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-7.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-7.so new file mode 100644 index 0000000..78aaf76 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-7.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-8.so new file mode 100644 index 0000000..c50d172 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-9.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-9.so new file mode 100644 index 0000000..b590795 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-9.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-9E.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-9E.so new file mode 100644 index 0000000..79e998f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO8859-9E.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_10367-BOX.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_10367-BOX.so new file mode 100644 index 0000000..f8f2456 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_10367-BOX.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_11548-1.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_11548-1.so new file mode 100644 index 0000000..c28300b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_11548-1.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_2033.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_2033.so new file mode 100644 index 0000000..3e80f20 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_2033.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5427-EXT.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5427-EXT.so new file mode 100644 index 0000000..b7836be Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5427-EXT.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5427.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5427.so new file mode 100644 index 0000000..1469e6e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5427.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5428.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5428.so new file mode 100644 index 0000000..96ae245 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_5428.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_6937-2.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_6937-2.so new file mode 100644 index 0000000..81facb8 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_6937-2.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_6937.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_6937.so new file mode 100644 index 0000000..a71d040 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/ISO_6937.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/JOHAB.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/JOHAB.so new file mode 100644 index 0000000..f601b35 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/JOHAB.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI-8.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI-8.so new file mode 100644 index 0000000..d5171ed Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI-8.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-R.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-R.so new file mode 100644 index 0000000..cfcf5c1 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-R.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-RU.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-RU.so new file mode 100644 index 0000000..38e4333 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-RU.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-T.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-T.so new file mode 100644 index 0000000..a65bd90 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-T.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-U.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-U.so new file mode 100644 index 0000000..594d87c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/KOI8-U.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/LATIN-GREEK-1.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/LATIN-GREEK-1.so new file mode 100644 index 0000000..1d5097a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/LATIN-GREEK-1.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/LATIN-GREEK.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/LATIN-GREEK.so new file mode 100644 index 0000000..8b182cb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/LATIN-GREEK.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-CENTRALEUROPE.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-CENTRALEUROPE.so new file mode 100644 index 0000000..c14712a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-CENTRALEUROPE.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-IS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-IS.so new file mode 100644 index 0000000..ab86bf2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-IS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-SAMI.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-SAMI.so new file mode 100644 index 0000000..a4187b0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-SAMI.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-UK.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-UK.so new file mode 100644 index 0000000..68ef18b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MAC-UK.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MACINTOSH.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MACINTOSH.so new file mode 100644 index 0000000..1bb914a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MACINTOSH.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MIK.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MIK.so new file mode 100644 index 0000000..1ecf7a2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/MIK.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/NATS-DANO.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/NATS-DANO.so new file mode 100644 index 0000000..0143aa2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/NATS-DANO.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/NATS-SEFI.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/NATS-SEFI.so new file mode 100644 index 0000000..296ed63 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/NATS-SEFI.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/PT154.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/PT154.so new file mode 100644 index 0000000..c284f7d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/PT154.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/RK1048.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/RK1048.so new file mode 100644 index 0000000..84ade60 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/RK1048.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SAMI-WS2.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SAMI-WS2.so new file mode 100644 index 0000000..beb7988 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SAMI-WS2.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SHIFT_JISX0213.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SHIFT_JISX0213.so new file mode 100644 index 0000000..2489774 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SHIFT_JISX0213.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SJIS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SJIS.so new file mode 100644 index 0000000..4bbdb50 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/SJIS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/T.61.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/T.61.so new file mode 100644 index 0000000..308eed0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/T.61.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TCVN5712-1.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TCVN5712-1.so new file mode 100644 index 0000000..e67ba7d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TCVN5712-1.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TIS-620.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TIS-620.so new file mode 100644 index 0000000..82aaf4f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TIS-620.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TSCII.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TSCII.so new file mode 100644 index 0000000..7138e42 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/TSCII.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UHC.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UHC.so new file mode 100644 index 0000000..213dd0d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UHC.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UNICODE.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UNICODE.so new file mode 100644 index 0000000..8741550 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UNICODE.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so new file mode 100644 index 0000000..85bad38 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-32.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-32.so new file mode 100644 index 0000000..59d2d9f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-32.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-7.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-7.so new file mode 100644 index 0000000..a0b292a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/UTF-7.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/VISCII.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/VISCII.so new file mode 100644 index 0000000..4965f19 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/VISCII.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules new file mode 100644 index 0000000..62775bf --- /dev/null +++ b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules @@ -0,0 +1,119 @@ +# GNU libc iconv configuration. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. +# This file is part of the GNU C Library. + +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +# All lines contain the following information: + +# If the lines start with `module' +# fromset: either a name triple or a regular expression triple. +# toset: a name triple or an expression with \N to get regular +# expression matching results. +# filename: filename of the module implementing the transformation. +# If it is not absolute the path is made absolute by prepending +# the directory the configuration file is found in. +# cost: optional cost of the transformation. Default is 1. + +# If the lines start with `alias' +# alias: alias name which is not really recognized. +# name: the real name of the character set + +# from to module cost +alias ISO-IR-100// ISO-8859-1// +alias ISO_8859-1:1987// ISO-8859-1// +alias ISO_8859-1// ISO-8859-1// +alias ISO8859-1// ISO-8859-1// +alias ISO88591// ISO-8859-1// +alias LATIN1// ISO-8859-1// +alias L1// ISO-8859-1// +alias IBM819// ISO-8859-1// +alias CP819// ISO-8859-1// +alias CSISOLATIN1// ISO-8859-1// +alias 8859_1// ISO-8859-1// +alias OSF00010001// ISO-8859-1// +module ISO-8859-1// INTERNAL ISO8859-1 1 +module INTERNAL ISO-8859-1// ISO8859-1 1 + +# from to module cost +alias ISO8859-15// ISO-8859-15// +alias ISO885915// ISO-8859-15// +alias ISO-IR-203// ISO-8859-15// +alias ISO_8859-15// ISO-8859-15// +alias LATIN-9// ISO-8859-15// +alias LATIN9// ISO-8859-15// +alias ISO_8859-15:1998// ISO-8859-15// +module ISO-8859-15// INTERNAL ISO8859-15 1 +module INTERNAL ISO-8859-15// ISO8859-15 1 + +# from to module cost +alias MS-ANSI// CP1252// +alias WINDOWS-1252// CP1252// +module CP1252// INTERNAL CP1252 1 +module INTERNAL CP1252// CP1252 1 + +# from to module cost +alias ANSI_X3.110-1983// ANSI_X3.110// +alias ISO-IR-99// ANSI_X3.110// +alias CSA_T500-1983// ANSI_X3.110// +alias CSA_T500// ANSI_X3.110// +alias NAPLPS// ANSI_X3.110// +alias CSISO99NAPLPS// ANSI_X3.110// +module ANSI_X3.110// INTERNAL ANSI_X3.110 1 +module INTERNAL ANSI_X3.110// ANSI_X3.110 1 + +# from to module cost +alias UTF16// UTF-16// +module UTF-16// INTERNAL UTF-16 1 +module INTERNAL UTF-16// UTF-16 1 + +# from to module cost +alias UTF16LE// UTF-16LE// +module UTF-16LE// INTERNAL UTF-16 1 +module INTERNAL UTF-16LE// UTF-16 1 + +# from to module cost +alias UTF16BE// UTF-16BE// +module UTF-16BE// INTERNAL UTF-16 1 +module INTERNAL UTF-16BE// UTF-16 1 + +# from to module cost +alias CSUNICODE// UNICODE// +module UNICODE// INTERNAL UNICODE 1 +module INTERNAL UNICODE// UNICODE 1 + +# from to module cost +alias UTF32// UTF-32// +module UTF-32// INTERNAL UTF-32 1 +module INTERNAL UTF-32// UTF-32 1 + +# from to module cost +alias UTF32LE// UTF-32LE// +module UTF-32LE// INTERNAL UTF-32 1 +module INTERNAL UTF-32LE// UTF-32 1 + +# from to module cost +alias UTF32BE// UTF-32BE// +module UTF-32BE// INTERNAL UTF-32 1 +module INTERNAL UTF-32BE// UTF-32 1 + +# from to module cost +alias UTF7// UTF-7// +module UTF-7// INTERNAL UTF-7 1 +module INTERNAL UTF-7// UTF-7 1 + +# from to module cost +module UTF-7-IMAP// INTERNAL UTF-7 1 +module INTERNAL UTF-7-IMAP// UTF-7 1 diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache new file mode 100644 index 0000000..ea171b5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.d/gconv-modules-extra.conf b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.d/gconv-modules-extra.conf new file mode 100644 index 0000000..9f9c835 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.d/gconv-modules-extra.conf @@ -0,0 +1,1889 @@ +# GNU libc iconv configuration. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. +# This file is part of the GNU C Library. + +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +# All lines contain the following information: + +# If the lines start with `module' +# fromset: either a name triple or a regular expression triple. +# toset: a name triple or an expression with \N to get regular +# expression matching results. +# filename: filename of the module implementing the transformation. +# If it is not absolute the path is made absolute by prepending +# the directory the configuration file is found in. +# cost: optional cost of the transformation. Default is 1. + +# If the lines start with `alias' +# alias: alias name which is not really recognized. +# name: the real name of the character set + +alias ISO-IR-4// BS_4730// +alias ISO646-GB// BS_4730// +alias GB// BS_4730// +alias UK// BS_4730// +alias CSISO4UNITEDKINGDOM// BS_4730// +module BS_4730// INTERNAL ISO646 2 +module INTERNAL BS_4730// ISO646 2 + +alias ISO-IR-121// CSA_Z243.4-1985-1// +alias ISO646-CA// CSA_Z243.4-1985-1// +alias CSA7-1// CSA_Z243.4-1985-1// +alias CA// CSA_Z243.4-1985-1// +alias CSISO121CANADIAN1// CSA_Z243.4-1985-1// +alias CSA_Z243.419851// CSA_Z243.4-1985-1// +module CSA_Z243.4-1985-1// INTERNAL ISO646 2 +module INTERNAL CSA_Z243.4-1985-1// ISO646 2 + +alias ISO-IR-122// CSA_Z243.4-1985-2// +alias ISO646-CA2// CSA_Z243.4-1985-2// +alias CSA7-2// CSA_Z243.4-1985-2// +alias CSISO122CANADIAN2// CSA_Z243.4-1985-2// +alias CSA_Z243.419852// CSA_Z243.4-1985-2// +module CSA_Z243.4-1985-2// INTERNAL ISO646 2 +module INTERNAL CSA_Z243.4-1985-2// ISO646 2 + +alias ISO-IR-21// DIN_66003// +alias DE// DIN_66003// +alias ISO646-DE// DIN_66003// +alias CSISO21GERMAN// DIN_66003// +module DIN_66003// INTERNAL ISO646 2 +module INTERNAL DIN_66003// ISO646 2 + +alias DS2089// DS_2089// +alias ISO646-DK// DS_2089// +alias DK// DS_2089// +alias CSISO646DANISH// DS_2089// +module DS_2089// INTERNAL ISO646 2 +module INTERNAL DS_2089// ISO646 2 + +alias ISO-IR-17// ES// +alias ISO646-ES// ES// +alias CSISO17SPANISH// ES// +module ES// INTERNAL ISO646 2 +module INTERNAL ES// ISO646 2 + +alias ISO-IR-85// ES2// +alias ISO646-ES2// ES2// +alias CSISO85SPANISH2// ES2// +module ES2// INTERNAL ISO646 2 +module INTERNAL ES2// ISO646 2 + +alias ISO-IR-57// GB_1988-80// +alias CN// GB_1988-80// +alias ISO646-CN// GB_1988-80// +alias CSISO58GB1988// GB_1988-80// +alias GB_198880// GB_1988-80// +module GB_1988-80// INTERNAL ISO646 2 +module INTERNAL GB_1988-80// ISO646 2 + +alias ISO-IR-15// IT// +alias ISO646-IT// IT// +alias CSISO15ITALIAN// IT// +module IT// INTERNAL ISO646 2 +module INTERNAL IT// ISO646 2 + +alias ISO-IR-14// JIS_C6220-1969-RO// +alias JP// JIS_C6220-1969-RO// +alias ISO646-JP// JIS_C6220-1969-RO// +alias CSISO14JISC6220RO// JIS_C6220-1969-RO// +alias JIS_C62201969RO// JIS_C6220-1969-RO// +module JIS_C6220-1969-RO// INTERNAL ISO646 2 +module INTERNAL JIS_C6220-1969-RO// ISO646 2 + +alias ISO-IR-92// JIS_C6229-1984-B// +alias ISO646-JP-OCR-B// JIS_C6229-1984-B// +alias JP-OCR-B// JIS_C6229-1984-B// +alias CSISO92JISC62991984B// JIS_C6229-1984-B// +alias JIS_C62291984B// JIS_C6229-1984-B// +module JIS_C6229-1984-B// INTERNAL ISO646 2 +module INTERNAL JIS_C6229-1984-B// ISO646 2 + +alias ISO-IR-141// JUS_I.B1.002// +alias ISO646-YU// JUS_I.B1.002// +alias JS// JUS_I.B1.002// +alias YU// JUS_I.B1.002// +alias CSISO141JUSIB1002// JUS_I.B1.002// +module JUS_I.B1.002// INTERNAL ISO646 2 +module INTERNAL JUS_I.B1.002// ISO646 2 + +alias ISO646-KR// KSC5636// +alias CSKSC5636// KSC5636// +module KSC5636// INTERNAL ISO646 2 +module INTERNAL KSC5636// ISO646 2 + +alias ISO-IR-86// MSZ_7795.3// +alias ISO646-HU// MSZ_7795.3// +alias HU// MSZ_7795.3// +alias CSISO86HUNGARIAN// MSZ_7795.3// +module MSZ_7795.3// INTERNAL ISO646 2 +module INTERNAL MSZ_7795.3// ISO646 2 + +alias CUBA// NC_NC00-10// +alias NC_NC00-10:81// NC_NC00-10// +alias ISO-IR-151// NC_NC00-10// +alias ISO646-CU// NC_NC00-10// +alias CSISO151CUBA// NC_NC00-10// +alias NC_NC0010// NC_NC00-10// +module NC_NC00-10// INTERNAL ISO646 2 +module INTERNAL NC_NC00-10// ISO646 2 + +alias ISO-IR-69// NF_Z_62-010// +alias ISO646-FR// NF_Z_62-010// +alias FR// NF_Z_62-010// +alias CSISO69FRENCH// NF_Z_62-010// +alias NF_Z_62010// NF_Z_62-010// +module NF_Z_62-010// INTERNAL ISO646 2 +module INTERNAL NF_Z_62-010// ISO646 2 + +alias ISO-IR-25// NF_Z_62-010_1973// +alias ISO646-FR1// NF_Z_62-010_1973// +alias NF_Z_62-010_(1973)// NF_Z_62-010_1973// +alias CSISO25FRENCH// NF_Z_62-010_1973// +alias NF_Z_62010_1973// NF_Z_62-010_1973// +module NF_Z_62-010_1973// INTERNAL ISO646 2 +module INTERNAL NF_Z_62-010_1973// ISO646 2 + +alias ISO-IR-60// NS_4551-1// +alias ISO646-NO// NS_4551-1// +alias NO// NS_4551-1// +alias CSISO60DANISHNORWEGIAN// NS_4551-1// +alias CSISO60NORWEGIAN1// NS_4551-1// +alias NS_45511// NS_4551-1// +module NS_4551-1// INTERNAL ISO646 2 +module INTERNAL NS_4551-1// ISO646 2 + +alias ISO646-NO2// NS_4551-2// +alias ISO-IR-61// NS_4551-2// +alias NO2// NS_4551-2// +alias CSISO61NORWEGIAN2// NS_4551-2// +alias NS_45512// NS_4551-2// +module NS_4551-2// INTERNAL ISO646 2 +module INTERNAL NS_4551-2// ISO646 2 + +alias ISO-IR-16// PT// +alias ISO646-PT// PT// +alias CSISO16PORTUGESE// PT// +module PT// INTERNAL ISO646 2 +module INTERNAL PT// ISO646 2 + +alias ISO-IR-84// PT2// +alias ISO646-PT2// PT2// +alias CSISO84PORTUGUESE2// PT2// +module PT2// INTERNAL ISO646 2 +module INTERNAL PT2// ISO646 2 + +alias ISO-IR-10// SEN_850200_B// +alias FI// SEN_850200_B// +alias ISO646-FI// SEN_850200_B// +alias ISO646-SE// SEN_850200_B// +alias SE// SEN_850200_B// +alias CSISO10SWEDISH// SEN_850200_B// +alias SS636127// SEN_850200_B// +module SEN_850200_B// INTERNAL ISO646 2 +module INTERNAL SEN_850200_B// ISO646 2 + +alias ISO-IR-11// SEN_850200_C// +alias ISO646-SE2// SEN_850200_C// +alias SE2// SEN_850200_C// +alias CSISO11SWEDISHFORNAMES// SEN_850200_C// +module SEN_850200_C// INTERNAL ISO646 2 +module INTERNAL SEN_850200_C// ISO646 2 + +# from to module cost +alias ISO-IR-101// ISO-8859-2// +alias ISO_8859-2:1987// ISO-8859-2// +alias ISO_8859-2// ISO-8859-2// +alias ISO8859-2// ISO-8859-2// +alias ISO88592// ISO-8859-2// +alias LATIN2// ISO-8859-2// +alias L2// ISO-8859-2// +alias CSISOLATIN2// ISO-8859-2// +alias 8859_2// ISO-8859-2// +alias OSF00010002// ISO-8859-2// +alias IBM912// ISO-8859-2// +alias CP912// ISO-8859-2// +module ISO-8859-2// INTERNAL ISO8859-2 1 +module INTERNAL ISO-8859-2// ISO8859-2 1 + +# from to module cost +alias ISO-IR-109// ISO-8859-3// +alias ISO_8859-3:1988// ISO-8859-3// +alias ISO_8859-3// ISO-8859-3// +alias ISO8859-3// ISO-8859-3// +alias ISO88593// ISO-8859-3// +alias LATIN3// ISO-8859-3// +alias L3// ISO-8859-3// +alias CSISOLATIN3// ISO-8859-3// +alias 8859_3// ISO-8859-3// +alias OSF00010003// ISO-8859-3// +module ISO-8859-3// INTERNAL ISO8859-3 1 +module INTERNAL ISO-8859-3// ISO8859-3 1 + +# from to module cost +alias ISO-IR-110// ISO-8859-4// +alias ISO_8859-4:1988// ISO-8859-4// +alias ISO_8859-4// ISO-8859-4// +alias ISO8859-4// ISO-8859-4// +alias ISO88594// ISO-8859-4// +alias LATIN4// ISO-8859-4// +alias L4// ISO-8859-4// +alias CSISOLATIN4// ISO-8859-4// +alias 8859_4// ISO-8859-4// +alias OSF00010004// ISO-8859-4// +module ISO-8859-4// INTERNAL ISO8859-4 1 +module INTERNAL ISO-8859-4// ISO8859-4 1 + +# from to module cost +alias ISO-IR-144// ISO-8859-5// +alias ISO_8859-5:1988// ISO-8859-5// +alias ISO_8859-5// ISO-8859-5// +alias ISO8859-5// ISO-8859-5// +alias ISO88595// ISO-8859-5// +alias CYRILLIC// ISO-8859-5// +alias CSISOLATINCYRILLIC// ISO-8859-5// +alias 8859_5// ISO-8859-5// +alias OSF00010005// ISO-8859-5// +alias IBM915// ISO-8859-5// +alias CP915// ISO-8859-5// +module ISO-8859-5// INTERNAL ISO8859-5 1 +module INTERNAL ISO-8859-5// ISO8859-5 1 + +# from to module cost +alias ISO-IR-127// ISO-8859-6// +alias ISO_8859-6:1987// ISO-8859-6// +alias ISO_8859-6// ISO-8859-6// +alias ISO8859-6// ISO-8859-6// +alias ISO88596// ISO-8859-6// +alias ECMA-114// ISO-8859-6// +alias ASMO-708// ISO-8859-6// +alias ARABIC// ISO-8859-6// +alias CSISOLATINARABIC// ISO-8859-6// +alias 8859_6// ISO-8859-6// +alias OSF00010006// ISO-8859-6// +alias IBM1089// ISO-8859-6// +alias CP1089// ISO-8859-6// +module ISO-8859-6// INTERNAL ISO8859-6 1 +module INTERNAL ISO-8859-6// ISO8859-6 1 + +# from to module cost +alias ISO-IR-126// ISO-8859-7// +alias ISO_8859-7:2003// ISO-8859-7// +alias ISO_8859-7:1987// ISO-8859-7// +alias ISO_8859-7// ISO-8859-7// +alias ISO8859-7// ISO-8859-7// +alias ISO88597// ISO-8859-7// +alias ELOT_928// ISO-8859-7// +alias ECMA-118// ISO-8859-7// +alias GREEK// ISO-8859-7// +alias GREEK8// ISO-8859-7// +alias CSISOLATINGREEK// ISO-8859-7// +alias 8859_7// ISO-8859-7// +alias OSF00010007// ISO-8859-7// +alias IBM813// ISO-8859-7// +alias CP813// ISO-8859-7// +module ISO-8859-7// INTERNAL ISO8859-7 1 +module INTERNAL ISO-8859-7// ISO8859-7 1 + +# from to module cost +alias ISO-IR-138// ISO-8859-8// +alias ISO_8859-8:1988// ISO-8859-8// +alias ISO_8859-8// ISO-8859-8// +alias ISO8859-8// ISO-8859-8// +alias ISO88598// ISO-8859-8// +alias HEBREW// ISO-8859-8// +alias CSISOLATINHEBREW// ISO-8859-8// +alias 8859_8// ISO-8859-8// +alias OSF00010008// ISO-8859-8// +alias IBM916// ISO-8859-8// +alias CP916// ISO-8859-8// +module ISO-8859-8// INTERNAL ISO8859-8 1 +module INTERNAL ISO-8859-8// ISO8859-8 1 + +# from to module cost +alias ISO-IR-148// ISO-8859-9// +alias ISO_8859-9:1989// ISO-8859-9// +alias ISO_8859-9// ISO-8859-9// +alias ISO8859-9// ISO-8859-9// +alias ISO88599// ISO-8859-9// +alias LATIN5// ISO-8859-9// +alias L5// ISO-8859-9// +alias CSISOLATIN5// ISO-8859-9// +alias 8859_9// ISO-8859-9// +alias OSF00010009// ISO-8859-9// +alias IBM920// ISO-8859-9// +alias CP920// ISO-8859-9// +alias TS-5881// ISO-8859-9// +alias ECMA-128// ISO-8859-9// +module ISO-8859-9// INTERNAL ISO8859-9 1 +module INTERNAL ISO-8859-9// ISO8859-9 1 + +# from to module cost +alias ISO-IR-157// ISO-8859-10// +alias ISO_8859-10:1992// ISO-8859-10// +alias ISO_8859-10// ISO-8859-10// +alias ISO8859-10// ISO-8859-10// +alias ISO885910// ISO-8859-10// +alias LATIN6// ISO-8859-10// +alias L6// ISO-8859-10// +alias CSISOLATIN6// ISO-8859-10// +alias OSF0001000A// ISO-8859-10// +module ISO-8859-10// INTERNAL ISO8859-10 1 +module INTERNAL ISO-8859-10// ISO8859-10 1 + +# from to module cost +alias ISO8859-11// ISO-8859-11// +alias ISO885911// ISO-8859-11// +module ISO-8859-11// INTERNAL ISO8859-11 1 +module INTERNAL ISO-8859-11// ISO8859-11 1 + +# from to module cost +alias ISO8859-13// ISO-8859-13// +alias ISO885913// ISO-8859-13// +alias ISO-IR-179// ISO-8859-13// +alias LATIN7// ISO-8859-13// +alias L7// ISO-8859-13// +alias BALTIC// ISO-8859-13// +module ISO-8859-13// INTERNAL ISO8859-13 1 +module INTERNAL ISO-8859-13// ISO8859-13 1 + +# from to module cost +alias ISO8859-14// ISO-8859-14// +alias ISO885914// ISO-8859-14// +alias ISO-IR-199// ISO-8859-14// +alias LATIN8// ISO-8859-14// +alias L8// ISO-8859-14// +alias ISO_8859-14:1998// ISO-8859-14// +alias ISO_8859-14// ISO-8859-14// +alias ISO-CELTIC// ISO-8859-14// +module ISO-8859-14// INTERNAL ISO8859-14 1 +module INTERNAL ISO-8859-14// ISO8859-14 1 + +# from to module cost +alias ISO8859-16// ISO-8859-16// +alias ISO885916// ISO-8859-16// +alias ISO-IR-226// ISO-8859-16// +alias LATIN10// ISO-8859-16// +alias L10// ISO-8859-16// +alias ISO_8859-16:2001// ISO-8859-16// +alias ISO_8859-16// ISO-8859-16// +module ISO-8859-16// INTERNAL ISO8859-16 1 +module INTERNAL ISO-8859-16// ISO8859-16 1 + +# from to module cost +alias T.61// T.61-8BIT// +alias ISO-IR-103// T.61-8BIT// +alias CSISO103T618BIT// T.61-8BIT// +alias T.618BIT// T.61-8BIT// +module T.61-8BIT// INTERNAL T.61 1 +module INTERNAL T.61-8BIT// T.61 1 + +# from to module cost +alias ISO-IR-156// ISO_6937// +alias ISO_6937:1992// ISO_6937// +alias ISO6937// ISO_6937// +module ISO_6937// INTERNAL ISO_6937 1 +module INTERNAL ISO_6937// ISO_6937 1 + + +# from to module cost +alias ISO-IR-90// ISO_6937-2// +alias ISO_6937-2:1983// ISO_6937-2// +alias CSISO90// ISO_6937-2// +alias ISO_69372// ISO_6937-2// +module ISO_6937-2// INTERNAL ISO_6937-2 1 +module INTERNAL ISO_6937-2// ISO_6937-2 1 + +# from to module cost +alias SHIFT-JIS// SJIS// +alias SHIFT_JIS// SJIS// +alias MS_KANJI// SJIS// +alias CSSHIFTJIS// SJIS// +module SJIS// INTERNAL SJIS 1 +module INTERNAL SJIS// SJIS 1 + +# from to module cost +alias WINDOWS-31J// CP932// +alias MS932// CP932// +alias SJIS-OPEN// CP932// +alias SJIS-WIN// CP932// +alias CSWINDOWS31J// CP932// +module CP932// INTERNAL CP932 1 +module INTERNAL CP932// CP932 1 + +# from to module cost +alias KOI8// KOI-8// +module KOI-8// INTERNAL KOI-8 1 +module INTERNAL KOI-8// KOI-8 1 + +# from to module cost +alias CSKOI8R// KOI8-R// +alias KOI8R// KOI8-R// +module KOI8-R// INTERNAL KOI8-R 1 +module INTERNAL KOI8-R// KOI8-R 1 + +# from to module cost +alias ISO-IR-19// LATIN-GREEK// +alias CSISO19LATINGREEK// LATIN-GREEK// +alias LATINGREEK// LATIN-GREEK// +module LATIN-GREEK// INTERNAL LATIN-GREEK 1 +module INTERNAL LATIN-GREEK// LATIN-GREEK 1 + +# from to module cost +alias ISO-IR-27// LATIN-GREEK-1// +alias CSISO27LATINGREEK1// LATIN-GREEK-1// +alias LATINGREEK1// LATIN-GREEK-1// +module LATIN-GREEK-1// INTERNAL LATIN-GREEK-1 1 +module INTERNAL LATIN-GREEK-1// LATIN-GREEK-1 1 + +# from to module cost +alias ROMAN8// HP-ROMAN8// +alias R8// HP-ROMAN8// +alias CSHPROMAN8// HP-ROMAN8// +alias OSF10010001// HP-ROMAN8// +alias HPROMAN8// HP-ROMAN8// +module HP-ROMAN8// INTERNAL HP-ROMAN8 1 +module INTERNAL HP-ROMAN8// HP-ROMAN8 1 + +# from to module cost +alias CSEBCDICATDE// EBCDIC-AT-DE// +alias EBCDICATDE// EBCDIC-AT-DE// +module EBCDIC-AT-DE// INTERNAL EBCDIC-AT-DE 1 +module INTERNAL EBCDIC-AT-DE// EBCDIC-AT-DE 1 + +# from to module cost +alias CSEBCDICATDEA// EBCDIC-AT-DE-A// +alias EBCDICATDEA// EBCDIC-AT-DE-A// +module EBCDIC-AT-DE-A// INTERNAL EBCDIC-AT-DE-A 1 +module INTERNAL EBCDIC-AT-DE-A// EBCDIC-AT-DE-A 1 + +# from to module cost +alias CSEBCDICCAFR// EBCDIC-CA-FR// +alias EBCDICCAFR// EBCDIC-CA-FR// +module EBCDIC-CA-FR// INTERNAL EBCDIC-CA-FR 1 +module INTERNAL EBCDIC-CA-FR// EBCDIC-CA-FR 1 + +# from to module cost +alias CSEBCDICDKNO// EBCDIC-DK-NO// +alias EBCDICDKNO// EBCDIC-DK-NO// +module EBCDIC-DK-NO// INTERNAL EBCDIC-DK-NO 1 +module INTERNAL EBCDIC-DK-NO// EBCDIC-DK-NO 1 + +# from to module cost +alias CSEBCDICDKNOA// EBCDIC-DK-NO-A// +alias EBCDICDKNOA// EBCDIC-DK-NO-A// +module EBCDIC-DK-NO-A// INTERNAL EBCDIC-DK-NO-A 1 +module INTERNAL EBCDIC-DK-NO-A// EBCDIC-DK-NO-A 1 + +# from to module cost +alias CSEBCDICES// EBCDIC-ES// +alias EBCDICES// EBCDIC-ES// +module EBCDIC-ES// INTERNAL EBCDIC-ES 1 +module INTERNAL EBCDIC-ES// EBCDIC-ES 1 + +# from to module cost +alias CSEBCDICESA// EBCDIC-ES-A// +alias EBCDICESA// EBCDIC-ES-A// +module EBCDIC-ES-A// INTERNAL EBCDIC-ES-A 1 +module INTERNAL EBCDIC-ES-A// EBCDIC-ES-A 1 + +# from to module cost +alias CSEBCDICESS// EBCDIC-ES-S// +alias EBCDICESS// EBCDIC-ES-S// +module EBCDIC-ES-S// INTERNAL EBCDIC-ES-S 1 +module INTERNAL EBCDIC-ES-S// EBCDIC-ES-S 1 + +# from to module cost +alias CSEBCDICFISE// EBCDIC-FI-SE// +alias EBCDICFISE// EBCDIC-FI-SE// +module EBCDIC-FI-SE// INTERNAL EBCDIC-FI-SE 1 +module INTERNAL EBCDIC-FI-SE// EBCDIC-FI-SE 1 + +# from to module cost +alias CSEBCDICFISEA// EBCDIC-FI-SE-A// +alias EBCDICFISEA// EBCDIC-FI-SE-A// +module EBCDIC-FI-SE-A// INTERNAL EBCDIC-FI-SE-A 1 +module INTERNAL EBCDIC-FI-SE-A// EBCDIC-FI-SE-A 1 + +# from to module cost +alias CSEBCDICFR// EBCDIC-FR// +alias EBCDICFR// EBCDIC-FR// +module EBCDIC-FR// INTERNAL EBCDIC-FR 1 +module INTERNAL EBCDIC-FR// EBCDIC-FR 1 + +# from to module cost +alias EBCDICISFRISS// EBCDIC-IS-FRISS// +module EBCDIC-IS-FRISS// INTERNAL EBCDIC-IS-FRISS 1 +module INTERNAL EBCDIC-IS-FRISS// EBCDIC-IS-FRISS 1 + +# from to module cost +alias CSEBCDICIT// EBCDIC-IT// +alias EBCDICIT// EBCDIC-IT// +module EBCDIC-IT// INTERNAL EBCDIC-IT 1 +module INTERNAL EBCDIC-IT// EBCDIC-IT 1 + +# from to module cost +alias CSEBCDICPT// EBCDIC-PT// +alias EBCDICPT// EBCDIC-PT// +module EBCDIC-PT// INTERNAL EBCDIC-PT 1 +module INTERNAL EBCDIC-PT// EBCDIC-PT 1 + +# from to module cost +alias CSEBCDICUK// EBCDIC-UK// +alias EBCDICUK// EBCDIC-UK// +module EBCDIC-UK// INTERNAL EBCDIC-UK 1 +module INTERNAL EBCDIC-UK// EBCDIC-UK 1 + +# from to module cost +alias CSEBCDICUS// EBCDIC-US// +alias EBCDICUS// EBCDIC-US// +module EBCDIC-US// INTERNAL EBCDIC-US 1 +module INTERNAL EBCDIC-US// EBCDIC-US 1 + +# from to module cost +alias CP037// IBM037// +alias EBCDIC-CP-US// IBM037// +alias EBCDIC-CP-CA// IBM037// +alias EBCDIC-CP-WT// IBM037// +alias EBCDIC-CP-NL// IBM037// +alias CSIBM037// IBM037// +alias OSF10020025// IBM037// +alias CP1070// IBM037// +alias CP282// IBM037// +module IBM037// INTERNAL IBM037 1 +module INTERNAL IBM037// IBM037 1 + +# from to module cost +alias EBCDIC-INT// IBM038// +alias CP038// IBM038// +alias CSIBM038// IBM038// +module IBM038// INTERNAL IBM038 1 +module INTERNAL IBM038// IBM038 1 + +# from to module cost +alias EBCDIC-INT1// IBM256// +module IBM256// INTERNAL IBM256 1 +module INTERNAL IBM256// IBM256 1 + +# from to module cost +alias CP273// IBM273// +alias CSIBM273// IBM273// +alias OSF10020111// IBM273// +module IBM273// INTERNAL IBM273 1 +module INTERNAL IBM273// IBM273 1 + +# from to module cost +alias EBCDIC-BE// IBM274// +alias CP274// IBM274// +alias CSIBM274// IBM274// +module IBM274// INTERNAL IBM274 1 +module INTERNAL IBM274// IBM274 1 + +# from to module cost +alias EBCDIC-BR// IBM275// +alias CP275// IBM275// +alias CSIBM275// IBM275// +module IBM275// INTERNAL IBM275 1 +module INTERNAL IBM275// IBM275 1 + +# from to module cost +alias EBCDIC-CP-DK// IBM277// +alias EBCDIC-CP-NO// IBM277// +alias CSIBM277// IBM277// +alias OSF10020115// IBM277// +module IBM277// INTERNAL IBM277 1 +module INTERNAL IBM277// IBM277 1 + +# from to module cost +alias CP278// IBM278// +alias EBCDIC-CP-FI// IBM278// +alias EBCDIC-CP-SE// IBM278// +alias CSIBM278// IBM278// +alias OSF10020116// IBM278// +module IBM278// INTERNAL IBM278 1 +module INTERNAL IBM278// IBM278 1 + +# from to module cost +alias CP280// IBM280// +alias EBCDIC-CP-IT// IBM280// +alias CSIBM280// IBM280// +alias OSF10020118// IBM280// +module IBM280// INTERNAL IBM280 1 +module INTERNAL IBM280// IBM280 1 + +# from to module cost +alias EBCDIC-JP-E// IBM281// +alias CP281// IBM281// +alias CSIBM281// IBM281// +module IBM281// INTERNAL IBM281 1 +module INTERNAL IBM281// IBM281 1 + +# from to module cost +alias CP284// IBM284// +alias EBCDIC-CP-ES// IBM284// +alias CSIBM284// IBM284// +alias OSF1002011C// IBM284// +alias CP1079// IBM284// +module IBM284// INTERNAL IBM284 1 +module INTERNAL IBM284// IBM284 1 + +# from to module cost +alias CP285// IBM285// +alias EBCDIC-CP-GB// IBM285// +alias CSIBM285// IBM285// +alias OSF1002011D// IBM285// +module IBM285// INTERNAL IBM285 1 +module INTERNAL IBM285// IBM285 1 + +# from to module cost +alias CP290// IBM290// +alias EBCDIC-JP-KANA// IBM290// +alias CSIBM290// IBM290// +alias OSF10020122// IBM290// +module IBM290// INTERNAL IBM290 1 +module INTERNAL IBM290// IBM290 1 + +# from to module cost +alias CP297// IBM297// +alias EBCDIC-CP-FR// IBM297// +alias CSIBM297// IBM297// +alias OSF10020129// IBM297// +alias CP1081// IBM297// +module IBM297// INTERNAL IBM297 1 +module INTERNAL IBM297// IBM297 1 + +# from to module cost +alias CP420// IBM420// +alias EBCDIC-CP-AR1// IBM420// +alias CSIBM420// IBM420// +alias OSF100201A4// IBM420// +module IBM420// INTERNAL IBM420 1 +module INTERNAL IBM420// IBM420 1 + +# from to module cost +alias CP423// IBM423// +alias EBCDIC-CP-GR// IBM423// +alias CSIBM423// IBM423// +module IBM423// INTERNAL IBM423 1 +module INTERNAL IBM423// IBM423 1 + +# from to module cost +alias CP424// IBM424// +alias EBCDIC-CP-HE// IBM424// +alias CSIBM424// IBM424// +alias OSF100201A8// IBM424// +module IBM424// INTERNAL IBM424 1 +module INTERNAL IBM424// IBM424 1 + +# from to module cost +alias CP437// IBM437// +alias 437// IBM437// +alias CSPC8CODEPAGE437// IBM437// +alias OSF100201B5// IBM437// +module IBM437// INTERNAL IBM437 1 +module INTERNAL IBM437// IBM437 1 + +# from to module cost +alias CP500// IBM500// +alias 500// IBM500// +alias 500V1// IBM500// +alias EBCDIC-CP-BE// IBM500// +alias EBCDIC-CP-CH// IBM500// +alias CSIBM500// IBM500// +alias OSF100201F4// IBM500// +alias CP1084// IBM500// +module IBM500// INTERNAL IBM500 1 +module INTERNAL IBM500// IBM500 1 + +# from to module cost +alias CP850// IBM850// +alias 850// IBM850// +alias CSPC850MULTILINGUAL// IBM850// +alias OSF10020352// IBM850// +module IBM850// INTERNAL IBM850 1 +module INTERNAL IBM850// IBM850 1 + +# from to module cost +alias CP858// IBM858// +alias 858// IBM858// +alias CSPC858MULTILINGUAL// IBM858// +module IBM858// INTERNAL IBM858 1 +module INTERNAL IBM858// IBM858 1 + +# from to module cost +alias CP851// IBM851// +alias 851// IBM851// +alias CSIBM851// IBM851// +module IBM851// INTERNAL IBM851 1 +module INTERNAL IBM851// IBM851 1 + +# from to module cost +alias CP852// IBM852// +alias 852// IBM852// +alias CSPCP852// IBM852// +alias OSF10020354// IBM852// +module IBM852// INTERNAL IBM852 1 +module INTERNAL IBM852// IBM852 1 + +# from to module cost +alias CP855// IBM855// +alias 855// IBM855// +alias CSIBM855// IBM855// +alias OSF10020357// IBM855// +module IBM855// INTERNAL IBM855 1 +module INTERNAL IBM855// IBM855 1 + +# from to module cost +alias IBM-856// IBM856// +alias CP856// IBM856// +alias 856// IBM856// +alias CSIBM856// IBM856// +module IBM856// INTERNAL IBM856 1 +module INTERNAL IBM856// IBM856 1 + +# from to module cost +alias CP857// IBM857// +alias 857// IBM857// +alias CSIBM857// IBM857// +alias OSF10020359// IBM857// +module IBM857// INTERNAL IBM857 1 +module INTERNAL IBM857// IBM857 1 + +# from to module cost +alias CP860// IBM860// +alias 860// IBM860// +alias CSIBM860// IBM860// +module IBM860// INTERNAL IBM860 1 +module INTERNAL IBM860// IBM860 1 + +# from to module cost +alias CP861// IBM861// +alias 861// IBM861// +alias CPIBM861// IBM861// +alias OSF1002035D// IBM861// +module IBM861// INTERNAL IBM861 1 +module INTERNAL IBM861// IBM861 1 + +# from to module cost +alias CP862// IBM862// +alias 862// IBM862// +alias CSPC862LATINHEBREW// IBM862// +alias OSF1002035E// IBM862// +module IBM862// INTERNAL IBM862 1 +module INTERNAL IBM862// IBM862 1 + +# from to module cost +alias CP863// IBM863// +alias 863// IBM863// +alias CSIBM863// IBM863// +alias OSF1002035F// IBM863// +module IBM863// INTERNAL IBM863 1 +module INTERNAL IBM863// IBM863 1 + +# from to module cost +alias CP864// IBM864// +alias 864// IBM864// +alias CSIBM864// IBM864// +alias OSF10020360// IBM864// +module IBM864// INTERNAL IBM864 1 +module INTERNAL IBM864// IBM864 1 + +# from to module cost +alias CP865// IBM865// +alias 865// IBM865// +alias CSIBM865// IBM865// +module IBM865// INTERNAL IBM865 1 +module INTERNAL IBM865// IBM865 1 + +# from to module cost +alias CP866// IBM866// +alias 866// IBM866// +alias CSIBM866// IBM866// +module IBM866// INTERNAL IBM866 1 +module INTERNAL IBM866// IBM866 1 + +# from to module cost +alias CP866NAV// IBM866NAV// +alias 866NAV// IBM866NAV// +module IBM866NAV// INTERNAL IBM866NAV 1 +module INTERNAL IBM866NAV// IBM866NAV 1 + +# from to module cost +alias CP868// IBM868// +alias CP-AR// IBM868// +alias CSIBM868// IBM868// +alias OSF10020364// IBM868// +module IBM868// INTERNAL IBM868 1 +module INTERNAL IBM868// IBM868 1 + +# from to module cost +alias CP869// IBM869// +alias 869// IBM869// +alias CP-GR// IBM869// +alias CSIBM869// IBM869// +alias OSF10020365// IBM869// +module IBM869// INTERNAL IBM869 1 +module INTERNAL IBM869// IBM869 1 + +# from to module cost +alias CP870// IBM870// +alias EBCDIC-CP-ROECE// IBM870// +alias EBCDIC-CP-YU// IBM870// +alias CSIBM870// IBM870// +alias OSF10020366// IBM870// +module IBM870// INTERNAL IBM870 1 +module INTERNAL IBM870// IBM870 1 + +# from to module cost +alias CP871// IBM871// +alias EBCDIC-CP-IS// IBM871// +alias CSIBM871// IBM871// +alias OSF10020367// IBM871// +module IBM871// INTERNAL IBM871 1 +module INTERNAL IBM871// IBM871 1 + +# from to module cost +alias CP875// IBM875// +alias EBCDIC-GREEK// IBM875// +alias OSF1002036B// IBM875// +module IBM875// INTERNAL IBM875 1 +module INTERNAL IBM875// IBM875 1 + +# from to module cost +alias CP880// IBM880// +alias EBCDIC-CYRILLIC// IBM880// +alias CSIBM880// IBM880// +alias OSF10020370// IBM880// +module IBM880// INTERNAL IBM880 1 +module INTERNAL IBM880// IBM880 1 + +# from to module cost +alias CP891// IBM891// +alias CSIBM891// IBM891// +alias OSF1002037B// IBM891// +module IBM891// INTERNAL IBM891 1 +module INTERNAL IBM891// IBM891 1 + +# from to module cost +alias CP903// IBM903// +alias CSIBM903// IBM903// +alias OSF10020387// IBM903// +module IBM903// INTERNAL IBM903 1 +module INTERNAL IBM903// IBM903 1 + +# from to module cost +alias CP904// IBM904// +alias 904// IBM904// +alias CSIBM904// IBM904// +alias OSF10020388// IBM904// +module IBM904// INTERNAL IBM904 1 +module INTERNAL IBM904// IBM904 1 + +# from to module cost +alias CP905// IBM905// +alias EBCDIC-CP-TR// IBM905// +alias CSIBM905// IBM905// +module IBM905// INTERNAL IBM905 1 +module INTERNAL IBM905// IBM905 1 + +# from to module cost +alias CP918// IBM918// +alias EBCDIC-CP-AR2// IBM918// +alias CSIBM918// IBM918// +alias OSF10020396// IBM918// +module IBM918// INTERNAL IBM918 1 +module INTERNAL IBM918// IBM918 1 + +# from to module cost +alias IBM-922// IBM922// +alias CP922// IBM922// +alias CSIBM922// IBM922// +module IBM922// INTERNAL IBM922 1 +module INTERNAL IBM922// IBM922 1 + +# from to module cost +alias IBM-930// IBM930// +alias CP930// IBM930// +alias CSIBM930// IBM930// +module IBM930// INTERNAL IBM930 1 +module INTERNAL IBM930// IBM930 1 + +# from to module cost +alias IBM-932// IBM932// +alias CSIBM932// IBM932// +module IBM932// INTERNAL IBM932 1 +module INTERNAL IBM932// IBM932 1 + +# from to module cost +alias IBM-933// IBM933// +alias CP933// IBM933// +alias CSIBM933// IBM933// +module IBM933// INTERNAL IBM933 1 +module INTERNAL IBM933// IBM933 1 + +# from to module cost +alias IBM-935// IBM935// +alias CP935// IBM935// +alias CSIBM935// IBM935// +module IBM935// INTERNAL IBM935 1 +module INTERNAL IBM935// IBM935 1 + +# from to module cost +alias IBM-937// IBM937// +alias CP937// IBM937// +alias CSIBM937// IBM937// +module IBM937// INTERNAL IBM937 1 +module INTERNAL IBM937// IBM937 1 + +# from to module cost +alias IBM-939// IBM939// +alias CP939// IBM939// +alias CSIBM939// IBM939// +module IBM939// INTERNAL IBM939 1 +module INTERNAL IBM939// IBM939 1 + +# from to module cost +alias IBM-943// IBM943// +alias CSIBM943// IBM943// +module IBM943// INTERNAL IBM943 1 +module INTERNAL IBM943// IBM943 1 + +# from to module cost +alias CP1004// IBM1004// +alias OS2LATIN1// IBM1004// +module IBM1004// INTERNAL IBM1004 1 +module INTERNAL IBM1004// IBM1004 1 + +# from to module cost +alias CP1026// IBM1026// +alias 1026// IBM1026// +alias CSIBM1026// IBM1026// +alias OSF10020402// IBM1026// +module IBM1026// INTERNAL IBM1026 1 +module INTERNAL IBM1026// IBM1026 1 + +# from to module cost +alias IBM-1046// IBM1046// +alias CP1046// IBM1046// +alias 1046// IBM1046// +module IBM1046// INTERNAL IBM1046 1 +module INTERNAL IBM1046// IBM1046 1 + +# from to module cost +alias IBM-1047// IBM1047// +alias CP1047// IBM1047// +alias 1047// IBM1047// +alias OSF10020417// IBM1047// +module IBM1047// INTERNAL IBM1047 1 +module INTERNAL IBM1047// IBM1047 1 + +# from to module cost +alias IBM-1124// IBM1124// +alias CP1124// IBM1124// +alias CSIBM1124// IBM1124// +module IBM1124// INTERNAL IBM1124 1 +module INTERNAL IBM1124// IBM1124 1 + +# from to module cost +alias IBM-1129// IBM1129// +alias CP1129// IBM1129// +alias CSIBM1129// IBM1129// +module IBM1129// INTERNAL IBM1129 1 +module INTERNAL IBM1129// IBM1129 1 + +# from to module cost +alias IBM-1160// IBM1160// +alias CP1160// IBM1160// +alias CSIBM1160// IBM1160// +module IBM1160// INTERNAL IBM1160 1 +module INTERNAL IBM1160// IBM1160 1 + +# from to module cost +alias IBM-1161// IBM1161// +alias CP1161// IBM1161// +alias CSIBM1161// IBM1161// +module IBM1161// INTERNAL IBM1161 1 +module INTERNAL IBM1161// IBM1161 1 + +# from to module cost +alias IBM-1132// IBM1132// +alias CP1132// IBM1132// +alias CSIBM1132// IBM1132// +module IBM1132// INTERNAL IBM1132 1 +module INTERNAL IBM1132// IBM1132 1 + +# from to module cost +alias IBM-1133// IBM1133// +alias CP1133// IBM1133// +alias CSIBM1133// IBM1133// +module IBM1133// INTERNAL IBM1133 1 +module INTERNAL IBM1133// IBM1133 1 + +# from to module cost +alias IBM-1162// IBM1162// +alias CP1162// IBM1162// +alias CSIBM11621162// IBM1162// +module IBM1162// INTERNAL IBM1162 1 +module INTERNAL IBM1162// IBM1162 1 + +# from to module cost +alias IBM-1163// IBM1163// +alias CP1163// IBM1163// +alias CSIBM1163// IBM1163// +module IBM1163// INTERNAL IBM1163 1 +module INTERNAL IBM1163// IBM1163 1 + +# from to module cost +alias IBM-1164// IBM1164// +alias CP1164// IBM1164// +alias CSIBM1164// IBM1164// +module IBM1164// INTERNAL IBM1164 1 +module INTERNAL IBM1164// IBM1164 1 + +# from to module cost +alias EUCKR// EUC-KR// +alias CSEUCKR// EUC-KR// +alias OSF0004000a// EUC-KR// +module EUC-KR// INTERNAL EUC-KR 1 +module INTERNAL EUC-KR// EUC-KR 1 + +# from to module cost +alias MSCP949// UHC// +alias CP949// UHC// +alias OSF100203B5// UHC// +module UHC// INTERNAL UHC 1 +module INTERNAL UHC// UHC 1 + +# from to module cost +alias MSCP1361// JOHAB// +alias CP1361// JOHAB// +module JOHAB// INTERNAL JOHAB 1 +module INTERNAL JOHAB// JOHAB 1 + +# from to module cost +alias BIG-FIVE// BIG5// +alias BIGFIVE// BIG5// +alias BIG-5// BIG5// +alias CN-BIG5// BIG5// +alias CP950// BIG5// +module BIG5// INTERNAL BIG5 1 +module INTERNAL BIG5// BIG5 1 + +# from to module cost +alias BIG5-HKSCS// BIG5HKSCS// +module BIG5HKSCS// INTERNAL BIG5HKSCS 1 +module INTERNAL BIG5HKSCS// BIG5HKSCS 1 + +# from to module cost +alias EUCJP-MS// EUC-JP-MS// +alias EUCJP-OPEN// EUC-JP-MS// +alias EUCJP-WIN// EUC-JP-MS// +module EUC-JP-MS// INTERNAL EUC-JP-MS 1 +module INTERNAL EUC-JP-MS// EUC-JP-MS 1 + +# from to module cost +alias EUCJP// EUC-JP// +alias CSEUCPKDFMTJAPANESE// EUC-JP// +alias OSF00030010// EUC-JP// +alias UJIS// EUC-JP// +module EUC-JP// INTERNAL EUC-JP 1 +module INTERNAL EUC-JP// EUC-JP 1 + +# from to module cost +alias EUCCN// EUC-CN// +alias GB2312// EUC-CN// +alias csGB2312// EUC-CN// +alias CN-GB// EUC-CN// +module EUC-CN// INTERNAL EUC-CN 1 +module INTERNAL EUC-CN// EUC-CN 1 + +# from to module cost +module EUC-CN// BIG5// GBBIG5 1 +module BIG5// EUC-CN// GBBIG5 1 + +# from to module cost +alias GB13000// GBK// +alias CP936// GBK// +alias MS936// GBK// +alias WINDOWS-936// GBK// +module GBK// INTERNAL GBK 1 +module INTERNAL GBK// GBK 1 + +# from to module cost +module GBK// EUC-CN// GBGBK 1 +module EUC-CN// GBK// GBGBK 1 + +# from to module cost +alias EUCTW// EUC-TW// +alias OSF0005000a// EUC-TW// +module EUC-TW// INTERNAL EUC-TW 1 +module INTERNAL EUC-TW// EUC-TW 1 + +# from to module cost +alias RUSCII// CP1125// +alias IBM848// CP1125// +module CP1125// INTERNAL CP1125 1 +module INTERNAL CP1125// CP1125 1 + +# from to module cost +alias MS-EE// CP1250// +alias WINDOWS-1250// CP1250// +module CP1250// INTERNAL CP1250 1 +module INTERNAL CP1250// CP1250 1 + +# from to module cost +alias MS-CYRL// CP1251// +alias WINDOWS-1251// CP1251// +module CP1251// INTERNAL CP1251 1 +module INTERNAL CP1251// CP1251 1 + +# from to module cost +alias MS-GREEK// CP1253// +alias WINDOWS-1253// CP1253// +module CP1253// INTERNAL CP1253 1 +module INTERNAL CP1253// CP1253 1 + +# from to module cost +alias MS-TURK// CP1254// +alias WINDOWS-1254// CP1254// +module CP1254// INTERNAL CP1254 1 +module INTERNAL CP1254// CP1254 1 + +# from to module cost +alias MS-HEBR// CP1255// +alias WINDOWS-1255// CP1255// +module CP1255// INTERNAL CP1255 1 +module INTERNAL CP1255// CP1255 1 + +# from to module cost +alias MS-ARAB// CP1256// +alias WINDOWS-1256// CP1256// +module CP1256// INTERNAL CP1256 1 +module INTERNAL CP1256// CP1256 1 + +# from to module cost +alias WINBALTRIM// CP1257// +alias WINDOWS-1257// CP1257// +module CP1257// INTERNAL CP1257 1 +module INTERNAL CP1257// CP1257 1 + +# from to module cost +alias WINDOWS-1258// CP1258// +module CP1258// INTERNAL CP1258 1 +module INTERNAL CP1258// CP1258 1 + +# from to module cost +alias 874// IBM874// +alias CP874// IBM874// +alias WINDOWS-874// IBM874// +module IBM874// INTERNAL IBM874 1 +module INTERNAL IBM874// IBM874 1 + +# from to module cost +module CP737// INTERNAL CP737 1 +module INTERNAL CP737// CP737 1 + +# from to module cost +module CP770// INTERNAL CP770 1 +module INTERNAL CP770// CP770 1 + +# from to module cost +module CP771// INTERNAL CP771 1 +module INTERNAL CP771// CP771 1 + +# from to module cost +module CP772// INTERNAL CP772 1 +module INTERNAL CP772// CP772 1 + +# from to module cost +module CP773// INTERNAL CP773 1 +module INTERNAL CP773// CP773 1 + +# from to module cost +module CP774// INTERNAL CP774 1 +module INTERNAL CP774// CP774 1 + +# from to module cost +alias IBM775// CP775// +alias CSPC775BALTIC// CP775// +module CP775// INTERNAL CP775 1 +module INTERNAL CP775// CP775 1 + +# from to module cost +alias CSISO2022JP// ISO-2022-JP// +alias ISO2022JP// ISO-2022-JP// +module ISO-2022-JP// INTERNAL ISO-2022-JP 1 +module INTERNAL ISO-2022-JP// ISO-2022-JP 1 + +# from to module cost +alias CSISO2022JP2// ISO-2022-JP-2// +alias ISO2022JP2// ISO-2022-JP-2// +module ISO-2022-JP-2// INTERNAL ISO-2022-JP 1 +module INTERNAL ISO-2022-JP-2// ISO-2022-JP 1 + +# from to module cost +module ISO-2022-JP-3// INTERNAL ISO-2022-JP-3 1 +module INTERNAL ISO-2022-JP-3// ISO-2022-JP-3 1 + +# from to module cost +alias CSISO2022KR// ISO-2022-KR// +alias ISO2022KR// ISO-2022-KR// +module ISO-2022-KR// INTERNAL ISO-2022-KR 1 +module INTERNAL ISO-2022-KR// ISO-2022-KR 1 + +# from to module cost +alias CSISO2022CN// ISO-2022-CN// +alias ISO2022CN// ISO-2022-CN// +module ISO-2022-CN// INTERNAL ISO-2022-CN 1 +module INTERNAL ISO-2022-CN// ISO-2022-CN 1 + +# from to module cost +alias ISO2022CNEXT// ISO-2022-CN-EXT// +module ISO-2022-CN-EXT// INTERNAL ISO-2022-CN-EXT 1 +module INTERNAL ISO-2022-CN-EXT// ISO-2022-CN-EXT 1 + +# from to module cost +alias MAC// MACINTOSH// +alias CSMACINTOSH// MACINTOSH// +module MACINTOSH// INTERNAL MACINTOSH 1 +module INTERNAL MACINTOSH// MACINTOSH 1 + +# from to module cost +alias ISO-IR-143// IEC_P27-1// +alias CSISO143IECP271// IEC_P27-1// +alias IEC_P271// IEC_P27-1// +module IEC_P27-1// INTERNAL IEC_P27-1 1 +module INTERNAL IEC_P27-1// IEC_P27-1 1 + +# from to module cost +alias ISO_9036// ASMO_449// +alias ARABIC7// ASMO_449// +alias ISO-IR-89// ASMO_449// +alias CSISO89ASMO449// ASMO_449// +module ASMO_449// INTERNAL ASMO_449 1 +module INTERNAL ASMO_449// ASMO_449 1 + +# from to module cost +alias ISO-IR-139// CSN_369103// +alias CSISO139CSN369103// CSN_369103// +module CSN_369103// INTERNAL CSN_369103 1 +module INTERNAL CSN_369103// CSN_369103 1 + +# from to module cost +alias CWI-2// CWI// +alias CP-HU// CWI// +module CWI// INTERNAL CWI 1 +module INTERNAL CWI// CWI 1 + +# from to module cost +alias DEC// DEC-MCS// +alias CSDECMCS// DEC-MCS// +alias DECMCS// DEC-MCS// +module DEC-MCS// INTERNAL DEC-MCS 1 +module INTERNAL DEC-MCS// DEC-MCS 1 + +# from to module cost +alias ISO-IR-111// ECMA-CYRILLIC// +alias CSISO111ECMACYRILLIC// ECMA-CYRILLIC// +alias ECMACYRILLIC// ECMA-CYRILLIC// +module ECMA-CYRILLIC// INTERNAL ECMA-CYRILLIC 1 +module INTERNAL ECMA-CYRILLIC// ECMA-CYRILLIC 1 + +# from to module cost +alias ST_SEV_358-88// GOST_19768-74// +alias GOST_19768// GOST_19768-74// +alias ISO-IR-153// GOST_19768-74// +alias CSISO153GOST1976874// GOST_19768-74// +alias GOST_1976874// GOST_19768-74// +module GOST_19768-74// INTERNAL GOST_19768-74 1 +module INTERNAL GOST_19768-74// GOST_19768-74 1 + +# from to module cost +alias ISO-IR-150// GREEK-CCITT// +alias CSISO150// GREEK-CCITT// +alias CSISO150GREEKCCITT// GREEK-CCITT// +alias GREEKCCITT// GREEK-CCITT// +module GREEK-CCITT// INTERNAL GREEK-CCITT 1 +module INTERNAL GREEK-CCITT// GREEK-CCITT 1 + +# from to module cost +alias ISO-IR-88// GREEK7// +alias CSISO88GREEK7// GREEK7// +module GREEK7// INTERNAL GREEK7 1 +module INTERNAL GREEK7// GREEK7 1 + +# from to module cost +alias ISO-IR-18// GREEK7-OLD// +alias CSISO18GREEK7OLD// GREEK7-OLD// +alias GREEK7OLD// GREEK7-OLD// +module GREEK7-OLD// INTERNAL GREEK7-OLD 1 +module INTERNAL GREEK7-OLD// GREEK7-OLD 1 + +# from to module cost +alias ISO-IR-49// INIS// +alias CSISO49INIS// INIS// +module INIS// INTERNAL INIS 1 +module INTERNAL INIS// INIS 1 + +# from to module cost +alias ISO-IR-50// INIS-8// +alias CSISO50INIS8// INIS-8// +alias INIS8// INIS-8// +module INIS-8// INTERNAL INIS-8 1 +module INTERNAL INIS-8// INIS-8 1 + +# from to module cost +alias ISO-IR-51// INIS-CYRILLIC// +alias CSISO51INISCYRILLIC// INIS-CYRILLIC// +alias INISCYRILLIC// INIS-CYRILLIC// +module INIS-CYRILLIC// INTERNAL INIS-CYRILLIC 1 +module INTERNAL INIS-CYRILLIC// INIS-CYRILLIC 1 + +# from to module cost +alias ISO-IR-98// ISO_2033// +alias ISO_2033-1983// ISO_2033// +alias E13B// ISO_2033// +alias CSISO2033// ISO_2033// +module ISO_2033// INTERNAL ISO_2033 1 +module INTERNAL ISO_2033// ISO_2033 1 + +# from to module cost +alias ISO-IR-37// ISO_5427// +alias KOI-7// ISO_5427// +alias CSISO5427CYRILLIC// ISO_5427// +module ISO_5427// INTERNAL ISO_5427 1 +module INTERNAL ISO_5427// ISO_5427 1 + +# from to module cost +alias ISO-IR-54// ISO_5427-EXT// +alias ISO_5427:1981// ISO_5427-EXT// +alias CSISO5427CYRILLIC1981// ISO_5427-EXT// +alias ISO_5427EXT// ISO_5427-EXT// +module ISO_5427-EXT// INTERNAL ISO_5427-EXT 1 +module INTERNAL ISO_5427-EXT// ISO_5427-EXT 1 + +# from to module cost +alias ISO-IR-55// ISO_5428// +alias ISO_5428:1980// ISO_5428// +alias CSISO5428GREEK// ISO_5428// +module ISO_5428// INTERNAL ISO_5428 1 +module INTERNAL ISO_5428// ISO_5428 1 + +# from to module cost +alias ISO-IR-155// ISO_10367-BOX// +alias CSISO10367BOX// ISO_10367-BOX// +alias ISO_10367BOX// ISO_10367-BOX// +module ISO_10367-BOX// INTERNAL ISO_10367-BOX 1 +module INTERNAL ISO_10367-BOX// ISO_10367-BOX 1 + +# from to module cost +alias MACIS// MAC-IS// +module MAC-IS// INTERNAL MAC-IS 1 +module INTERNAL MAC-IS// MAC-IS 1 + +# from to module cost +alias MACUK// MAC-UK// +alias MACUKRAINIAN// MAC-UK// +alias MAC-CYRILLIC// MAC-UK// +alias MACCYRILLIC// MAC-UK// +module MAC-UK// INTERNAL MAC-UK 1 +module INTERNAL MAC-UK// MAC-UK 1 + +# from to module cost +alias MS-MAC-CYRILLIC// CP10007// +alias MSMACCYRILLIC// CP10007// +module CP10007// INTERNAL CP10007 1 +module INTERNAL CP10007// CP10007 1 + +# from to module cost +alias ISO-IR-9-1// NATS-DANO// +alias CSNATSDANO// NATS-DANO// +alias NATSDANO// NATS-DANO// +module NATS-DANO// INTERNAL NATS-DANO 1 +module INTERNAL NATS-DANO// NATS-DANO 1 + +# from to module cost +alias ISO-IR-8-1// NATS-SEFI// +alias CSNATSSEFI// NATS-SEFI// +alias NATSSEFI// NATS-SEFI// +module NATS-SEFI// INTERNAL NATS-SEFI 1 +module INTERNAL NATS-SEFI// NATS-SEFI 1 + +# from to module cost +alias WS2// WIN-SAMI-2// +alias WINSAMI2// WIN-SAMI-2// +module WIN-SAMI-2// INTERNAL SAMI-WS2 1 +module INTERNAL WIN-SAMI-2// SAMI-WS2 1 + +# from to module cost +module ISO-IR-197// INTERNAL ISO-IR-197 1 +module INTERNAL ISO-IR-197// ISO-IR-197 1 + +# from to module cost +alias TIS620// TIS-620// +alias TIS620-0// TIS-620// +alias TIS620.2529-1// TIS-620// +alias TIS620.2533-0// TIS-620// +alias ISO-IR-166// TIS-620// +module TIS-620// INTERNAL TIS-620 1 +module INTERNAL TIS-620// TIS-620 1 + +# from to module cost +alias KOI8U// KOI8-U// +module KOI8-U// INTERNAL KOI8-U 1 +module INTERNAL KOI8-U// KOI8-U 1 + +# from to module cost +alias ISIRI3342// ISIRI-3342// +module ISIRI-3342// INTERNAL ISIRI-3342 1 +module INTERNAL ISIRI-3342// ISIRI-3342 1 + +# from to module cost +module GB18030// INTERNAL GB18030 1 +module INTERNAL GB18030// GB18030 1 + +# from to module cost +module VISCII// INTERNAL VISCII 1 +module INTERNAL VISCII// VISCII 1 + +# from to module cost +module KOI8-T// INTERNAL KOI8-T 1 +module INTERNAL KOI8-T// KOI8-T 1 + +# from to module cost +module GEORGIAN-PS// INTERNAL GEORGIAN-PS 1 +module INTERNAL GEORGIAN-PS// GEORGIAN-PS 1 + +# from to module cost +module GEORGIAN-ACADEMY// INTERNAL GEORGIAN-ACADEMY 1 +module INTERNAL GEORGIAN-ACADEMY// GEORGIAN-ACADEMY 1 + +# from to module cost +module ISO-IR-209// INTERNAL ISO-IR-209 1 +module INTERNAL ISO-IR-209// ISO-IR-209 1 + +# from to module cost +module MAC-SAMI// INTERNAL MAC-SAMI 1 +module INTERNAL MAC-SAMI// MAC-SAMI 1 + +# from to module cost +alias ARMSCII8// ARMSCII-8// +module ARMSCII-8// INTERNAL ARMSCII-8 1 +module INTERNAL ARMSCII-8// ARMSCII-8 1 + +# from to module cost +alias TCVN// TCVN5712-1// +alias TCVN-5712// TCVN5712-1// +alias TCVN5712-1:1993// TCVN5712-1// +module TCVN5712-1// INTERNAL TCVN5712-1 1 +module INTERNAL TCVN5712-1// TCVN5712-1 1 + +# from to module cost +module EUC-JISX0213// INTERNAL EUC-JISX0213 1 +module INTERNAL EUC-JISX0213// EUC-JISX0213 1 + +# from to module cost +alias ShiftJISX0213// Shift_JISX0213// +module Shift_JISX0213// INTERNAL SHIFT_JISX0213 1 +module INTERNAL Shift_JISX0213// SHIFT_JISX0213 1 + +# from to module cost +module TSCII// INTERNAL TSCII 1 +module INTERNAL TSCII// TSCII 1 + +# from to module cost +module PT154// INTERNAL PT154 1 +module INTERNAL PT154// PT154 1 + +# from to module cost +alias STRK1048-2002// RK1048// +module RK1048// INTERNAL RK1048 1 +module INTERNAL RK1048// RK1048 1 + +# from to module cost +alias IBM-1025// IBM1025// +alias CP1025// IBM1025// +alias CSIBM1025// IBM1025// +module IBM1025// INTERNAL IBM1025 1 +module INTERNAL IBM1025// IBM1025 1 + +# from to module cost +alias IBM-1122// IBM1122// +alias CP1122// IBM1122// +alias CSIBM1122// IBM1122// +module IBM1122// INTERNAL IBM1122 1 +module INTERNAL IBM1122// IBM1122 1 + +# from to module cost +alias IBM-1137// IBM1137// +alias CP1137// IBM1137// +alias CSIBM1137// IBM1137// +module IBM1137// INTERNAL IBM1137 1 +module INTERNAL IBM1137// IBM1137 1 + +# from to module cost +alias IBM-1153// IBM1153// +alias CP1153// IBM1153// +alias CSIBM1153// IBM1153// +module IBM1153// INTERNAL IBM1153 1 +module INTERNAL IBM1153// IBM1153 1 + +# from to module cost +alias IBM-1154// IBM1154// +alias CP1154// IBM1154// +alias CSIBM1154// IBM1154// +module IBM1154// INTERNAL IBM1154 1 +module INTERNAL IBM1154// IBM1154 1 + +# from to module cost +alias IBM-1155// IBM1155// +alias CP1155// IBM1155// +alias CSIBM1155// IBM1155// +module IBM1155// INTERNAL IBM1155 1 +module INTERNAL IBM1155// IBM1155 1 + +# from to module cost +alias IBM-1156// IBM1156// +alias CP1156// IBM1156// +alias CSIBM1156// IBM1156// +module IBM1156// INTERNAL IBM1156 1 +module INTERNAL IBM1156// IBM1156 1 + +# from to module cost +alias IBM-1157// IBM1157// +alias CP1157// IBM1157// +alias CSIBM1157// IBM1157// +module IBM1157// INTERNAL IBM1157 1 +module INTERNAL IBM1157// IBM1157 1 + +# from to module cost +alias IBM-1158// IBM1158// +alias CP1158// IBM1158// +alias CSIBM1158// IBM1158// +module IBM1158// INTERNAL IBM1158 1 +module INTERNAL IBM1158// IBM1158 1 + +# from to module cost +alias IBM-803// IBM803// +alias CP803// IBM803// +alias CSIBM803// IBM803// +module IBM803// INTERNAL IBM803 1 +module INTERNAL IBM803// IBM803 1 + +# from to module cost +alias IBM-901// IBM901// +alias CP901// IBM901// +alias CSIBM901// IBM901// +module IBM901// INTERNAL IBM901 1 +module INTERNAL IBM901// IBM901 1 + +# from to module cost +alias IBM-902// IBM902// +alias CP902// IBM902// +alias CSIBM902// IBM902// +module IBM902// INTERNAL IBM902 1 +module INTERNAL IBM902// IBM902 1 + +# from to module cost +alias IBM-921// IBM921// +alias CP921// IBM921// +alias CSIBM921// IBM921// +module IBM921// INTERNAL IBM921 1 +module INTERNAL IBM921// IBM921 1 + +# from to module cost +alias IBM-1008// IBM1008// +alias CP1008// IBM1008// +alias CSIBM1008// IBM1008// +module IBM1008// INTERNAL IBM1008 1 +module INTERNAL IBM1008// IBM1008 1 + +# from to module cost +module IBM1008// IBM420// IBM1008_420 1 +module IBM420// IBM1008// IBM1008_420 1 + +# from to module cost +alias IBM-1097// IBM1097// +alias CP1097// IBM1097// +alias CSIBM1097// IBM1097// +module IBM1097// INTERNAL IBM1097 1 +module INTERNAL IBM1097// IBM1097 1 + +# from to module cost +alias IBM-1112// IBM1112// +alias CP1112// IBM1112// +alias CSIBM1112// IBM1112// +module IBM1112// INTERNAL IBM1112 1 +module INTERNAL IBM1112// IBM1112 1 + +# from to module cost +alias IBM-1123// IBM1123// +alias CP1123// IBM1123// +alias CSIBM1123// IBM1123// +module IBM1123// INTERNAL IBM1123 1 +module INTERNAL IBM1123// IBM1123 1 + +# from to module cost +alias IBM-1130// IBM1130// +alias CP1130// IBM1130// +alias CSIBM1130// IBM1130// +module IBM1130// INTERNAL IBM1130 1 +module INTERNAL IBM1130// IBM1130 1 + +# from to module cost +alias IBM-1140// IBM1140// +alias CP1140// IBM1140// +alias CSIBM1140// IBM1140// +module IBM1140// INTERNAL IBM1140 1 +module INTERNAL IBM1140// IBM1140 1 + +# from to module cost +alias IBM-1141// IBM1141// +alias CP1141// IBM1141// +alias CSIBM1141// IBM1141// +module IBM1141// INTERNAL IBM1141 1 +module INTERNAL IBM1141// IBM1141 1 + +# from to module cost +alias IBM-1142// IBM1142// +alias CP1142// IBM1142// +alias CSIBM1142// IBM1142// +module IBM1142// INTERNAL IBM1142 1 +module INTERNAL IBM1142// IBM1142 1 + +# from to module cost +alias IBM-1143// IBM1143// +alias CP1143// IBM1143// +alias CSIBM1143// IBM1143// +module IBM1143// INTERNAL IBM1143 1 +module INTERNAL IBM1143// IBM1143 1 + +# from to module cost +alias IBM-1144// IBM1144// +alias CP1144// IBM1144// +alias CSIBM1144// IBM1144// +module IBM1144// INTERNAL IBM1144 1 +module INTERNAL IBM1144// IBM1144 1 + +# from to module cost +alias IBM-1145// IBM1145// +alias CP1145// IBM1145// +alias CSIBM1145// IBM1145// +module IBM1145// INTERNAL IBM1145 1 +module INTERNAL IBM1145// IBM1145 1 + +# from to module cost +alias IBM-1146// IBM1146// +alias CP1146// IBM1146// +alias CSIBM1146// IBM1146// +module IBM1146// INTERNAL IBM1146 1 +module INTERNAL IBM1146// IBM1146 1 + +# from to module cost +alias IBM-1147// IBM1147// +alias CP1147// IBM1147// +alias CSIBM1147// IBM1147// +module IBM1147// INTERNAL IBM1147 1 +module INTERNAL IBM1147// IBM1147 1 + +# from to module cost +alias IBM-1148// IBM1148// +alias CP1148// IBM1148// +alias CSIBM1148// IBM1148// +module IBM1148// INTERNAL IBM1148 1 +module INTERNAL IBM1148// IBM1148 1 + +# from to module cost +alias IBM-1149// IBM1149// +alias CP1149// IBM1149// +alias CSIBM1149// IBM1149// +module IBM1149// INTERNAL IBM1149 1 +module INTERNAL IBM1149// IBM1149 1 + +# from to module cost +alias IBM-1166// IBM1166// +alias CP1166// IBM1166// +alias CSIBM1166// IBM1166// +module IBM1166// INTERNAL IBM1166 1 +module INTERNAL IBM1166// IBM1166 1 + +# from to module cost +alias IBM-1167// IBM1167// +alias CP1167// IBM1167// +alias CSIBM1167// IBM1167// +module IBM1167// INTERNAL IBM1167 1 +module INTERNAL IBM1167// IBM1167 1 + +# from to module cost +alias IBM-4517// IBM4517// +alias CP4517// IBM4517// +alias CSIBM4517// IBM4517// +module IBM4517// INTERNAL IBM4517 1 +module INTERNAL IBM4517// IBM4517 1 + +# from to module cost +alias IBM-4899// IBM4899// +alias CP4899// IBM4899// +alias CSIBM4899// IBM4899// +module IBM4899// INTERNAL IBM4899 1 +module INTERNAL IBM4899// IBM4899 1 + +# from to module cost +alias IBM-4909// IBM4909// +alias CP4909// IBM4909// +alias CSIBM4909// IBM4909// +module IBM4909// INTERNAL IBM4909 1 +module INTERNAL IBM4909// IBM4909 1 + +# from to module cost +alias IBM-4971// IBM4971// +alias CP4971// IBM4971// +alias CSIBM4971// IBM4971// +module IBM4971// INTERNAL IBM4971 1 +module INTERNAL IBM4971// IBM4971 1 + +# from to module cost +alias IBM-5347// IBM5347// +alias CP5347// IBM5347// +alias CSIBM5347// IBM5347// +module IBM5347// INTERNAL IBM5347 1 +module INTERNAL IBM5347// IBM5347 1 + +# from to module cost +alias IBM-9030// IBM9030// +alias CP9030// IBM9030// +alias CSIBM9030// IBM9030// +module IBM9030// INTERNAL IBM9030 1 +module INTERNAL IBM9030// IBM9030 1 + +# from to module cost +alias IBM-9066// IBM9066// +alias CP9066// IBM9066// +alias CSIBM9066// IBM9066// +module IBM9066// INTERNAL IBM9066 1 +module INTERNAL IBM9066// IBM9066 1 + +# from to module cost +alias IBM-9448// IBM9448// +alias CP9448// IBM9448// +alias CSIBM9448// IBM9448// +module IBM9448// INTERNAL IBM9448 1 +module INTERNAL IBM9448// IBM9448 1 + +# from to module cost +alias IBM-12712// IBM12712// +alias CP12712// IBM12712// +alias CSIBM12712// IBM12712// +module IBM12712// INTERNAL IBM12712 1 +module INTERNAL IBM12712// IBM12712 1 + +# from to module cost +alias IBM-16804// IBM16804// +alias CP16804// IBM16804// +alias CSIBM16804// IBM16804// +module IBM16804// INTERNAL IBM16804 1 +module INTERNAL IBM16804// IBM16804 1 + +# from to module cost +alias IBM-1364// IBM1364// +alias CP1364// IBM1364// +alias CSIBM1364// IBM1364// +module IBM1364// INTERNAL IBM1364 1 +module INTERNAL IBM1364// IBM1364 1 + +# from to module cost +alias IBM-1371// IBM1371// +alias CP1371// IBM1371// +alias CSIBM1371// IBM1371// +module IBM1371// INTERNAL IBM1371 1 +module INTERNAL IBM1371// IBM1371 1 + +# from to module cost +alias IBM-1388// IBM1388// +alias CP1388// IBM1388// +alias CSIBM1388// IBM1388// +module IBM1388// INTERNAL IBM1388 1 +module INTERNAL IBM1388// IBM1388 1 + +# from to module cost +alias IBM-1390// IBM1390// +alias CP1390// IBM1390// +alias CSIBM1390// IBM1390// +module IBM1390// INTERNAL IBM1390 1 +module INTERNAL IBM1390// IBM1390 1 + +# from to module cost +alias IBM-1399// IBM1399// +alias CP1399// IBM1399// +alias CSIBM1399// IBM1399// +module IBM1399// INTERNAL IBM1399 1 +module INTERNAL IBM1399// IBM1399 1 + +# from to module cost +alias ISO/TR_11548-1/ ISO_11548-1// +alias ISO11548-1// ISO_11548-1// +module ISO_11548-1// INTERNAL ISO_11548-1 1 +module INTERNAL ISO_11548-1// ISO_11548-1 1 + +# from to module cost +module MIK// INTERNAL MIK 1 +module INTERNAL MIK// MIK 1 + +# from to module cost +module BRF// INTERNAL BRF 1 +module INTERNAL BRF// BRF 1 + +# from to module cost +alias CP1282// MAC-CENTRALEUROPE// +module MAC-CENTRALEUROPE// INTERNAL MAC-CENTRALEUROPE 1 +module INTERNAL MAC-CENTRALEUROPE// MAC-CENTRALEUROPE 1 + +# from to module cost +module KOI8-RU// INTERNAL KOI8-RU 1 +module INTERNAL KOI8-RU// KOI8-RU 1 + +# from to module cost +alias ISO_8859-9E// ISO-8859-9E// +alias ISO8859-9E// ISO-8859-9E// +alias ISO88599E// ISO-8859-9E// +module ISO-8859-9E// INTERNAL ISO8859-9E 1 +module INTERNAL ISO-8859-9E// ISO8859-9E 1 + +# from to module cost +alias ROMAN9// HP-ROMAN9// +alias R9// HP-ROMAN9// +alias HPROMAN9// HP-ROMAN9// +module HP-ROMAN9// INTERNAL HP-ROMAN9 1 +module INTERNAL HP-ROMAN9// HP-ROMAN9 1 + +# from to module cost +alias TURKISH8// HP-TURKISH8// +alias HPTURKISH8// HP-TURKISH8// +alias OSF10010006// HP-TURKISH8// +module HP-TURKISH8// INTERNAL HP-TURKISH8 1 +module INTERNAL HP-TURKISH8// HP-TURKISH8 1 + +# from to module cost +alias THAI8// HP-THAI8// +alias HPTHAI8// HP-THAI8// +module HP-THAI8// INTERNAL HP-THAI8 1 +module INTERNAL HP-THAI8// HP-THAI8 1 + +# from to module cost +alias HPGREEK8// HP-GREEK8// +alias OSF10010004// HP-GREEK8// +module HP-GREEK8// INTERNAL HP-GREEK8 1 +module INTERNAL HP-GREEK8// HP-GREEK8 1 diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libCNS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libCNS.so new file mode 100644 index 0000000..db577cf Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libCNS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libGB.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libGB.so new file mode 100644 index 0000000..a69d8e0 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libGB.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libISOIR165.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libISOIR165.so new file mode 100644 index 0000000..62fc2bb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libISOIR165.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libJIS.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libJIS.so new file mode 100644 index 0000000..87e96a7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libJIS.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libJISX0213.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libJISX0213.so new file mode 100644 index 0000000..79e4c3c Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libJISX0213.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libKSC.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libKSC.so new file mode 100644 index 0000000..998c7cf Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/gconv/libKSC.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 new file mode 100755 index 0000000..a9d72b7 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libBrokenLocale.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libBrokenLocale.so.1 new file mode 100644 index 0000000..95cf89b Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libBrokenLocale.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libanl.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libanl.so.1 new file mode 100644 index 0000000..8130665 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libanl.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libc.so.6 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libc.so.6 new file mode 100755 index 0000000..6051c85 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libc.so.6 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libcrypt.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libcrypt.so.1 new file mode 120000 index 0000000..71c2362 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libcrypt.so.1 @@ -0,0 +1 @@ +libcrypt.so.1.1.0 \ No newline at end of file diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0 new file mode 100644 index 0000000..83a3930 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libdl.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libdl.so.2 new file mode 100644 index 0000000..e45d69a Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libdl.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libgcc_s.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libgcc_s.so.1 new file mode 100644 index 0000000..ada60d5 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libgcc_s.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libm.so.6 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libm.so.6 new file mode 100644 index 0000000..04cd12e Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libm.so.6 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libmemusage.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libmemusage.so new file mode 100644 index 0000000..bf4ba46 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libmemusage.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libmvec.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libmvec.so.1 new file mode 100644 index 0000000..e0d3429 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libmvec.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnsl.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnsl.so.1 new file mode 100644 index 0000000..6029554 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnsl.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_compat.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_compat.so.2 new file mode 100644 index 0000000..fb412f9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_compat.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_dns.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_dns.so.2 new file mode 100644 index 0000000..e998a83 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_dns.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_files.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_files.so.2 new file mode 100644 index 0000000..b70af2d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_files.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_hesiod.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_hesiod.so.2 new file mode 100644 index 0000000..c00e676 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libnss_hesiod.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libpcprofile.so b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libpcprofile.so new file mode 100644 index 0000000..bd8eda2 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libpcprofile.so differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libpthread.so.0 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libpthread.so.0 new file mode 100644 index 0000000..0fc8563 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libpthread.so.0 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libresolv.so.2 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libresolv.so.2 new file mode 100644 index 0000000..c047de9 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libresolv.so.2 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/librt.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/librt.so.1 new file mode 100644 index 0000000..632c53d Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/librt.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libstdc++.so.6 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libstdc++.so.6 new file mode 120000 index 0000000..8909ac8 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libstdc++.so.6 @@ -0,0 +1 @@ +libstdc++.so.6.0.33 \ No newline at end of file diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33 new file mode 100644 index 0000000..c6abbb4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libthread_db.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libthread_db.so.1 new file mode 100644 index 0000000..0d8c3d4 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libthread_db.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libutil.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libutil.so.1 new file mode 100644 index 0000000..7293d6f Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libutil.so.1 differ diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libz.so.1 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libz.so.1 new file mode 120000 index 0000000..5b37d30 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libz.so.1 @@ -0,0 +1 @@ +libz.so.1.3 \ No newline at end of file diff --git a/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libz.so.1.3 b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libz.so.1.3 new file mode 100644 index 0000000..4946edb Binary files /dev/null and b/squashfs-root/runtime/compat/usr/lib/x86_64-linux-gnu/libz.so.1.3 differ diff --git a/squashfs-root/runtime/compat/usr/lib64/ld-linux-x86-64.so.2 b/squashfs-root/runtime/compat/usr/lib64/ld-linux-x86-64.so.2 new file mode 120000 index 0000000..797a5e5 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/lib64/ld-linux-x86-64.so.2 @@ -0,0 +1 @@ +../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 \ No newline at end of file diff --git a/squashfs-root/runtime/compat/usr/share/doc/libc6/NEWS.Debian.gz b/squashfs-root/runtime/compat/usr/share/doc/libc6/NEWS.Debian.gz new file mode 100644 index 0000000..a197713 Binary files /dev/null and b/squashfs-root/runtime/compat/usr/share/doc/libc6/NEWS.Debian.gz differ diff --git a/squashfs-root/runtime/compat/usr/share/doc/libc6/NEWS.gz b/squashfs-root/runtime/compat/usr/share/doc/libc6/NEWS.gz new file mode 100644 index 0000000..730c4ea Binary files /dev/null and b/squashfs-root/runtime/compat/usr/share/doc/libc6/NEWS.gz differ diff --git a/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/__init__.py b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/__init__.py @@ -0,0 +1 @@ + diff --git a/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/__init__.py b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/__init__.py new file mode 100644 index 0000000..f40acd9 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/__init__.py @@ -0,0 +1,31 @@ +# Copyright (C) 2014-2024 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Load the xmethods if GDB supports them. +def gdb_has_xmethods(): + try: + import gdb.xmethod + return True + except ImportError: + return False + +def register_libstdcxx_printers(obj): + # Load the pretty-printers. + from .printers import register_libstdcxx_printers + register_libstdcxx_printers(obj) + + if gdb_has_xmethods(): + from .xmethods import register_libstdcxx_xmethods + register_libstdcxx_xmethods(obj) diff --git a/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/printers.py b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/printers.py new file mode 100644 index 0000000..a6c2ed4 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/printers.py @@ -0,0 +1,3003 @@ +# Pretty-printers for libstdc++. + +# Copyright (C) 2008-2024 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import gdb +import itertools +import re +import sys +import errno +import datetime + +# Python 2 + Python 3 compatibility code + +# Resources about compatibility: +# +# * : Documentation of the "six" module + +# FIXME: The handling of e.g. std::basic_string (at least on char) +# probably needs updating to work with Python 3's new string rules. +# +# In particular, Python 3 has a separate type (called byte) for +# bytestrings, and a special b"" syntax for the byte literals; the old +# str() type has been redefined to always store Unicode text. +# +# We probably can't do much about this until this GDB PR is addressed: +# + +if sys.version_info[0] > 2: + # Python 3 stuff + Iterator = object + # Python 3 folds these into the normal functions. + imap = map + izip = zip + # Also, int subsumes long + long = int + _utc_timezone = datetime.timezone.utc +else: + # Python 2 stuff + class Iterator: + """Compatibility mixin for iterators + + Instead of writing next() methods for iterators, write + __next__() methods and use this mixin to make them work in + Python 2 as well as Python 3. + + Idea stolen from the "six" documentation: + + """ + + def next(self): + return self.__next__() + + # In Python 2, we still need these from itertools + from itertools import imap, izip + + # Python 2 does not provide the datetime.UTC singleton. + class UTC(datetime.tzinfo): + """Concrete tzinfo class representing the UTC time zone.""" + + def utcoffset(self, dt): + return datetime.timedelta(0) + + def tzname(self, dt): + return "UTC" + + def dst(self, dt): + return datetime.timedelta(0) + _utc_timezone = UTC() + +# Try to use the new-style pretty-printing if available. +_use_gdb_pp = True +try: + import gdb.printing +except ImportError: + _use_gdb_pp = False + +# Try to install type-printers. +_use_type_printing = False +try: + import gdb.types + if hasattr(gdb.types, 'TypePrinter'): + _use_type_printing = True +except ImportError: + pass + +# Use the base class if available. +if hasattr(gdb, 'ValuePrinter'): + printer_base = gdb.ValuePrinter +else: + printer_base = object + +# Starting with the type ORIG, search for the member type NAME. This +# handles searching upward through superclasses. This is needed to +# work around http://sourceware.org/bugzilla/show_bug.cgi?id=13615. + + +def find_type(orig, name): + typ = orig.strip_typedefs() + while True: + # Use Type.tag to ignore cv-qualifiers. PR 67440. + search = '%s::%s' % (typ.tag, name) + try: + return gdb.lookup_type(search) + except RuntimeError: + pass + # The type was not found, so try the superclass. We only need + # to check the first superclass, so we don't bother with + # anything fancier here. + fields = typ.fields() + if len(fields) and fields[0].is_base_class: + typ = fields[0].type + else: + raise ValueError("Cannot find type %s::%s" % (str(orig), name)) + + +_versioned_namespace = '__8::' + + +def lookup_templ_spec(templ, *args): + """ + Lookup template specialization templ. + """ + t = '{}<{}>'.format(templ, ', '.join([str(a) for a in args])) + try: + return gdb.lookup_type(t) + except gdb.error as e: + # Type not found, try again in versioned namespace. + global _versioned_namespace + if _versioned_namespace not in templ: + t = t.replace('::', '::' + _versioned_namespace, 1) + try: + return gdb.lookup_type(t) + except gdb.error: + # If that also fails, rethrow the original exception + pass + raise e + +# Use this to find container node types instead of find_type, +# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91997 for details. +def lookup_node_type(nodename, containertype): + """ + Lookup specialization of template nodename corresponding to containertype. + + nodename - The name of a class template, as a String + containertype - The container, as a gdb.Type + + Return a gdb.Type for the corresponding specialization of nodename, + or None if the type cannot be found. + + e.g. lookup_node_type('_List_node', gdb.lookup_type('std::list')) + will return a gdb.Type for the type std::_List_node. + """ + # If nodename is unqualified, assume it's in namespace std. + if '::' not in nodename: + nodename = 'std::' + nodename + # Use either containertype's value_type or its first template argument. + try: + valtype = find_type(containertype, 'value_type') + except: + valtype = containertype.template_argument(0) + valtype = valtype.strip_typedefs() + try: + return lookup_templ_spec(nodename, valtype) + except gdb.error: + # For debug mode containers the node is in std::__cxx1998. + if is_member_of_namespace(nodename, 'std'): + if is_member_of_namespace(containertype, 'std::__cxx1998', + 'std::__debug', '__gnu_debug'): + nodename = nodename.replace('::', '::__cxx1998::', 1) + try: + return lookup_templ_spec(nodename, valtype) + except gdb.error: + pass + return None + + +def is_member_of_namespace(typ, *namespaces): + """ + Test whether a type is a member of one of the specified namespaces. + The type can be specified as a string or a gdb.Type object. + """ + if isinstance(typ, gdb.Type): + typ = str(typ) + typ = strip_versioned_namespace(typ) + for namespace in namespaces: + if typ.startswith(namespace + '::'): + return True + return False + + +def is_specialization_of(x, template_name): + """ + Test whether a type is a specialization of the named class template. + The type can be specified as a string or a gdb.Type object. + The template should be the name of a class template as a string, + without any 'std' qualification. + """ + global _versioned_namespace + if isinstance(x, gdb.Type): + x = x.tag + template_name = '(%s)?%s' % (_versioned_namespace, template_name) + return re.match('^std::%s<.*>$' % template_name, x) is not None + + +def strip_versioned_namespace(typename): + global _versioned_namespace + return typename.replace(_versioned_namespace, '') + + +def strip_inline_namespaces(type_str): + """Remove known inline namespaces from the canonical name of a type.""" + type_str = strip_versioned_namespace(type_str) + type_str = type_str.replace('std::__cxx11::', 'std::') + expt_ns = 'std::experimental::' + for lfts_ns in ('fundamentals_v1', 'fundamentals_v2'): + type_str = type_str.replace(expt_ns + lfts_ns + '::', expt_ns) + fs_ns = expt_ns + 'filesystem::' + type_str = type_str.replace(fs_ns + 'v1::', fs_ns) + return type_str + + +def get_template_arg_list(type_obj): + """Return a type's template arguments as a list.""" + n = 0 + template_args = [] + while True: + try: + template_args.append(type_obj.template_argument(n)) + except: + return template_args + n += 1 + + +class SmartPtrIterator(Iterator): + """An iterator for smart pointer types with a single 'child' value.""" + + def __init__(self, val): + self._val = val + + def __iter__(self): + return self + + def __next__(self): + if self._val is None: + raise StopIteration + self._val, val = None, self._val + return ('get()', val) + + +class SharedPointerPrinter(printer_base): + """ + Print a shared_ptr, weak_ptr, atomic, or atomic. + """ + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + self._pointer = val['_M_ptr'] + + def children(self): + return SmartPtrIterator(self._pointer) + + # Return the _Sp_counted_base<>* that holds the refcounts. + def _get_refcounts(self): + if self._typename == 'std::atomic': + # A tagged pointer is stored as uintptr_t. + ptr_val = self._val['_M_refcount']['_M_val']['_M_i'] + ptr_val = ptr_val - (ptr_val % 2) # clear lock bit + ptr_type = find_type(self._val['_M_refcount'].type, 'pointer') + return ptr_val.cast(ptr_type) + return self._val['_M_refcount']['_M_pi'] + + def to_string(self): + state = 'empty' + refcounts = self._get_refcounts() + targ = self._val.type.template_argument(0) + targ = strip_versioned_namespace(str(targ)) + + if refcounts != 0: + usecount = refcounts['_M_use_count'] + weakcount = refcounts['_M_weak_count'] + if usecount == 0: + state = 'expired, weak count %d' % weakcount + else: + state = 'use count %d, weak count %d' % ( + usecount, weakcount - 1) + return '%s<%s> (%s)' % (self._typename, targ, state) + + +def _tuple_impl_get(val): + """Return the tuple element stored in a _Tuple_impl base class.""" + bases = val.type.fields() + if not bases[-1].is_base_class: + raise ValueError( + "Unsupported implementation for std::tuple: %s" % str(val.type)) + # Get the _Head_base base class: + head_base = val.cast(bases[-1].type) + fields = head_base.type.fields() + if len(fields) == 0: + raise ValueError( + "Unsupported implementation for std::tuple: %s" % str(val.type)) + if fields[0].name == '_M_head_impl': + # The tuple element is the _Head_base::_M_head_impl data member. + return head_base['_M_head_impl'] + elif fields[0].is_base_class: + # The tuple element is an empty base class of _Head_base. + # Cast to that empty base class. + return head_base.cast(fields[0].type) + else: + raise ValueError( + "Unsupported implementation for std::tuple: %s" % str(val.type)) + + +def tuple_get(n, val): + """Return the result of std::get(val) on a std::tuple.""" + tuple_size = len(get_template_arg_list(val.type)) + if n > tuple_size: + raise ValueError("Out of range index for std::get on std::tuple") + # Get the first _Tuple_impl<0, T...> base class: + node = val.cast(val.type.fields()[0].type) + while n > 0: + # Descend through the base classes until the Nth one. + node = node.cast(node.type.fields()[0].type) + n -= 1 + return _tuple_impl_get(node) + + +def unique_ptr_get(val): + """Return the result of val.get() on a std::unique_ptr.""" + # std::unique_ptr contains a std::tuple, + # either as a direct data member _M_t (the old implementation) + # or within a data member of type __uniq_ptr_data. + impl_type = val.type.fields()[0].type.strip_typedefs() + # Check for new implementations first: + if is_specialization_of(impl_type, '__uniq_ptr_data') \ + or is_specialization_of(impl_type, '__uniq_ptr_impl'): + tuple_member = val['_M_t']['_M_t'] + elif is_specialization_of(impl_type, 'tuple'): + tuple_member = val['_M_t'] + else: + raise ValueError( + "Unsupported implementation for unique_ptr: %s" % str(impl_type)) + return tuple_get(0, tuple_member) + + +class UniquePointerPrinter(printer_base): + """Print a unique_ptr.""" + + def __init__(self, typename, val): + self._val = val + + def children(self): + return SmartPtrIterator(unique_ptr_get(self._val)) + + def to_string(self): + t = self._val.type.template_argument(0) + return 'std::unique_ptr<{}>'.format(str(t)) + + +def get_value_from_aligned_membuf(buf, valtype): + """Return the value held in a __gnu_cxx::__aligned_membuf.""" + return buf['_M_storage'].address.cast(valtype.pointer()).dereference() + + +def get_value_from_list_node(node): + """Return the value held in an _List_node<_Val>.""" + try: + member = node.type.fields()[1].name + if member == '_M_data': + # C++03 implementation, node contains the value as a member + return node['_M_data'] + elif member == '_M_storage': + # C++11 implementation, node stores value in __aligned_membuf + valtype = node.type.template_argument(0) + return get_value_from_aligned_membuf(node['_M_storage'], valtype) + except: + pass + raise ValueError("Unsupported implementation for %s" % str(node.type)) + + +class StdListPrinter(printer_base): + """Print a std::list.""" + + class _iterator(Iterator): + def __init__(self, nodetype, head): + self._nodetype = nodetype + self._base = head['_M_next'] + self._head = head.address + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + if self._base == self._head: + raise StopIteration + elt = self._base.cast(self._nodetype).dereference() + self._base = elt['_M_next'] + count = self._count + self._count = self._count + 1 + val = get_value_from_list_node(elt) + return ('[%d]' % count, val) + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def children(self): + nodetype = lookup_node_type('_List_node', self._val.type).pointer() + return self._iterator(nodetype, self._val['_M_impl']['_M_node']) + + def to_string(self): + headnode = self._val['_M_impl']['_M_node'] + if headnode['_M_next'] == headnode.address: + return 'empty %s' % (self._typename) + return '%s' % (self._typename) + + +class NodeIteratorPrinter(printer_base): + def __init__(self, typename, val, contname, nodename): + self._val = val + self._typename = typename + self._contname = contname + self._nodetype = lookup_node_type(nodename, val.type) + + def to_string(self): + if not self._val['_M_node']: + return 'non-dereferenceable iterator for std::%s' % (self._contname) + node = self._val['_M_node'].cast( + self._nodetype.pointer()).dereference() + return str(get_value_from_list_node(node)) + + +class StdListIteratorPrinter(NodeIteratorPrinter): + """Print std::list::iterator.""" + + def __init__(self, typename, val): + NodeIteratorPrinter.__init__(self, typename, val, 'list', '_List_node') + + +class StdFwdListIteratorPrinter(NodeIteratorPrinter): + """Print std::forward_list::iterator.""" + + def __init__(self, typename, val): + NodeIteratorPrinter.__init__(self, typename, val, 'forward_list', + '_Fwd_list_node') + + +class StdSlistPrinter(printer_base): + """Print a __gnu_cxx::slist.""" + + class _iterator(Iterator): + def __init__(self, nodetype, head): + self._nodetype = nodetype + self._base = head['_M_head']['_M_next'] + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + if self._base == 0: + raise StopIteration + elt = self._base.cast(self._nodetype).dereference() + self._base = elt['_M_next'] + count = self._count + self._count = self._count + 1 + return ('[%d]' % count, elt['_M_data']) + + def __init__(self, typename, val): + self._val = val + + def children(self): + nodetype = lookup_node_type('__gnu_cxx::_Slist_node', self._val.type) + return self._iterator(nodetype.pointer(), self._val) + + def to_string(self): + if self._val['_M_head']['_M_next'] == 0: + return 'empty __gnu_cxx::slist' + return '__gnu_cxx::slist' + + +class StdSlistIteratorPrinter(printer_base): + """Print __gnu_cxx::slist::iterator.""" + + def __init__(self, typename, val): + self._val = val + + def to_string(self): + if not self._val['_M_node']: + return 'non-dereferenceable iterator for __gnu_cxx::slist' + nodetype = lookup_node_type( + '__gnu_cxx::_Slist_node', self._val.type).pointer() + return str(self._val['_M_node'].cast(nodetype).dereference()['_M_data']) + + +class StdVectorPrinter(printer_base): + """Print a std::vector.""" + + class _iterator(Iterator): + def __init__(self, start, finish, bitvec): + self._bitvec = bitvec + if bitvec: + self._item = start['_M_p'] + self._so = 0 + self._finish = finish['_M_p'] + self._fo = finish['_M_offset'] + itype = self._item.dereference().type + self._isize = 8 * itype.sizeof + else: + self._item = start + self._finish = finish + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + count = self._count + self._count = self._count + 1 + if self._bitvec: + if self._item == self._finish and self._so >= self._fo: + raise StopIteration + elt = bool(self._item.dereference() & (1 << self._so)) + self._so = self._so + 1 + if self._so >= self._isize: + self._item = self._item + 1 + self._so = 0 + return ('[%d]' % count, elt) + else: + if self._item == self._finish: + raise StopIteration + elt = self._item.dereference() + self._item = self._item + 1 + return ('[%d]' % count, elt) + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + self._is_bool = val.type.template_argument( + 0).code == gdb.TYPE_CODE_BOOL + + def children(self): + return self._iterator(self._val['_M_impl']['_M_start'], + self._val['_M_impl']['_M_finish'], + self._is_bool) + + def to_string(self): + start = self._val['_M_impl']['_M_start'] + finish = self._val['_M_impl']['_M_finish'] + end = self._val['_M_impl']['_M_end_of_storage'] + if self._is_bool: + start = self._val['_M_impl']['_M_start']['_M_p'] + finish = self._val['_M_impl']['_M_finish']['_M_p'] + fo = self._val['_M_impl']['_M_finish']['_M_offset'] + itype = start.dereference().type + bl = 8 * itype.sizeof + length = bl * (finish - start) + fo + capacity = bl * (end - start) + return ('%s of length %d, capacity %d' + % (self._typename, int(length), int(capacity))) + else: + return ('%s of length %d, capacity %d' + % (self._typename, int(finish - start), int(end - start))) + + def display_hint(self): + return 'array' + + +class StdVectorIteratorPrinter(printer_base): + """Print std::vector::iterator.""" + + def __init__(self, typename, val): + self._val = val + + def to_string(self): + if not self._val['_M_current']: + return 'non-dereferenceable iterator for std::vector' + return str(self._val['_M_current'].dereference()) + + +class StdBitIteratorPrinter(printer_base): + """Print std::vector's _Bit_iterator and _Bit_const_iterator.""" + + def __init__(self, typename, val): + self._val = val + + def to_string(self): + if not self._val['_M_p']: + return 'non-dereferenceable iterator for std::vector' + return bool(self._val['_M_p'].dereference() + & (1 << self._val['_M_offset'])) + + +class StdBitReferencePrinter(printer_base): + """Print std::vector::reference.""" + + def __init__(self, typename, val): + self._val = val + + def to_string(self): + if not self._val['_M_p']: + return 'invalid std::vector::reference' + return bool(self._val['_M_p'].dereference() & (self._val['_M_mask'])) + + +class StdTuplePrinter(printer_base): + """Print a std::tuple.""" + + class _iterator(Iterator): + @staticmethod + def _is_nonempty_tuple(nodes): + if len(nodes) == 2: + if is_specialization_of(nodes[1].type, '__tuple_base'): + return True + elif len(nodes) == 1: + return True + elif len(nodes) == 0: + return False + raise ValueError( + "Top of tuple tree does not consist of a single node.") + + def __init__(self, head): + self._head = head + + # Set the base class as the initial head of the + # tuple. + nodes = self._head.type.fields() + if self._is_nonempty_tuple(nodes): + # Set the actual head to the first pair. + self._head = self._head.cast(nodes[0].type) + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + # Check for further recursions in the inheritance tree. + # For a GCC 5+ tuple self._head is None after visiting all nodes: + if not self._head: + raise StopIteration + nodes = self._head.type.fields() + # For a GCC 4.x tuple there is a final node with no fields: + if len(nodes) == 0: + raise StopIteration + # Check that this iteration has an expected structure. + if len(nodes) > 2: + raise ValueError( + "Cannot parse more than 2 nodes in a tuple tree.") + + if len(nodes) == 1: + # This is the last node of a GCC 5+ std::tuple. + impl = self._head.cast(nodes[0].type) + self._head = None + else: + # Either a node before the last node, or the last node of + # a GCC 4.x tuple (which has an empty parent). + + # - Left node is the next recursion parent. + # - Right node is the actual class contained in the tuple. + + # Process right node. + impl = self._head.cast(nodes[1].type) + + # Process left node and set it as head. + self._head = self._head.cast(nodes[0].type) + + self._count = self._count + 1 + + # Finally, check the implementation. If it is + # wrapped in _M_head_impl return that, otherwise return + # the value "as is". + fields = impl.type.fields() + if len(fields) < 1 or fields[0].name != "_M_head_impl": + return ('[%d]' % (self._count - 1), impl) + else: + return ('[%d]' % (self._count - 1), impl['_M_head_impl']) + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def children(self): + return self._iterator(self._val) + + def to_string(self): + if len(self._val.type.fields()) == 0: + return 'empty %s' % (self._typename) + return '%s containing' % (self._typename) + + +class StdStackOrQueuePrinter(printer_base): + """Print a std::stack or std::queue.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._visualizer = gdb.default_visualizer(val['c']) + + def children(self): + return self._visualizer.children() + + def to_string(self): + return '%s wrapping: %s' % (self._typename, + self._visualizer.to_string()) + + def display_hint(self): + if hasattr(self._visualizer, 'display_hint'): + return self._visualizer.display_hint() + return None + + +class RbtreeIterator(Iterator): + """ + Turn an RB-tree-based container (std::map, std::set etc.) into + a Python iterable object. + """ + + def __init__(self, rbtree): + self._size = rbtree['_M_t']['_M_impl']['_M_node_count'] + self._node = rbtree['_M_t']['_M_impl']['_M_header']['_M_left'] + self._count = 0 + + def __iter__(self): + return self + + def __len__(self): + return int(self._size) + + def __next__(self): + if self._count == self._size: + raise StopIteration + result = self._node + self._count = self._count + 1 + if self._count < self._size: + # Compute the next node. + node = self._node + if node.dereference()['_M_right']: + node = node.dereference()['_M_right'] + while node.dereference()['_M_left']: + node = node.dereference()['_M_left'] + else: + parent = node.dereference()['_M_parent'] + while node == parent.dereference()['_M_right']: + node = parent + parent = parent.dereference()['_M_parent'] + if node.dereference()['_M_right'] != parent: + node = parent + self._node = node + return result + + +def get_value_from_Rb_tree_node(node): + """Return the value held in an _Rb_tree_node<_Val>.""" + try: + member = node.type.fields()[1].name + if member == '_M_value_field': + # C++03 implementation, node contains the value as a member + return node['_M_value_field'] + elif member == '_M_storage': + # C++11 implementation, node stores value in __aligned_membuf + valtype = node.type.template_argument(0) + return get_value_from_aligned_membuf(node['_M_storage'], valtype) + except: + pass + raise ValueError("Unsupported implementation for %s" % str(node.type)) + +# This is a pretty printer for std::_Rb_tree_iterator (which is +# std::map::iterator), and has nothing to do with the RbtreeIterator +# class above. + + +class StdRbtreeIteratorPrinter(printer_base): + """Print std::map::iterator, std::set::iterator, etc.""" + + def __init__(self, typename, val): + self._val = val + nodetype = lookup_node_type('_Rb_tree_node', self._val.type) + self._link_type = nodetype.pointer() + + def to_string(self): + if not self._val['_M_node']: + return 'non-dereferenceable iterator for associative container' + node = self._val['_M_node'].cast(self._link_type).dereference() + return str(get_value_from_Rb_tree_node(node)) + + +class StdDebugIteratorPrinter(printer_base): + """Print a debug enabled version of an iterator.""" + + def __init__(self, typename, val): + self._val = val + + # Just strip away the encapsulating __gnu_debug::_Safe_iterator + # and return the wrapped iterator value. + def to_string(self): + base_type = gdb.lookup_type('__gnu_debug::_Safe_iterator_base') + itype = self._val.type.template_argument(0) + safe_seq = self._val.cast(base_type)['_M_sequence'] + if not safe_seq: + return str(self._val.cast(itype)) + if self._val['_M_version'] != safe_seq['_M_version']: + return "invalid iterator" + return str(self._val.cast(itype)) + + +def num_elements(num): + """Return either "1 element" or "N elements" depending on the argument.""" + return '1 element' if num == 1 else '%d elements' % num + + +class StdMapPrinter(printer_base): + """Print a std::map or std::multimap.""" + + # Turn an RbtreeIterator into a pretty-print iterator. + class _iter(Iterator): + def __init__(self, rbiter, type): + self._rbiter = rbiter + self._count = 0 + self._type = type + + def __iter__(self): + return self + + def __next__(self): + if self._count % 2 == 0: + n = next(self._rbiter) + n = n.cast(self._type).dereference() + n = get_value_from_Rb_tree_node(n) + self._pair = n + item = n['first'] + else: + item = self._pair['second'] + result = ('[%d]' % self._count, item) + self._count = self._count + 1 + return result + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + return '%s with %s' % (self._typename, + num_elements(len(RbtreeIterator(self._val)))) + + def children(self): + node = lookup_node_type('_Rb_tree_node', self._val.type).pointer() + return self._iter(RbtreeIterator(self._val), node) + + def display_hint(self): + return 'map' + + +class StdSetPrinter(printer_base): + """Print a std::set or std::multiset.""" + + # Turn an RbtreeIterator into a pretty-print iterator. + class _iter(Iterator): + def __init__(self, rbiter, type): + self._rbiter = rbiter + self._count = 0 + self._type = type + + def __iter__(self): + return self + + def __next__(self): + item = next(self._rbiter) + item = item.cast(self._type).dereference() + item = get_value_from_Rb_tree_node(item) + # FIXME: this is weird ... what to do? + # Maybe a 'set' display hint? + result = ('[%d]' % self._count, item) + self._count = self._count + 1 + return result + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + return '%s with %s' % (self._typename, + num_elements(len(RbtreeIterator(self._val)))) + + def children(self): + node = lookup_node_type('_Rb_tree_node', self._val.type).pointer() + return self._iter(RbtreeIterator(self._val), node) + + +class StdBitsetPrinter(printer_base): + """Print a std::bitset.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + # If template_argument handled values, we could print the + # size. Or we could use a regexp on the type. + return '%s' % (self._typename) + + def children(self): + try: + # An empty bitset may not have any members which will + # result in an exception being thrown. + words = self._val['_M_w'] + except: + return [] + + wtype = words.type + + # The _M_w member can be either an unsigned long, or an + # array. This depends on the template specialization used. + # If it is a single long, convert to a single element list. + if wtype.code == gdb.TYPE_CODE_ARRAY: + tsize = wtype.target().sizeof + else: + words = [words] + tsize = wtype.sizeof + + nwords = wtype.sizeof / tsize + result = [] + byte = 0 + while byte < nwords: + w = words[byte] + bit = 0 + while w != 0: + if (w & 1) != 0: + # Another spot where we could use 'set'? + result.append(('[%d]' % (byte * tsize * 8 + bit), 1)) + bit = bit + 1 + w = w >> 1 + byte = byte + 1 + return result + + +class StdDequePrinter(printer_base): + """Print a std::deque.""" + + class _iter(Iterator): + def __init__(self, node, start, end, last, buffer_size): + self._node = node + self._p = start + self._end = end + self._last = last + self._buffer_size = buffer_size + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + if self._p == self._last: + raise StopIteration + + result = ('[%d]' % self._count, self._p.dereference()) + self._count = self._count + 1 + + # Advance the 'cur' pointer. + self._p = self._p + 1 + if self._p == self._end: + # If we got to the end of this bucket, move to the + # next bucket. + self._node = self._node + 1 + self._p = self._node[0] + self._end = self._p + self._buffer_size + + return result + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + self._elttype = val.type.template_argument(0) + size = self._elttype.sizeof + if size < 512: + self._buffer_size = int(512 / size) + else: + self._buffer_size = 1 + + def to_string(self): + start = self._val['_M_impl']['_M_start'] + end = self._val['_M_impl']['_M_finish'] + + delta_n = end['_M_node'] - start['_M_node'] - 1 + delta_s = start['_M_last'] - start['_M_cur'] + delta_e = end['_M_cur'] - end['_M_first'] + + size = self._buffer_size * delta_n + delta_s + delta_e + + return '%s with %s' % (self._typename, num_elements(long(size))) + + def children(self): + start = self._val['_M_impl']['_M_start'] + end = self._val['_M_impl']['_M_finish'] + return self._iter(start['_M_node'], start['_M_cur'], start['_M_last'], + end['_M_cur'], self._buffer_size) + + def display_hint(self): + return 'array' + + +class StdDequeIteratorPrinter(printer_base): + """Print std::deque::iterator.""" + + def __init__(self, typename, val): + self._val = val + + def to_string(self): + if not self._val['_M_cur']: + return 'non-dereferenceable iterator for std::deque' + return str(self._val['_M_cur'].dereference()) + + +class StdStringPrinter(printer_base): + """Print a std::basic_string of some kind.""" + + def __init__(self, typename, val): + self._val = val + self._new_string = typename.find("::__cxx11::basic_string") != -1 + + def to_string(self): + # Make sure &string works, too. + type = self._val.type + if type.code == gdb.TYPE_CODE_REF: + type = type.target() + + # Calculate the length of the string so that to_string returns + # the string according to length, not according to first null + # encountered. + ptr = self._val['_M_dataplus']['_M_p'] + if self._new_string: + length = self._val['_M_string_length'] + # https://sourceware.org/bugzilla/show_bug.cgi?id=17728 + ptr = ptr.cast(ptr.type.strip_typedefs()) + else: + realtype = type.unqualified().strip_typedefs() + reptype = gdb.lookup_type(str(realtype) + '::_Rep').pointer() + header = ptr.cast(reptype) - 1 + length = header.dereference()['_M_length'] + if hasattr(ptr, "lazy_string"): + return ptr.lazy_string(length=length) + return ptr.string(length=length) + + def display_hint(self): + return 'string' + + +def access_streambuf_ptrs(streambuf): + """Access the streambuf put area pointers.""" + pbase = streambuf['_M_out_beg'] + pptr = streambuf['_M_out_cur'] + egptr = streambuf['_M_in_end'] + return pbase, pptr, egptr + + +class StdStringBufPrinter(printer_base): + """Print a std::basic_stringbuf.""" + + def __init__(self, _, val): + self._val = val + + def to_string(self): + (pbase, pptr, egptr) = access_streambuf_ptrs(self._val) + # Logic from basic_stringbuf::_M_high_mark() + if pptr: + if not egptr or pptr > egptr: + return pbase.string(length=pptr - pbase) + else: + return pbase.string(length=egptr - pbase) + return self._val['_M_string'] + + def display_hint(self): + return 'string' + + +class StdStringStreamPrinter(printer_base): + """Print a std::basic_stringstream.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + + # Check if the stream was redirected. This is essentially: + # val['_M_streambuf'] != val['_M_stringbuf'].address + # However, GDB can't resolve the virtual inheritance, so we do that + # manually. + basetype = [f.type for f in val.type.fields() if f.is_base_class][0] + gdb.set_convenience_variable('__stream', val.cast(basetype).address) + self._streambuf = gdb.parse_and_eval('$__stream->rdbuf()') + self._was_redirected = self._streambuf != val['_M_stringbuf'].address + + def to_string(self): + if self._was_redirected: + return "%s redirected to %s" % ( + self._typename, self._streambuf.dereference()) + return self._val['_M_stringbuf'] + + def display_hint(self): + if self._was_redirected: + return None + return 'string' + + +class Tr1HashtableIterator(Iterator): + def __init__(self, hashtable): + self._buckets = hashtable['_M_buckets'] + self._bucket = 0 + self._bucket_count = hashtable['_M_bucket_count'] + self._node_type = find_type(hashtable.type, '_Node').pointer() + self._node = 0 + while self._bucket != self._bucket_count: + self._node = self._buckets[self._bucket] + if self._node: + break + self._bucket = self._bucket + 1 + + def __iter__(self): + return self + + def __next__(self): + if self._node == 0: + raise StopIteration + node = self._node.cast(self._node_type) + result = node.dereference()['_M_v'] + self._node = node.dereference()['_M_next'] + if self._node == 0: + self._bucket = self._bucket + 1 + while self._bucket != self._bucket_count: + self._node = self._buckets[self._bucket] + if self._node: + break + self._bucket = self._bucket + 1 + return result + + +class StdHashtableIterator(Iterator): + def __init__(self, hashtable): + self._node = hashtable['_M_before_begin']['_M_nxt'] + valtype = hashtable.type.template_argument(1) + cached = hashtable.type.template_argument(9).template_argument(0) + node_type = lookup_templ_spec('std::__detail::_Hash_node', str(valtype), + 'true' if cached else 'false') + self._node_type = node_type.pointer() + + def __iter__(self): + return self + + def __next__(self): + if self._node == 0: + raise StopIteration + elt = self._node.cast(self._node_type).dereference() + self._node = elt['_M_nxt'] + valptr = elt['_M_storage'].address + valptr = valptr.cast(elt.type.template_argument(0).pointer()) + return valptr.dereference() + + +class Tr1UnorderedSetPrinter(printer_base): + """Print a std::unordered_set or tr1::unordered_set.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def _hashtable(self): + if self._typename.startswith('std::tr1'): + return self._val + return self._val['_M_h'] + + def to_string(self): + count = self._hashtable()['_M_element_count'] + return '%s with %s' % (self._typename, num_elements(count)) + + @staticmethod + def _format_count(i): + return '[%d]' % i + + def children(self): + counter = imap(self._format_count, itertools.count()) + if self._typename.startswith('std::tr1'): + return izip(counter, Tr1HashtableIterator(self._hashtable())) + return izip(counter, StdHashtableIterator(self._hashtable())) + + +class Tr1UnorderedMapPrinter(printer_base): + """Print a std::unordered_map or tr1::unordered_map.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def _hashtable(self): + if self._typename.startswith('std::tr1'): + return self._val + return self._val['_M_h'] + + def to_string(self): + count = self._hashtable()['_M_element_count'] + return '%s with %s' % (self._typename, num_elements(count)) + + @staticmethod + def _flatten(list): + for elt in list: + for i in elt: + yield i + + @staticmethod + def _format_one(elt): + return (elt['first'], elt['second']) + + @staticmethod + def _format_count(i): + return '[%d]' % i + + def children(self): + counter = imap(self._format_count, itertools.count()) + # Map over the hash table and flatten the result. + if self._typename.startswith('std::tr1'): + data = self._flatten( + imap(self._format_one, Tr1HashtableIterator(self._hashtable()))) + # Zip the two iterators together. + return izip(counter, data) + data = self._flatten( + imap(self._format_one, StdHashtableIterator(self._hashtable()))) + # Zip the two iterators together. + return izip(counter, data) + + def display_hint(self): + return 'map' + + +class StdForwardListPrinter(printer_base): + """Print a std::forward_list.""" + + class _iterator(Iterator): + def __init__(self, nodetype, head): + self._nodetype = nodetype + self._base = head['_M_next'] + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + if self._base == 0: + raise StopIteration + elt = self._base.cast(self._nodetype).dereference() + self._base = elt['_M_next'] + count = self._count + self._count = self._count + 1 + valptr = elt['_M_storage'].address + valptr = valptr.cast(elt.type.template_argument(0).pointer()) + return ('[%d]' % count, valptr.dereference()) + + def __init__(self, typename, val): + self._val = val + self._typename = strip_versioned_namespace(typename) + + def children(self): + nodetype = lookup_node_type('_Fwd_list_node', self._val.type).pointer() + return self._iterator(nodetype, self._val['_M_impl']['_M_head']) + + def to_string(self): + if self._val['_M_impl']['_M_head']['_M_next'] == 0: + return 'empty %s' % self._typename + return '%s' % self._typename + + +class SingleObjContainerPrinter(printer_base): + """Base class for printers of containers of single objects.""" + + def __init__(self, val, viz, hint=None): + self._contained_value = val + self._visualizer = viz + self._hint = hint + + def _recognize(self, type): + """Return type as a string after applying type printers.""" + global _use_type_printing + if not _use_type_printing: + return str(type) + return gdb.types.apply_type_recognizers(gdb.types.get_type_recognizers(), + type) or str(type) + + class _contained(Iterator): + def __init__(self, val): + self._val = val + + def __iter__(self): + return self + + def __next__(self): + if self._val is None: + raise StopIteration + retval = self._val + self._val = None + return ('[contained value]', retval) + + def children(self): + if self._contained_value is None: + return self._contained(None) + if hasattr(self._visualizer, 'children'): + return self._visualizer.children() + return self._contained(self._contained_value) + + def display_hint(self): + if (hasattr(self._visualizer, 'children') + and hasattr(self._visualizer, 'display_hint')): + # If contained value is a map we want to display in the same way. + return self._visualizer.display_hint() + return self._hint + + +def function_pointer_to_name(f): + """Find the name of the function referred to by the gdb.Value f, + which should contain a function pointer from the program.""" + + # Turn the function pointer into an actual address. + # This is needed to unpack ppc64 function descriptors. + f = f.dereference().address + + if sys.version_info[0] == 2: + # Older versions of GDB need to use long for Python 2, + # because int(f) on 64-bit big-endian values raises a + # gdb.error saying "Cannot convert value to int." + f = long(f) + else: + f = int(f) + + try: + # If the function can't be found older versions of GDB raise a + # RuntimeError saying "Cannot locate object file for block." + return gdb.block_for_pc(f).function.name + except: + return None + + +class StdExpAnyPrinter(SingleObjContainerPrinter): + """Print a std::any or std::experimental::any.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._typename = re.sub(r'^std::experimental::fundamentals_v\d::', + 'std::experimental::', self._typename, 1) + self._val = val + self._contained_type = None + contained_value = None + visualizer = None + mgr = self._val['_M_manager'] + if mgr != 0: + func = function_pointer_to_name(mgr) + if not func: + raise ValueError( + "Invalid function pointer in %s" % (self._typename)) + # We want to use this regular expression: + # T::_Manager_xxx<.*>::_S_manage\(T::_Op, const T\*, T::_Arg\*\) + # where T is std::any or std::experimental::any. + # But we need to account for variances in demangled names + # between GDB versions, e.g. 'enum T::_Op' instead of 'T::_Op'. + rx = ( + r"({0}::_Manager_\w+<.*>)::_S_manage\(" + r"(enum )?{0}::_Op, (const {0}|{0} const) ?\*, " + r"(union )?{0}::_Arg ?\*\)" + ).format(typename) + m = re.match(rx, func) + if not m: + raise ValueError( + "Unknown manager function in %s" % self._typename) + + mgrname = m.group(1) + # FIXME need to expand 'std::string' so that gdb.lookup_type works + if 'std::string' in mgrname: + mgrtypes = [] + for s in StdExpAnyPrinter._string_types(): + try: + x = re.sub(r"std::string(?!\w)", s, m.group(1)) + # The following lookup might raise gdb.error if the + # manager function was never instantiated for 's' in + # the program, because there will be no such type. + mgrtypes.append(gdb.lookup_type(x)) + except gdb.error: + pass + if len(mgrtypes) != 1: + # FIXME: this is unlikely in practice, but possible for + # programs that use both old and new string types with + # std::any in a single program. Can we do better? + # Maybe find the address of each type's _S_manage and + # compare to the address stored in _M_manager? + raise ValueError( + 'Cannot uniquely determine std::string type ' + 'used in std::any' + ) + mgrtype = mgrtypes[0] + else: + mgrtype = gdb.lookup_type(mgrname) + self._contained_type = mgrtype.template_argument(0) + valptr = None + if '::_Manager_internal' in mgrname: + valptr = self._val['_M_storage']['_M_buffer'].address + elif '::_Manager_external' in mgrname: + valptr = self._val['_M_storage']['_M_ptr'] + else: + raise ValueError( + "Unknown manager function in %s" % self._typename) + contained_value = valptr.cast( + self._contained_type.pointer()).dereference() + visualizer = gdb.default_visualizer(contained_value) + super(StdExpAnyPrinter, self).__init__(contained_value, visualizer) + + def to_string(self): + if self._contained_type is None: + return '%s [no contained value]' % self._typename + desc = "%s containing " % self._typename + if hasattr(self._visualizer, 'children'): + return desc + self._visualizer.to_string() + valtype = self._recognize(self._contained_type) + return desc + strip_versioned_namespace(str(valtype)) + + @staticmethod + def _string_types(): + # This lookup for std::string might return the __cxx11 version, + # but that's not necessarily the one used by the std::any + # manager function we're trying to find. + strings = {str(gdb.lookup_type('std::string').strip_typedefs())} + # So also consider all the other possible std::string types! + s = 'basic_string, std::allocator >' + quals = ['std::', 'std::__cxx11::', + 'std::' + _versioned_namespace] + strings |= {q + s for q in quals} # set of unique strings + return strings + + +class StdExpOptionalPrinter(SingleObjContainerPrinter): + """Print a std::optional or std::experimental::optional.""" + + def __init__(self, typename, val): + typename = strip_versioned_namespace(typename) + self._typename = re.sub( + r'^std::(experimental::|)(fundamentals_v\d::|)(.*)', + r'std::\1\3', typename, 1) + payload = val['_M_payload'] + if self._typename.startswith('std::experimental'): + engaged = val['_M_engaged'] + contained_value = payload + else: + engaged = payload['_M_engaged'] + contained_value = payload['_M_payload'] + try: + # Since GCC 9 + contained_value = contained_value['_M_value'] + except: + pass + visualizer = gdb.default_visualizer(contained_value) + if not engaged: + contained_value = None + super(StdExpOptionalPrinter, self).__init__( + contained_value, visualizer) + + def to_string(self): + if self._contained_value is None: + return "%s [no contained value]" % self._typename + if hasattr(self._visualizer, 'children'): + return "%s containing %s" % (self._typename, + self._visualizer.to_string()) + return self._typename + + +class StdVariantPrinter(SingleObjContainerPrinter): + """Print a std::variant.""" + + def __init__(self, typename, val): + alternatives = get_template_arg_list(val.type) + self._typename = strip_versioned_namespace(typename) + self._index = val['_M_index'] + if self._index >= len(alternatives): + self._contained_type = None + contained_value = None + visualizer = None + else: + self._contained_type = alternatives[int(self._index)] + addr = val['_M_u']['_M_first']['_M_storage'].address + contained_value = addr.cast( + self._contained_type.pointer()).dereference() + visualizer = gdb.default_visualizer(contained_value) + super(StdVariantPrinter, self).__init__( + contained_value, visualizer, 'array') + + def to_string(self): + if self._contained_value is None: + return "%s [no contained value]" % self._typename + if hasattr(self._visualizer, 'children'): + return "%s [index %d] containing %s" % (self._typename, self._index, + self._visualizer.to_string()) + return "%s [index %d]" % (self._typename, self._index) + + +class StdNodeHandlePrinter(SingleObjContainerPrinter): + """Print a container node handle.""" + + def __init__(self, typename, val): + self._value_type = val.type.template_argument(1) + nodetype = val.type.template_argument(2).template_argument(0) + self._is_rb_tree_node = is_specialization_of( + nodetype.name, '_Rb_tree_node') + self._is_map_node = val.type.template_argument(0) != self._value_type + nodeptr = val['_M_ptr'] + if nodeptr: + if self._is_rb_tree_node: + contained_value = get_value_from_Rb_tree_node( + nodeptr.dereference()) + else: + contained_value = get_value_from_aligned_membuf(nodeptr['_M_storage'], + self._value_type) + visualizer = gdb.default_visualizer(contained_value) + else: + contained_value = None + visualizer = None + optalloc = val['_M_alloc'] + self._alloc = optalloc['_M_payload'] if optalloc['_M_engaged'] else None + super(StdNodeHandlePrinter, self).__init__(contained_value, visualizer, + 'array') + + def to_string(self): + desc = 'node handle for ' + if not self._is_rb_tree_node: + desc += 'unordered ' + if self._is_map_node: + desc += 'map' + else: + desc += 'set' + + if self._contained_value: + desc += ' with element' + if hasattr(self._visualizer, 'children'): + return "%s = %s" % (desc, self._visualizer.to_string()) + return desc + else: + return 'empty %s' % desc + + +class StdExpStringViewPrinter(printer_base): + """ + Print a std::basic_string_view or std::experimental::basic_string_view + """ + + def __init__(self, typename, val): + self._val = val + + def to_string(self): + ptr = self._val['_M_str'] + len = self._val['_M_len'] + if hasattr(ptr, "lazy_string"): + return ptr.lazy_string(length=len) + return ptr.string(length=len) + + def display_hint(self): + return 'string' + + +class StdExpPathPrinter(printer_base): + """Print a std::experimental::filesystem::path.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + start = self._val['_M_cmpts']['_M_impl']['_M_start'] + finish = self._val['_M_cmpts']['_M_impl']['_M_finish'] + self._num_cmpts = int(finish - start) + + def _path_type(self): + t = str(self._val['_M_type']) + if t[-9:] == '_Root_dir': + return "root-directory" + if t[-10:] == '_Root_name': + return "root-name" + return None + + def to_string(self): + path = "%s" % self._val['_M_pathname'] + if self._num_cmpts == 0: + t = self._path_type() + if t: + path = '%s [%s]' % (path, t) + return "experimental::filesystem::path %s" % path + + class _iterator(Iterator): + def __init__(self, cmpts, pathtype): + self._pathtype = pathtype + self._item = cmpts['_M_impl']['_M_start'] + self._finish = cmpts['_M_impl']['_M_finish'] + self._count = 0 + + def __iter__(self): + return self + + def __next__(self): + if self._item == self._finish: + raise StopIteration + item = self._item.dereference() + count = self._count + self._count = self._count + 1 + self._item = self._item + 1 + path = item['_M_pathname'] + t = StdExpPathPrinter(self._pathtype, item)._path_type() + if not t: + t = count + return ('[%s]' % t, path) + + def children(self): + return self._iterator(self._val['_M_cmpts'], self._typename) + + +class StdPathPrinter(printer_base): + """Print a std::filesystem::path.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + impl = unique_ptr_get(self._val['_M_cmpts']['_M_impl']) + self._type = impl.cast(gdb.lookup_type('uintptr_t')) & 3 + if self._type == 0: + self._impl = impl + else: + self._impl = None + + def _path_type(self): + t = str(self._type.cast(gdb.lookup_type(self._typename + '::_Type'))) + if t[-9:] == '_Root_dir': + return "root-directory" + if t[-10:] == '_Root_name': + return "root-name" + return None + + def to_string(self): + path = "%s" % self._val['_M_pathname'] + if self._type != 0: + t = self._path_type() + if t: + path = '%s [%s]' % (path, t) + return "filesystem::path %s" % path + + class _iterator(Iterator): + def __init__(self, impl, pathtype): + self._pathtype = pathtype + if impl: + # We can't access _Impl::_M_size because _Impl is incomplete + # so cast to int* to access the _M_size member at offset zero, + int_type = gdb.lookup_type('int') + cmpt_type = gdb.lookup_type(pathtype + '::_Cmpt') + char_type = gdb.lookup_type('char') + impl = impl.cast(int_type.pointer()) + size = impl.dereference() + #self._capacity = (impl + 1).dereference() + if hasattr(gdb.Type, 'alignof'): + sizeof_Impl = max(2 * int_type.sizeof, cmpt_type.alignof) + else: + sizeof_Impl = 2 * int_type.sizeof + begin = impl.cast(char_type.pointer()) + sizeof_Impl + self._item = begin.cast(cmpt_type.pointer()) + self._finish = self._item + size + self._count = 0 + else: + self._item = None + self._finish = None + + def __iter__(self): + return self + + def __next__(self): + if self._item == self._finish: + raise StopIteration + item = self._item.dereference() + count = self._count + self._count = self._count + 1 + self._item = self._item + 1 + path = item['_M_pathname'] + t = StdPathPrinter(self._pathtype, item)._path_type() + if not t: + t = count + return ('[%s]' % t, path) + + def children(self): + return self._iterator(self._impl, self._typename) + + +class StdPairPrinter(printer_base): + """Print a std::pair object, with 'first' and 'second' as children.""" + + def __init__(self, typename, val): + self._val = val + + class _iter(Iterator): + """An iterator for std::pair types. Returns 'first' then 'second'.""" + + def __init__(self, val): + self._val = val + self._which = 'first' + + def __iter__(self): + return self + + def __next__(self): + if self._which is None: + raise StopIteration + which = self._which + if which == 'first': + self._which = 'second' + else: + self._which = None + return (which, self._val[which]) + + def children(self): + return self._iter(self._val) + + def to_string(self): + return None + + +class StdCmpCatPrinter(printer_base): + """Print a comparison category object.""" + + def __init__(self, typename, val): + self._typename = typename[typename.rfind(':') + 1:] + self._val = val['_M_value'] + + def to_string(self): + if self._typename == 'strong_ordering' and self._val == 0: + name = 'equal' + else: + names = {2: 'unordered', -1: 'less', 0: 'equivalent', 1: 'greater'} + name = names[int(self._val)] + return 'std::{}::{}'.format(self._typename, name) + + +class StdErrorCodePrinter(printer_base): + """Print a std::error_code or std::error_condition.""" + + _system_is_posix = None # Whether std::system_category() use errno values. + + def __init__(self, typename, val): + self._val = val + self._typename = strip_versioned_namespace(typename) + # Do this only once ... + if StdErrorCodePrinter._system_is_posix is None: + try: + import posix + StdErrorCodePrinter._system_is_posix = True + except ImportError: + StdErrorCodePrinter._system_is_posix = False + + @staticmethod + def _find_errc_enum(name): + typ = gdb.lookup_type(name) + if typ is not None and typ.code == gdb.TYPE_CODE_ENUM: + return typ + return None + + @classmethod + def _find_standard_errc_enum(cls, name): + for ns in ['', _versioned_namespace]: + try: + qname = 'std::{}{}'.format(ns, name) + return cls._find_errc_enum(qname) + except RuntimeError: + pass + + @classmethod + def _match_net_ts_category(cls, cat): + net_cats = ['stream', 'socket', 'ip::resolver'] + for c in net_cats: + func = c + '_category()' + for ns in ['', _versioned_namespace]: + ns = 'std::{}experimental::net::v1'.format(ns) + sym = gdb.lookup_symbol('{}::{}::__c'.format(ns, func))[0] + if sym is not None: + if cat == sym.value().address: + name = 'net::' + func + enum = cls._find_errc_enum('{}::{}_errc'.format(ns, c)) + return (name, enum) + return (None, None) + + @classmethod + def _category_info(cls, cat): + """Return details of a std::error_category.""" + + name = None + enum = None + is_errno = False + + # Try these first, or we get "warning: RTTI symbol not found" when + # using cat.dynamic_type on the local class types for Net TS + # categories. + func, enum = cls._match_net_ts_category(cat) + if func is not None: + return (None, func, enum, is_errno) + + # This might give a warning for a program-defined category defined as + # a local class, but there doesn't seem to be any way to avoid that. + typ = cat.dynamic_type.target() + # Shortcuts for the known categories defined by libstdc++. + if typ.tag.endswith('::generic_error_category'): + name = 'generic' + is_errno = True + if typ.tag.endswith('::system_error_category'): + name = 'system' + is_errno = cls._system_is_posix + if typ.tag.endswith('::future_error_category'): + name = 'future' + enum = cls._find_standard_errc_enum('future_errc') + if typ.tag.endswith('::io_error_category'): + name = 'io' + enum = cls._find_standard_errc_enum('io_errc') + + if name is None: + try: + # Want to call std::error_category::name() override, but it's + # unsafe: https://sourceware.org/bugzilla/show_bug.cgi?id=28856 + # gdb.set_convenience_variable('__cat', cat) + # return '"%s"' % gdb.parse_and_eval('$__cat->name()').string() + pass + except: + pass + return (name, typ.tag, enum, is_errno) + + @staticmethod + def _unqualified_name(name): + """ + Strip any nested-name-specifier from name to give an unqualified name. + """ + return name.split('::')[-1] + + def to_string(self): + value = self._val['_M_value'] + cat = self._val['_M_cat'] + name, alt_name, enum, is_errno = self._category_info(cat) + if value == 0: + default_cats = {'error_code': 'system', + 'error_condition': 'generic'} + if name == default_cats[self._unqualified_name(self._typename)]: + return self._typename + ' = { }' # default-constructed value + + strval = str(value) + if is_errno and value != 0: + try: + strval = errno.errorcode[int(value)] + except: + pass + elif enum is not None: + strval = self._unqualified_name(str(value.cast(enum))) + + if name is not None: + name = '"%s"' % name + else: + name = alt_name + return '%s = {%s: %s}' % (self._typename, name, strval) + + +class StdRegexStatePrinter(printer_base): + """Print a state node in the NFA for a std::regex.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + + def to_string(self): + opcode = str(self._val['_M_opcode']) + if opcode: + opcode = opcode[25:] + next_id = self._val['_M_next'] + + variants = {'repeat': 'alt', 'alternative': 'alt', + 'subexpr_begin': 'subexpr', 'subexpr_end': 'subexpr', + 'line_begin_assertion': None, 'line_end_assertion': None, + 'word_boundary': 'neg', 'subexpr_lookahead': 'neg', + 'backref': 'backref_index', + 'match': None, 'accept': None, + 'dummy': None, 'unknown': None + } + v = variants[opcode] + + s = "opcode={}, next={}".format(opcode, next_id) + if v is not None and self._val['_M_' + v] is not None: + s = "{}, {}={}".format(s, v, self._val['_M_' + v]) + return "{%s}" % (s) + + +class StdSpanPrinter(printer_base): + """Print a std::span.""" + + class _iterator(Iterator): + def __init__(self, begin, size): + self._count = 0 + self._begin = begin + self._size = size + + def __iter__(self): + return self + + def __next__(self): + if self._count == self._size: + raise StopIteration + + count = self._count + self._count = self._count + 1 + return '[%d]' % count, (self._begin + count).dereference() + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + size_max = gdb.parse_and_eval('static_cast(-1)') + if val.type.template_argument(1) == size_max: + self._size = val['_M_extent']['_M_extent_value'] + else: + self._size = val.type.template_argument(1) + + def to_string(self): + return '%s of length %d' % (self._typename, self._size) + + def children(self): + return self._iterator(self._val['_M_ptr'], self._size) + + def display_hint(self): + return 'array' + + +class StdInitializerListPrinter(printer_base): + """Print a std::initializer_list.""" + + def __init__(self, typename, val): + self._typename = typename + self._val = val + self._size = val['_M_len'] + + def to_string(self): + return '%s of length %d' % (self._typename, self._size) + + def children(self): + return StdSpanPrinter._iterator(self._val['_M_array'], self._size) + + def display_hint(self): + return 'array' + + +class StdAtomicPrinter(printer_base): + """Print a std:atomic.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + self._shptr_printer = None + self._value_type = self._val.type.template_argument(0) + if self._value_type.tag is not None: + typ = strip_versioned_namespace(self._value_type.tag) + if (typ.startswith('std::shared_ptr<') + or typ.startswith('std::weak_ptr<')): + impl = val['_M_impl'] + self._shptr_printer = SharedPointerPrinter(typename, impl) + self.children = self._shptr_children + + def _shptr_children(self): + return SmartPtrIterator(self._shptr_printer._pointer) + + def to_string(self): + if self._shptr_printer is not None: + return self._shptr_printer.to_string() + + if self._value_type.code == gdb.TYPE_CODE_INT: + val = self._val['_M_i'] + elif self._value_type.code == gdb.TYPE_CODE_FLT: + val = self._val['_M_fp'] + elif self._value_type.code == gdb.TYPE_CODE_PTR: + val = self._val['_M_b']['_M_p'] + elif self._value_type.code == gdb.TYPE_CODE_BOOL: + val = self._val['_M_base']['_M_i'] + else: + val = self._val['_M_i'] + return '%s<%s> = { %s }' % (self._typename, str(self._value_type), val) + + +class StdFormatArgsPrinter(printer_base): + """Print a std::basic_format_args.""" + # TODO: add printer for basic_format_arg and print out children. + # TODO: add printer for __format::_ArgStore. + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + targs = get_template_arg_list(self._val.type) + char_type = get_template_arg_list(targs[0])[1] + if char_type == gdb.lookup_type('char'): + typ = 'std::format_args' + elif char_type == gdb.lookup_type('wchar_t'): + typ = 'std::wformat_args' + else: + typ = 'std::basic_format_args' + + size = self._val['_M_packed_size'] + if size == 1: + return "%s with 1 argument" % (typ) + if size == 0: + size = self._val['_M_unpacked_size'] + return "%s with %d arguments" % (typ, size) + + +class StdChronoDurationPrinter(printer_base): + """Print a std::chrono::duration.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def _ratio(self): + # TODO use reduced period i.e. duration::period + period = self._val.type.template_argument(1) + num = period.template_argument(0) + den = period.template_argument(1) + return (num, den) + + def _suffix(self): + num, den = self._ratio() + if num == 1: + if den == 1: + return 's' + if den == 1000: + return 'ms' + if den == 1000000: + return 'us' + if den == 1000000000: + return 'ns' + elif den == 1: + if num == 60: + return 'min' + if num == 3600: + return 'h' + if num == 86400: + return 'd' + return '[{}]s'.format(num) + return "[{}/{}]s".format(num, den) + + def to_string(self): + r = self._val['__r'] + if r.type.strip_typedefs().code == gdb.TYPE_CODE_FLT: + r = "%g" % r + return "std::chrono::duration = {{ {}{} }}".format(r, self._suffix()) + + +class StdChronoTimePointPrinter(printer_base): + """Print a std::chrono::time_point.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def _clock(self): + clock = self._val.type.template_argument(0) + name = strip_versioned_namespace(clock.name) + if name == 'std::chrono::_V2::system_clock' \ + or name == 'std::chrono::system_clock': + return ('std::chrono::sys_time', 0) + # XXX need to remove leap seconds from utc, gps, and tai + if name == 'std::chrono::utc_clock': + return ('std::chrono::utc_time', None) # XXX + if name == 'std::chrono::gps_clock': + return ('std::chrono::gps_time', None) # XXX 315964809 + if name == 'std::chrono::tai_clock': + return ('std::chrono::tai_time', None) # XXX -378691210 + if name == 'std::filesystem::__file_clock': + return ('std::chrono::file_time', 6437664000) + if name == 'std::chrono::local_t': + return ('std::chrono::local_time', 0) + return ('{} time_point'.format(name), None) + + def to_string(self, abbrev=False): + clock, offset = self._clock() + d = self._val['__d'] + r = d['__r'] + printer = StdChronoDurationPrinter(d.type.name, d) + suffix = printer._suffix() + time = '' + if offset is not None: + num, den = printer._ratio() + secs = (r * num / den) + offset + try: + dt = datetime.datetime.fromtimestamp(secs, _utc_timezone) + time = ' [{:%Y-%m-%d %H:%M:%S}]'.format(dt) + except: + pass + s = '%d%s%s' % (r, suffix, time) + if abbrev: + return s + return '%s = { %s }' % (clock, s) + + +class StdChronoZonedTimePrinter(printer_base): + """Print a std::chrono::zoned_time.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + zone = self._val['_M_zone'].dereference()['_M_name'] + time = self._val['_M_tp'] + printer = StdChronoTimePointPrinter(time.type.name, time) + time = printer.to_string(True) + return 'std::chrono::zoned_time = {{ {} {} }}'.format(zone, time) + + +months = [None, 'January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December'] + +weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + 'Saturday', 'Sunday'] + + +class StdChronoCalendarPrinter(printer_base): + """Print a std::chrono::day, std::chrono::month, std::chrono::year etc.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + val = self._val + typ = self._typename + if 'month' in typ and typ != 'std::chrono::year_month_day_last': + m = val['_M_m'] + if typ.startswith('std::chrono::year'): + y = val['_M_y'] + + if typ == 'std::chrono::day': + return '{}'.format(int(val['_M_d'])) + if typ == 'std::chrono::month': + if m < 1 or m >= len(months): + return "%d is not a valid month" % m + return months[m] + if typ == 'std::chrono::year': + return '{}y'.format(y) + if typ == 'std::chrono::weekday': + wd = val['_M_wd'] + if wd < 0 or wd >= len(weekdays): + return "%d is not a valid weekday" % wd + return '{}'.format(weekdays[wd]) + if typ == 'std::chrono::weekday_indexed': + return '{}[{}]'.format(val['_M_wd'], int(val['_M_index'])) + if typ == 'std::chrono::weekday_last': + return '{}[last]'.format(val['_M_wd']) + if typ == 'std::chrono::month_day': + return '{}/{}'.format(m, val['_M_d']) + if typ == 'std::chrono::month_day_last': + return '{}/last'.format(m) + if typ == 'std::chrono::month_weekday': + return '{}/{}'.format(m, val['_M_wdi']) + if typ == 'std::chrono::month_weekday_last': + return '{}/{}'.format(m, val['_M_wdl']) + if typ == 'std::chrono::year_month': + return '{}/{}'.format(y, m) + if typ == 'std::chrono::year_month_day': + return '{}/{}/{}'.format(y, m, val['_M_d']) + if typ == 'std::chrono::year_month_day_last': + return '{}/{}'.format(y, val['_M_mdl']) + if typ == 'std::chrono::year_month_weekday': + return '{}/{}/{}'.format(y, m, val['_M_wdi']) + if typ == 'std::chrono::year_month_weekday_last': + return '{}/{}/{}'.format(y, m, val['_M_wdl']) + if typ.startswith('std::chrono::hh_mm_ss'): + fract = '' + if val['fractional_width'] != 0: + fract = '.{:0{}d}'.format(int(val['_M_ss']['_M_r']), + int(val['fractional_width'])) + h = int(val['_M_h']['__r']) + m = int(val['_M_m']['__r']) + s = int(val['_M_s']['__r']) + if val['_M_is_neg']: + h = -h + return '{:02}:{:02}:{:02}{}'.format(h, m, s, fract) + + +class StdChronoTimeZonePrinter(printer_base): + """Print a chrono::time_zone or chrono::time_zone_link.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + str = '%s = %s' % (self._typename, self._val['_M_name']) + if self._typename.endswith("_link"): + str += ' -> %s' % (self._val['_M_target']) + return str + + +class StdChronoLeapSecondPrinter(printer_base): + """Print a chrono::leap_second.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + date = self._val['_M_s']['__r'] + neg = '+-'[date < 0] + return '%s %d (%c)' % (self._typename, abs(date), neg) + + +class StdChronoTzdbPrinter(printer_base): + """Print a chrono::tzdb.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + return '%s %s' % (self._typename, self._val['version']) + + +class StdChronoTimeZoneRulePrinter(printer_base): + """Print a chrono::time_zone rule.""" + + def __init__(self, typename, val): + self._typename = strip_versioned_namespace(typename) + self._val = val + + def to_string(self): + on = self._val['on'] + kind = on['kind'] + month = months[on['month']] + suffixes = {1: 'st', 2: 'nd', 3: 'rd', + 21: 'st', 22: 'nd', 23: 'rd', 31: 'st'} + day = on['day_of_month'] + ordinal_day = '{}{}'.format(day, suffixes.get(day, 'th')) + if kind == 0: # DayOfMonth + start = '{} {}'.format(month, ordinal_day) + else: + weekday = weekdays[on['day_of_week']] + if kind == 1: # LastWeekDay + start = 'last {} in {}'.format(weekday, month) + else: + if kind == 2: # LessEq + direction = ('last', '<=') + else: + direction = ('first', '>=') + day = on['day_of_month'] + start = '{} {} {} {} {}'.format(direction[0], weekday, + direction[1], month, + ordinal_day) + return 'time_zone rule {} from {} to {} starting on {}'.format( + self._val['name'], self._val['from'], self._val['to'], start) + + +class StdLocalePrinter(printer_base): + """Print a std::locale.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + + def to_string(self): + names = self._val['_M_impl']['_M_names'] + mod = '' + if names[0] == 0: + name = '*' + else: + cats = gdb.parse_and_eval(self._typename + '::_S_categories') + ncat = gdb.parse_and_eval(self._typename + '::_S_categories_size') + n = names[0].string() + cat = cats[0].string() + name = '{}={}'.format(cat, n) + cat_names = {cat: n} + i = 1 + while i < ncat and names[i] != 0: + n = names[i].string() + cat = cats[i].string() + name = '{};{}={}'.format(name, cat, n) + cat_names[cat] = n + i = i + 1 + uniq_names = set(cat_names.values()) + if len(uniq_names) == 1: + name = n + elif len(uniq_names) == 2: + n1, n2 = (uniq_names) + name_list = list(cat_names.values()) + other = None + if name_list.count(n1) == 1: + name = n2 + other = n1 + elif name_list.count(n2) == 1: + name = n1 + other = n2 + if other is not None: + cat = next(c for c, n in cat_names.items() if n == other) + mod = ' with "{}={}"'.format(cat, other) + return 'std::locale = "{}"{}'.format(name, mod) + +class StdIntegralConstantPrinter(printer_base): + """Print a std::true_type or std::false_type.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + + def to_string(self): + value_type = self._val.type.template_argument(0) + value = self._val.type.template_argument(1) + if value_type.code == gdb.TYPE_CODE_BOOL: + if value: + return "std::true_type" + else: + return "std::false_type" + typename = strip_versioned_namespace(self._typename) + return "{}<{}, {}>".format(typename, value_type, value) + +class StdTextEncodingPrinter(printer_base): + """Print a std::text_encoding.""" + + def __init__(self, typename, val): + self._val = val + self._typename = typename + + def to_string(self): + rep = self._val['_M_rep'].dereference() + if rep['_M_id'] == 1: + return self._val['_M_name'] + if rep['_M_id'] == 2: + return 'unknown' + return rep['_M_name'] + +# A "regular expression" printer which conforms to the +# "SubPrettyPrinter" protocol from gdb.printing. +class RxPrinter(object): + def __init__(self, name, function): + super(RxPrinter, self).__init__() + self.name = name + self._function = function + self.enabled = True + + def invoke(self, value): + if not self.enabled: + return None + + if value.type.code == gdb.TYPE_CODE_REF: + if hasattr(gdb.Value, "referenced_value"): + value = value.referenced_value() + + return self._function(self.name, value) + +# A pretty-printer that conforms to the "PrettyPrinter" protocol from +# gdb.printing. It can also be used directly as an old-style printer. + + +class Printer(object): + def __init__(self, name): + super(Printer, self).__init__() + self.name = name + self._subprinters = [] + self._lookup = {} + self.enabled = True + self._compiled_rx = re.compile('^([a-zA-Z0-9_:]+)(<.*>)?$') + + def add(self, name, function): + # A small sanity check. + # FIXME + if not self._compiled_rx.match(name): + raise ValueError( + 'libstdc++ programming error: "%s" does not match' % name) + printer = RxPrinter(name, function) + self._subprinters.append(printer) + self._lookup[name] = printer + + # Add a name using _GLIBCXX_BEGIN_NAMESPACE_VERSION. + def add_version(self, base, name, function): + self.add(base + name, function) + if '__cxx11' not in base: + vbase = re.sub('^(std|__gnu_cxx)::', r'\g<0>%s' % + _versioned_namespace, base) + self.add(vbase + name, function) + + # Add a name using _GLIBCXX_BEGIN_NAMESPACE_CONTAINER. + def add_container(self, base, name, function): + self.add_version(base, name, function) + self.add_version(base + '__cxx1998::', name, function) + + @staticmethod + def get_basic_type(type): + # If it points to a reference, get the reference. + if type.code == gdb.TYPE_CODE_REF: + type = type.target() + + # Get the unqualified type, stripped of typedefs. + type = type.unqualified().strip_typedefs() + + return type.tag + + def __call__(self, val): + typename = self.get_basic_type(val.type) + if not typename: + return None + + # All the types we match are template types, so we can use a + # dictionary. + match = self._compiled_rx.match(typename) + if not match: + return None + + basename = match.group(1) + + if val.type.code == gdb.TYPE_CODE_REF: + if hasattr(gdb.Value, "referenced_value"): + val = val.referenced_value() + + if basename in self._lookup: + return self._lookup[basename].invoke(val) + + # Cannot find a pretty printer. Return None. + return None + + +libstdcxx_printer = None + + +class TemplateTypePrinter(object): + """ + A type printer for class templates with default template arguments. + + Recognizes specializations of class templates and prints them without + any template arguments that use a default template argument. + Type printers are recursively applied to the template arguments. + + e.g. replace 'std::vector >' with 'std::vector'. + """ + + def __init__(self, name, defargs): + self.name = name + self._defargs = defargs + self.enabled = True + + class _recognizer(object): + """The recognizer class for TemplateTypePrinter.""" + + def __init__(self, name, defargs): + self.name = name + self._defargs = defargs + # self._type_obj = None + + def recognize(self, type_obj): + """ + If type_obj is a specialization of self.name that uses all the + default template arguments for the class template, then return + a string representation of the type without default arguments. + Otherwise, return None. + """ + + if type_obj.tag is None: + return None + + if not type_obj.tag.startswith(self.name): + return None + + template_args = get_template_arg_list(type_obj) + displayed_args = [] + require_defaulted = False + for n in range(len(template_args)): + # The actual template argument in the type: + targ = template_args[n] + # The default template argument for the class template: + defarg = self._defargs.get(n) + if defarg is not None: + # Substitute other template arguments into the default: + defarg = defarg.format(*template_args) + # Fail to recognize the type (by returning None) + # unless the actual argument is the same as the default. + try: + if targ != gdb.lookup_type(defarg): + return None + except gdb.error: + # Type lookup failed, just use string comparison: + if targ.tag != defarg: + return None + # All subsequent args must have defaults: + require_defaulted = True + elif require_defaulted: + return None + else: + # Recursively apply recognizers to the template argument + # and add it to the arguments that will be displayed: + displayed_args.append(self._recognize_subtype(targ)) + + # This assumes no class templates in the nested-name-specifier: + template_name = type_obj.tag[0:type_obj.tag.find('<')] + template_name = strip_inline_namespaces(template_name) + + return template_name + '<' + ', '.join(displayed_args) + '>' + + def _recognize_subtype(self, type_obj): + """Convert a gdb.Type to a string by applying recognizers, + or if that fails then simply converting to a string.""" + + if type_obj.code == gdb.TYPE_CODE_PTR: + return self._recognize_subtype(type_obj.target()) + '*' + if type_obj.code == gdb.TYPE_CODE_ARRAY: + type_str = self._recognize_subtype(type_obj.target()) + if str(type_obj.strip_typedefs()).endswith('[]'): + return type_str + '[]' # array of unknown bound + return "%s[%d]" % (type_str, type_obj.range()[1] + 1) + if type_obj.code == gdb.TYPE_CODE_REF: + return self._recognize_subtype(type_obj.target()) + '&' + if hasattr(gdb, 'TYPE_CODE_RVALUE_REF'): + if type_obj.code == gdb.TYPE_CODE_RVALUE_REF: + return self._recognize_subtype(type_obj.target()) + '&&' + + type_str = gdb.types.apply_type_recognizers( + gdb.types.get_type_recognizers(), type_obj) + if type_str: + return type_str + return str(type_obj) + + def instantiate(self): + """Return a recognizer object for this type printer.""" + return self._recognizer(self.name, self._defargs) + + +def add_one_template_type_printer(obj, name, defargs): + """ + Add a type printer for a class template with default template arguments. + + Args: + name (str): The template-name of the class template. + defargs (dict int:string) The default template arguments. + + Types in defargs can refer to the Nth template-argument using {N} + (with zero-based indices). + + e.g. 'unordered_map' has these defargs: + { 2: 'std::hash<{0}>', + 3: 'std::equal_to<{0}>', + 4: 'std::allocator >' } + """ + printer = TemplateTypePrinter('std::' + name, defargs) + gdb.types.register_type_printer(obj, printer) + + # Add type printer for same type in debug namespace: + printer = TemplateTypePrinter('std::__debug::' + name, defargs) + gdb.types.register_type_printer(obj, printer) + + if '__cxx11' not in name: + # Add second type printer for same type in versioned namespace: + ns = 'std::' + _versioned_namespace + # PR 86112 Cannot use dict comprehension here: + defargs = dict((n, d.replace('std::', ns)) + for (n, d) in defargs.items()) + printer = TemplateTypePrinter(ns + name, defargs) + gdb.types.register_type_printer(obj, printer) + + # Add type printer for same type in debug namespace: + printer = TemplateTypePrinter('std::__debug::' + name, defargs) + gdb.types.register_type_printer(obj, printer) + + +class FilteringTypePrinter(object): + """ + A type printer that uses typedef names for common template specializations. + + Args: + template (str): The class template to recognize. + name (str): The typedef-name that will be used instead. + targ1 (str, optional): The first template argument. Defaults to None. + + Checks if a specialization of the class template 'template' is the same type + as the typedef 'name', and prints it as 'name' instead. + + e.g. if an instantiation of std::basic_istream is the same type as + std::istream then print it as std::istream. + + If targ1 is provided (not None), match only template specializations with + this type as the first template argument, e.g. if template='basic_string' + and targ1='char' then only match 'basic_string' and not + 'basic_string'. This rejects non-matching specializations + more quickly, without needing to do GDB type lookups. + """ + + def __init__(self, template, name, targ1=None): + self._template = template + self.name = name + self._targ1 = targ1 + self.enabled = True + + class _recognizer(object): + """The recognizer class for FilteringTypePrinter.""" + + def __init__(self, template, name, targ1): + self._template = template + self.name = name + self._targ1 = targ1 + self._type_obj = None + + def recognize(self, type_obj): + """ + If type_obj starts with self._template and is the same type as + self.name then return self.name, otherwise None. + """ + if type_obj.tag is None: + return None + + if self._type_obj is None: + if self._targ1 is not None: + s = '{}<{}'.format(self._template, self._targ1) + if not type_obj.tag.startswith(s): + # Filter didn't match. + return None + elif not type_obj.tag.startswith(self._template): + # Filter didn't match. + return None + + try: + self._type_obj = gdb.lookup_type( + self.name).strip_typedefs() + except: + pass + + if self._type_obj is None: + return None + + t1 = gdb.types.get_basic_type(self._type_obj) + t2 = gdb.types.get_basic_type(type_obj) + if t1 == t2: + return strip_inline_namespaces(self.name) + + # Workaround ambiguous typedefs matching both std:: and + # std::__cxx11:: symbols. + if self._template.split('::')[-1] == 'basic_string': + s1 = self._type_obj.tag.replace('__cxx11::', '') + s2 = type_obj.tag.replace('__cxx11::', '') + if s1 == s2: + return strip_inline_namespaces(self.name) + + return None + + def instantiate(self): + """Return a recognizer object for this type printer.""" + return self._recognizer(self._template, self.name, self._targ1) + + +def add_one_type_printer(obj, template, name, targ1=None): + printer = FilteringTypePrinter('std::' + template, 'std::' + name, targ1) + gdb.types.register_type_printer(obj, printer) + if '__cxx11' not in template: + ns = 'std::' + _versioned_namespace + printer = FilteringTypePrinter(ns + template, ns + name, targ1) + gdb.types.register_type_printer(obj, printer) + + +def register_type_printers(obj): + global _use_type_printing + + if not _use_type_printing: + return + + # Add type printers for typedefs std::string, std::wstring etc. + for ch in (('', 'char'), + ('w', 'wchar_t'), + ('u8', 'char8_t'), + ('u16', 'char16_t'), + ('u32', 'char32_t')): + add_one_type_printer(obj, 'basic_string', ch[0] + 'string', ch[1]) + add_one_type_printer(obj, '__cxx11::basic_string', + ch[0] + 'string', ch[1]) + # Typedefs for __cxx11::basic_string used to be in namespace __cxx11: + add_one_type_printer(obj, '__cxx11::basic_string', + '__cxx11::' + ch[0] + 'string', ch[1]) + add_one_type_printer(obj, 'basic_string_view', + ch[0] + 'string_view', ch[1]) + + # Add type printers for typedefs std::istream, std::wistream etc. + for ch in (('', 'char'), ('w', 'wchar_t')): + for x in ('ios', 'streambuf', 'istream', 'ostream', 'iostream', + 'filebuf', 'ifstream', 'ofstream', 'fstream'): + add_one_type_printer(obj, 'basic_' + x, ch[0] + x, ch[1]) + for x in ('stringbuf', 'istringstream', 'ostringstream', + 'stringstream'): + add_one_type_printer(obj, 'basic_' + x, ch[0] + x, ch[1]) + # types are in __cxx11 namespace, but typedefs aren't: + add_one_type_printer(obj, '__cxx11::basic_' + x, ch[0] + x, ch[1]) + + # Add type printers for typedefs regex, wregex, cmatch, wcmatch etc. + for abi in ('', '__cxx11::'): + for ch in (('', 'char'), ('w', 'wchar_t')): + add_one_type_printer(obj, abi + 'basic_regex', + abi + ch[0] + 'regex', ch[1]) + for ch in ('c', 's', 'wc', 'ws'): + add_one_type_printer( + obj, abi + 'match_results', abi + ch + 'match') + for x in ('sub_match', 'regex_iterator', 'regex_token_iterator'): + add_one_type_printer(obj, abi + x, abi + ch + x) + + # Note that we can't have a printer for std::wstreampos, because + # it is the same type as std::streampos. + add_one_type_printer(obj, 'fpos', 'streampos') + + # Add type printers for typedefs. + for dur in ('nanoseconds', 'microseconds', 'milliseconds', 'seconds', + 'minutes', 'hours', 'days', 'weeks', 'years', 'months'): + add_one_type_printer(obj, 'chrono::duration', 'chrono::' + dur) + + # Add type printers for typedefs. + add_one_type_printer(obj, 'linear_congruential_engine', 'minstd_rand0') + add_one_type_printer(obj, 'linear_congruential_engine', 'minstd_rand') + add_one_type_printer(obj, 'mersenne_twister_engine', 'mt19937') + add_one_type_printer(obj, 'mersenne_twister_engine', 'mt19937_64') + add_one_type_printer(obj, 'subtract_with_carry_engine', 'ranlux24_base') + add_one_type_printer(obj, 'subtract_with_carry_engine', 'ranlux48_base') + add_one_type_printer(obj, 'discard_block_engine', 'ranlux24') + add_one_type_printer(obj, 'discard_block_engine', 'ranlux48') + add_one_type_printer(obj, 'shuffle_order_engine', 'knuth_b') + + # Add type printers for experimental::basic_string_view typedefs. + ns = 'experimental::fundamentals_v1::' + for ch in (('', 'char'), + ('w', 'wchar_t'), + ('u8', 'char8_t'), + ('u16', 'char16_t'), + ('u32', 'char32_t')): + add_one_type_printer(obj, ns + 'basic_string_view', + ns + ch[0] + 'string_view', ch[1]) + + # Do not show defaulted template arguments in class templates. + add_one_template_type_printer(obj, 'unique_ptr', + {1: 'std::default_delete<{0}>'}) + add_one_template_type_printer(obj, 'deque', {1: 'std::allocator<{0}>'}) + add_one_template_type_printer( + obj, 'forward_list', {1: 'std::allocator<{0}>'}) + add_one_template_type_printer(obj, 'list', {1: 'std::allocator<{0}>'}) + add_one_template_type_printer( + obj, '__cxx11::list', {1: 'std::allocator<{0}>'}) + add_one_template_type_printer(obj, 'vector', {1: 'std::allocator<{0}>'}) + add_one_template_type_printer(obj, 'map', + {2: 'std::less<{0}>', + 3: 'std::allocator>'}) + add_one_template_type_printer(obj, 'multimap', + {2: 'std::less<{0}>', + 3: 'std::allocator>'}) + add_one_template_type_printer(obj, 'set', + {1: 'std::less<{0}>', 2: 'std::allocator<{0}>'}) + add_one_template_type_printer(obj, 'multiset', + {1: 'std::less<{0}>', 2: 'std::allocator<{0}>'}) + add_one_template_type_printer(obj, 'unordered_map', + {2: 'std::hash<{0}>', + 3: 'std::equal_to<{0}>', + 4: 'std::allocator>'}) + add_one_template_type_printer(obj, 'unordered_multimap', + {2: 'std::hash<{0}>', + 3: 'std::equal_to<{0}>', + 4: 'std::allocator>'}) + add_one_template_type_printer(obj, 'unordered_set', + {1: 'std::hash<{0}>', + 2: 'std::equal_to<{0}>', + 3: 'std::allocator<{0}>'}) + add_one_template_type_printer(obj, 'unordered_multiset', + {1: 'std::hash<{0}>', + 2: 'std::equal_to<{0}>', + 3: 'std::allocator<{0}>'}) + + +def register_libstdcxx_printers(obj): + """Register libstdc++ pretty-printers with objfile Obj.""" + + global _use_gdb_pp + global libstdcxx_printer + + if _use_gdb_pp: + gdb.printing.register_pretty_printer(obj, libstdcxx_printer) + else: + if obj is None: + obj = gdb + obj.pretty_printers.append(libstdcxx_printer) + + register_type_printers(obj) + + +def build_libstdcxx_dictionary(): + global libstdcxx_printer + + libstdcxx_printer = Printer("libstdc++-v6") + + # libstdc++ objects requiring pretty-printing. + # In order from: + # http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01847.html + libstdcxx_printer.add_version('std::', 'basic_string', StdStringPrinter) + libstdcxx_printer.add_version( + 'std::__cxx11::', 'basic_string', StdStringPrinter) + libstdcxx_printer.add_container('std::', 'bitset', StdBitsetPrinter) + libstdcxx_printer.add_container('std::', 'deque', StdDequePrinter) + libstdcxx_printer.add_container('std::', 'list', StdListPrinter) + libstdcxx_printer.add_container('std::__cxx11::', 'list', StdListPrinter) + libstdcxx_printer.add_container('std::', 'map', StdMapPrinter) + libstdcxx_printer.add_container('std::', 'multimap', StdMapPrinter) + libstdcxx_printer.add_container('std::', 'multiset', StdSetPrinter) + libstdcxx_printer.add_version('std::', 'pair', StdPairPrinter) + libstdcxx_printer.add_version('std::', 'priority_queue', + StdStackOrQueuePrinter) + libstdcxx_printer.add_version('std::', 'queue', StdStackOrQueuePrinter) + libstdcxx_printer.add_version('std::', 'tuple', StdTuplePrinter) + libstdcxx_printer.add_container('std::', 'set', StdSetPrinter) + libstdcxx_printer.add_version('std::', 'stack', StdStackOrQueuePrinter) + libstdcxx_printer.add_version('std::', 'unique_ptr', UniquePointerPrinter) + libstdcxx_printer.add_container('std::', 'vector', StdVectorPrinter) + # vector + libstdcxx_printer.add_version('std::', 'locale', StdLocalePrinter) + + libstdcxx_printer.add_version('std::', 'integral_constant', + StdIntegralConstantPrinter) + libstdcxx_printer.add_version('std::', 'text_encoding', + StdTextEncodingPrinter) + + if hasattr(gdb.Value, 'dynamic_type'): + libstdcxx_printer.add_version('std::', 'error_code', + StdErrorCodePrinter) + libstdcxx_printer.add_version('std::', 'error_condition', + StdErrorCodePrinter) + + # Printer registrations for classes compiled with -D_GLIBCXX_DEBUG. + libstdcxx_printer.add('std::__debug::bitset', StdBitsetPrinter) + libstdcxx_printer.add('std::__debug::deque', StdDequePrinter) + libstdcxx_printer.add('std::__debug::list', StdListPrinter) + libstdcxx_printer.add('std::__debug::map', StdMapPrinter) + libstdcxx_printer.add('std::__debug::multimap', StdMapPrinter) + libstdcxx_printer.add('std::__debug::multiset', StdSetPrinter) + libstdcxx_printer.add('std::__debug::set', StdSetPrinter) + libstdcxx_printer.add('std::__debug::vector', StdVectorPrinter) + + # These are the TR1 and C++11 printers. + # For array - the default GDB pretty-printer seems reasonable. + libstdcxx_printer.add_version('std::', 'shared_ptr', SharedPointerPrinter) + libstdcxx_printer.add_version('std::', 'weak_ptr', SharedPointerPrinter) + libstdcxx_printer.add_container('std::', 'unordered_map', + Tr1UnorderedMapPrinter) + libstdcxx_printer.add_container('std::', 'unordered_set', + Tr1UnorderedSetPrinter) + libstdcxx_printer.add_container('std::', 'unordered_multimap', + Tr1UnorderedMapPrinter) + libstdcxx_printer.add_container('std::', 'unordered_multiset', + Tr1UnorderedSetPrinter) + libstdcxx_printer.add_container('std::', 'forward_list', + StdForwardListPrinter) + + libstdcxx_printer.add_version( + 'std::tr1::', 'shared_ptr', SharedPointerPrinter) + libstdcxx_printer.add_version( + 'std::tr1::', 'weak_ptr', SharedPointerPrinter) + libstdcxx_printer.add_version('std::tr1::', 'unordered_map', + Tr1UnorderedMapPrinter) + libstdcxx_printer.add_version('std::tr1::', 'unordered_set', + Tr1UnorderedSetPrinter) + libstdcxx_printer.add_version('std::tr1::', 'unordered_multimap', + Tr1UnorderedMapPrinter) + libstdcxx_printer.add_version('std::tr1::', 'unordered_multiset', + Tr1UnorderedSetPrinter) + + libstdcxx_printer.add_version('std::', 'initializer_list', + StdInitializerListPrinter) + libstdcxx_printer.add_version('std::', 'atomic', StdAtomicPrinter) + libstdcxx_printer.add_version( + 'std::', 'basic_stringbuf', StdStringBufPrinter) + libstdcxx_printer.add_version( + 'std::__cxx11::', 'basic_stringbuf', StdStringBufPrinter) + for sstream in ('istringstream', 'ostringstream', 'stringstream'): + libstdcxx_printer.add_version( + 'std::', 'basic_' + sstream, StdStringStreamPrinter) + libstdcxx_printer.add_version( + 'std::__cxx11::', 'basic_' + sstream, StdStringStreamPrinter) + + libstdcxx_printer.add_version('std::chrono::', 'duration', + StdChronoDurationPrinter) + libstdcxx_printer.add_version('std::chrono::', 'time_point', + StdChronoTimePointPrinter) + + # std::regex components + libstdcxx_printer.add_version('std::__detail::', '_State', + StdRegexStatePrinter) + + # These are the C++11 printer registrations for -D_GLIBCXX_DEBUG cases. + # The tr1 namespace containers do not have any debug equivalents, + # so do not register printers for them. + libstdcxx_printer.add('std::__debug::unordered_map', + Tr1UnorderedMapPrinter) + libstdcxx_printer.add('std::__debug::unordered_set', + Tr1UnorderedSetPrinter) + libstdcxx_printer.add('std::__debug::unordered_multimap', + Tr1UnorderedMapPrinter) + libstdcxx_printer.add('std::__debug::unordered_multiset', + Tr1UnorderedSetPrinter) + libstdcxx_printer.add('std::__debug::forward_list', + StdForwardListPrinter) + + # Library Fundamentals TS components + libstdcxx_printer.add_version('std::experimental::fundamentals_v1::', + 'any', StdExpAnyPrinter) + libstdcxx_printer.add_version('std::experimental::fundamentals_v1::', + 'optional', StdExpOptionalPrinter) + libstdcxx_printer.add_version('std::experimental::fundamentals_v1::', + 'basic_string_view', StdExpStringViewPrinter) + # Filesystem TS components + libstdcxx_printer.add_version('std::experimental::filesystem::v1::', + 'path', StdExpPathPrinter) + libstdcxx_printer.add_version('std::experimental::filesystem::v1::__cxx11::', + 'path', StdExpPathPrinter) + libstdcxx_printer.add_version('std::filesystem::', + 'path', StdPathPrinter) + libstdcxx_printer.add_version('std::filesystem::__cxx11::', + 'path', StdPathPrinter) + + # C++17 components + libstdcxx_printer.add_version('std::', + 'any', StdExpAnyPrinter) + libstdcxx_printer.add_version('std::', + 'optional', StdExpOptionalPrinter) + libstdcxx_printer.add_version('std::', + 'basic_string_view', StdExpStringViewPrinter) + libstdcxx_printer.add_version('std::', + 'variant', StdVariantPrinter) + libstdcxx_printer.add_version('std::', + '_Node_handle', StdNodeHandlePrinter) + + # C++20 components + libstdcxx_printer.add_version( + 'std::', 'partial_ordering', StdCmpCatPrinter) + libstdcxx_printer.add_version('std::', 'weak_ordering', StdCmpCatPrinter) + libstdcxx_printer.add_version('std::', 'strong_ordering', StdCmpCatPrinter) + libstdcxx_printer.add_version('std::', 'span', StdSpanPrinter) + libstdcxx_printer.add_version('std::', 'basic_format_args', + StdFormatArgsPrinter) + for c in ['day', 'month', 'year', 'weekday', 'weekday_indexed', 'weekday_last', + 'month_day', 'month_day_last', 'month_weekday', 'month_weekday_last', + 'year_month', 'year_month_day', 'year_month_day_last', + 'year_month_weekday', 'year_month_weekday_last', 'hh_mm_ss']: + libstdcxx_printer.add_version('std::chrono::', c, + StdChronoCalendarPrinter) + libstdcxx_printer.add_version('std::chrono::', 'time_zone', + StdChronoTimeZonePrinter) + libstdcxx_printer.add_version('std::chrono::', 'time_zone_link', + StdChronoTimeZonePrinter) + libstdcxx_printer.add_version('std::chrono::', 'zoned_time', + StdChronoZonedTimePrinter) + libstdcxx_printer.add_version('std::chrono::', 'leap_second', + StdChronoLeapSecondPrinter) + libstdcxx_printer.add_version( + 'std::chrono::', 'tzdb', StdChronoTzdbPrinter) + # libstdcxx_printer.add_version('std::chrono::(anonymous namespace)', 'Rule', + # StdChronoTimeZoneRulePrinter) + + # Extensions. + libstdcxx_printer.add_version('__gnu_cxx::', 'slist', StdSlistPrinter) + + if True: + # These shouldn't be necessary, if GDB "print *i" worked. + # But it often doesn't, so here they are. + libstdcxx_printer.add_container('std::', '_List_iterator', + StdListIteratorPrinter) + libstdcxx_printer.add_container('std::', '_List_const_iterator', + StdListIteratorPrinter) + libstdcxx_printer.add_version('std::', '_Rb_tree_iterator', + StdRbtreeIteratorPrinter) + libstdcxx_printer.add_version('std::', '_Rb_tree_const_iterator', + StdRbtreeIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Deque_iterator', + StdDequeIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Deque_const_iterator', + StdDequeIteratorPrinter) + libstdcxx_printer.add_version('__gnu_cxx::', '__normal_iterator', + StdVectorIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Bit_iterator', + StdBitIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Bit_const_iterator', + StdBitIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Bit_reference', + StdBitReferencePrinter) + libstdcxx_printer.add_version('__gnu_cxx::', '_Slist_iterator', + StdSlistIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Fwd_list_iterator', + StdFwdListIteratorPrinter) + libstdcxx_printer.add_container('std::', '_Fwd_list_const_iterator', + StdFwdListIteratorPrinter) + + # Debug (compiled with -D_GLIBCXX_DEBUG) printer + # registrations. + libstdcxx_printer.add('__gnu_debug::_Safe_iterator', + StdDebugIteratorPrinter) + + +build_libstdcxx_dictionary() diff --git a/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/xmethods.py b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/xmethods.py new file mode 100644 index 0000000..436c866 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/share/gcc/python/libstdcxx/v6/xmethods.py @@ -0,0 +1,884 @@ +# Xmethods for libstdc++. + +# Copyright (C) 2014-2024 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import gdb +import gdb.xmethod +import re + +matcher_name_prefix = 'libstdc++::' + + +def get_bool_type(): + return gdb.lookup_type('bool') + +def get_std_size_type(): + return gdb.lookup_type('std::size_t') + +_versioned_namespace = '__8::' + +def is_specialization_of(x, template_name): + """ + Test whether a type is a specialization of the named class template. + The type can be specified as a string or a gdb.Type object. + The template should be the name of a class template as a string, + without any 'std' qualification. + """ + if isinstance(x, gdb.Type): + x = x.tag + template_name = '(%s)?%s' % (_versioned_namespace, template_name) + return re.match(r'^std::(__\d::)?%s<.*>$' % template_name, x) is not None + +class LibStdCxxXMethod(gdb.xmethod.XMethod): + def __init__(self, name, worker_class): + gdb.xmethod.XMethod.__init__(self, name) + self.worker_class = worker_class + +# Xmethods for std::array + + +class ArrayWorkerBase(gdb.xmethod.XMethodWorker): + def __init__(self, val_type, size): + self._val_type = val_type + self._size = size + + def null_value(self): + nullptr = gdb.parse_and_eval('(void *) 0') + return nullptr.cast(self._val_type.pointer()).dereference() + + +class ArraySizeWorker(ArrayWorkerBase): + def __init__(self, val_type, size): + ArrayWorkerBase.__init__(self, val_type, size) + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return get_std_size_type() + + def __call__(self, obj): + return self._size + + +class ArrayEmptyWorker(ArrayWorkerBase): + def __init__(self, val_type, size): + ArrayWorkerBase.__init__(self, val_type, size) + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return get_bool_type() + + def __call__(self, obj): + return (int(self._size) == 0) + + +class ArrayFrontWorker(ArrayWorkerBase): + def __init__(self, val_type, size): + ArrayWorkerBase.__init__(self, val_type, size) + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + if int(self._size) > 0: + return obj['_M_elems'][0] + else: + return self.null_value() + + +class ArrayBackWorker(ArrayWorkerBase): + def __init__(self, val_type, size): + ArrayWorkerBase.__init__(self, val_type, size) + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + if int(self._size) > 0: + return obj['_M_elems'][self._size - 1] + else: + return self.null_value() + + +class ArrayAtWorker(ArrayWorkerBase): + def __init__(self, val_type, size): + ArrayWorkerBase.__init__(self, val_type, size) + + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._val_type + + def __call__(self, obj, index): + if int(index) >= int(self._size): + raise IndexError('Array index "%d" should not be >= %d.' % + ((int(index), self._size))) + return obj['_M_elems'][index] + + +class ArraySubscriptWorker(ArrayWorkerBase): + def __init__(self, val_type, size): + ArrayWorkerBase.__init__(self, val_type, size) + + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._val_type + + def __call__(self, obj, index): + if int(self._size) > 0: + return obj['_M_elems'][index] + else: + return self.null_value() + + +class ArrayMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'array') + self._method_dict = { + 'size': LibStdCxxXMethod('size', ArraySizeWorker), + 'empty': LibStdCxxXMethod('empty', ArrayEmptyWorker), + 'front': LibStdCxxXMethod('front', ArrayFrontWorker), + 'back': LibStdCxxXMethod('back', ArrayBackWorker), + 'at': LibStdCxxXMethod('at', ArrayAtWorker), + 'operator[]': LibStdCxxXMethod('operator[]', ArraySubscriptWorker), + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, 'array'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + try: + value_type = class_type.template_argument(0) + size = class_type.template_argument(1) + except: + return None + return method.worker_class(value_type, size) + + +# Xmethods for std::deque + + +class DequeWorkerBase(gdb.xmethod.XMethodWorker): + def __init__(self, val_type): + self._val_type = val_type + self._bufsize = 512 // val_type.sizeof or 1 + + def size(self, obj): + start = obj['_M_impl']['_M_start'] + finish = obj['_M_impl']['_M_finish'] + if start['_M_cur'] == finish['_M_cur']: + return 0 + return (self._bufsize + * (finish['_M_node'] - start['_M_node'] - 1) + + (finish['_M_cur'] - finish['_M_first']) + + (start['_M_last'] - start['_M_cur'])) + + def index(self, obj, idx): + start = obj['_M_impl']['_M_start'] + first_node_size = start['_M_last'] - start['_M_cur'] + if idx < first_node_size: + return start['_M_cur'][idx] + idx = idx - first_node_size + index_node = start['_M_node'][1 + int(idx) // self._bufsize] + return index_node[idx % self._bufsize] + + +class DequeEmptyWorker(DequeWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return get_bool_type() + + def __call__(self, obj): + return (obj['_M_impl']['_M_start']['_M_cur'] == + obj['_M_impl']['_M_finish']['_M_cur']) + + +class DequeSizeWorker(DequeWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return get_std_size_type() + + def __call__(self, obj): + return self.size(obj) + + +class DequeFrontWorker(DequeWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + return obj['_M_impl']['_M_start']['_M_cur'][0] + + +class DequeBackWorker(DequeWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + if (obj['_M_impl']['_M_finish']['_M_cur'] == + obj['_M_impl']['_M_finish']['_M_first']): + prev_node = obj['_M_impl']['_M_finish']['_M_node'] - 1 + return prev_node[0][self._bufsize - 1] + else: + return obj['_M_impl']['_M_finish']['_M_cur'][-1] + + +class DequeSubscriptWorker(DequeWorkerBase): + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, subscript): + return self._val_type + + def __call__(self, obj, subscript): + return self.index(obj, subscript) + + +class DequeAtWorker(DequeWorkerBase): + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._val_type + + def __call__(self, obj, index): + deque_size = int(self.size(obj)) + if int(index) >= deque_size: + raise IndexError('Deque index "%d" should not be >= %d.' % + (int(index), deque_size)) + else: + return self.index(obj, index) + + +class DequeMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'deque') + self._method_dict = { + 'empty': LibStdCxxXMethod('empty', DequeEmptyWorker), + 'size': LibStdCxxXMethod('size', DequeSizeWorker), + 'front': LibStdCxxXMethod('front', DequeFrontWorker), + 'back': LibStdCxxXMethod('back', DequeBackWorker), + 'operator[]': LibStdCxxXMethod('operator[]', DequeSubscriptWorker), + 'at': LibStdCxxXMethod('at', DequeAtWorker) + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, 'deque'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + return method.worker_class(class_type.template_argument(0)) + +# Xmethods for std::forward_list + + +class ForwardListWorkerBase(gdb.xmethod.XMethodMatcher): + def __init__(self, val_type, node_type): + self._val_type = val_type + self._node_type = node_type + + def get_arg_types(self): + return None + + +class ForwardListEmptyWorker(ForwardListWorkerBase): + def get_result_type(self, obj): + return get_bool_type() + + def __call__(self, obj): + return obj['_M_impl']['_M_head']['_M_next'] == 0 + + +class ForwardListFrontWorker(ForwardListWorkerBase): + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + node = obj['_M_impl']['_M_head']['_M_next'].cast(self._node_type) + val_address = node['_M_storage']['_M_storage'].address + return val_address.cast(self._val_type.pointer()).dereference() + + +class ForwardListMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + matcher_name = matcher_name_prefix + 'forward_list' + gdb.xmethod.XMethodMatcher.__init__(self, matcher_name) + self._method_dict = { + 'empty': LibStdCxxXMethod('empty', ForwardListEmptyWorker), + 'front': LibStdCxxXMethod('front', ForwardListFrontWorker) + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, 'forward_list'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + val_type = class_type.template_argument(0) + node_type = gdb.lookup_type(str(class_type) + '::_Node').pointer() + return method.worker_class(val_type, node_type) + +# Xmethods for std::list + + +class ListWorkerBase(gdb.xmethod.XMethodWorker): + def __init__(self, val_type, node_type): + self._val_type = val_type + self._node_type = node_type + + def get_arg_types(self): + return None + + def get_value_from_node(self, node): + node = node.dereference() + if node.type.fields()[1].name == '_M_data': + # C++03 implementation, node contains the value as a member + return node['_M_data'] + # C++11 implementation, node stores value in __aligned_membuf + addr = node['_M_storage'].address + return addr.cast(self._val_type.pointer()).dereference() + + +class ListEmptyWorker(ListWorkerBase): + def get_result_type(self, obj): + return get_bool_type() + + def __call__(self, obj): + base_node = obj['_M_impl']['_M_node'] + if base_node['_M_next'] == base_node.address: + return True + else: + return False + + +class ListSizeWorker(ListWorkerBase): + def get_result_type(self, obj): + return get_std_size_type() + + def __call__(self, obj): + begin_node = obj['_M_impl']['_M_node']['_M_next'] + end_node = obj['_M_impl']['_M_node'].address + size = 0 + while begin_node != end_node: + begin_node = begin_node['_M_next'] + size += 1 + return size + + +class ListFrontWorker(ListWorkerBase): + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + node = obj['_M_impl']['_M_node']['_M_next'].cast(self._node_type) + return self.get_value_from_node(node) + + +class ListBackWorker(ListWorkerBase): + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + prev_node = obj['_M_impl']['_M_node']['_M_prev'].cast(self._node_type) + return self.get_value_from_node(prev_node) + + +class ListMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'list') + self._method_dict = { + 'empty': LibStdCxxXMethod('empty', ListEmptyWorker), + 'size': LibStdCxxXMethod('size', ListSizeWorker), + 'front': LibStdCxxXMethod('front', ListFrontWorker), + 'back': LibStdCxxXMethod('back', ListBackWorker) + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, '(__cxx11::)?list'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + val_type = class_type.template_argument(0) + node_type = gdb.lookup_type(str(class_type) + '::_Node').pointer() + return method.worker_class(val_type, node_type) + +# Xmethods for std::vector + + +class VectorWorkerBase(gdb.xmethod.XMethodWorker): + def __init__(self, val_type): + self._val_type = val_type + + def size(self, obj): + if self._val_type.code == gdb.TYPE_CODE_BOOL: + start = obj['_M_impl']['_M_start']['_M_p'] + finish = obj['_M_impl']['_M_finish']['_M_p'] + finish_offset = obj['_M_impl']['_M_finish']['_M_offset'] + bit_size = start.dereference().type.sizeof * 8 + return (finish - start) * bit_size + finish_offset + else: + return obj['_M_impl']['_M_finish'] - obj['_M_impl']['_M_start'] + + def get(self, obj, index): + if self._val_type.code == gdb.TYPE_CODE_BOOL: + start = obj['_M_impl']['_M_start']['_M_p'] + bit_size = start.dereference().type.sizeof * 8 + valp = start + index // bit_size + offset = index % bit_size + return (valp.dereference() & (1 << offset)) > 0 + else: + return obj['_M_impl']['_M_start'][index] + + +class VectorEmptyWorker(VectorWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return get_bool_type() + + def __call__(self, obj): + return int(self.size(obj)) == 0 + + +class VectorSizeWorker(VectorWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return get_std_size_type() + + def __call__(self, obj): + return self.size(obj) + + +class VectorFrontWorker(VectorWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + return self.get(obj, 0) + + +class VectorBackWorker(VectorWorkerBase): + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._val_type + + def __call__(self, obj): + return self.get(obj, int(self.size(obj)) - 1) + + +class VectorAtWorker(VectorWorkerBase): + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._val_type + + def __call__(self, obj, index): + size = int(self.size(obj)) + if int(index) >= size: + raise IndexError('Vector index "%d" should not be >= %d.' % + ((int(index), size))) + return self.get(obj, int(index)) + + +class VectorSubscriptWorker(VectorWorkerBase): + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, subscript): + return self._val_type + + def __call__(self, obj, subscript): + return self.get(obj, int(subscript)) + + +class VectorMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'vector') + self._method_dict = { + 'size': LibStdCxxXMethod('size', VectorSizeWorker), + 'empty': LibStdCxxXMethod('empty', VectorEmptyWorker), + 'front': LibStdCxxXMethod('front', VectorFrontWorker), + 'back': LibStdCxxXMethod('back', VectorBackWorker), + 'at': LibStdCxxXMethod('at', VectorAtWorker), + 'operator[]': LibStdCxxXMethod('operator[]', + VectorSubscriptWorker), + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, 'vector'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + return method.worker_class(class_type.template_argument(0)) + +# Xmethods for associative containers + + +class AssociativeContainerWorkerBase(gdb.xmethod.XMethodWorker): + def __init__(self, unordered): + self._unordered = unordered + + def node_count(self, obj): + if self._unordered: + return obj['_M_h']['_M_element_count'] + else: + return obj['_M_t']['_M_impl']['_M_node_count'] + + def get_arg_types(self): + return None + + +class AssociativeContainerEmptyWorker(AssociativeContainerWorkerBase): + def get_result_type(self, obj): + return get_bool_type() + + def __call__(self, obj): + return int(self.node_count(obj)) == 0 + + +class AssociativeContainerSizeWorker(AssociativeContainerWorkerBase): + def get_result_type(self, obj): + return get_std_size_type() + + def __call__(self, obj): + return self.node_count(obj) + + +class AssociativeContainerMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self, name): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + name) + self._name = name + self._method_dict = { + 'size': LibStdCxxXMethod('size', AssociativeContainerSizeWorker), + 'empty': LibStdCxxXMethod('empty', + AssociativeContainerEmptyWorker), + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, self._name): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + unordered = 'unordered' in self._name + return method.worker_class(unordered) + +# Xmethods for std::unique_ptr + + +class UniquePtrGetWorker(gdb.xmethod.XMethodWorker): + """ + Implement std::unique_ptr::get() and std::unique_ptr::operator->(). + """ + + def __init__(self, elem_type): + self._is_array = elem_type.code == gdb.TYPE_CODE_ARRAY + if self._is_array: + self._elem_type = elem_type.target() + else: + self._elem_type = elem_type + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._elem_type.pointer() + + def _supports(self, method_name): + # operator-> is not supported for unique_ptr + return method_name == 'get' or not self._is_array + + def __call__(self, obj): + impl_type = obj.dereference().type.fields()[0].type.tag + # Check for new implementations first: + if is_specialization_of(impl_type, '__uniq_ptr_(data|impl)'): + tuple_member = obj['_M_t']['_M_t'] + elif is_specialization_of(impl_type, 'tuple'): + tuple_member = obj['_M_t'] + else: + return None + tuple_impl_type = tuple_member.type.fields()[0].type # _Tuple_impl + tuple_head_type = tuple_impl_type.fields()[1].type # _Head_base + head_field = tuple_head_type.fields()[0] + if head_field.name == '_M_head_impl': + return tuple_member.cast(tuple_head_type)['_M_head_impl'] + elif head_field.is_base_class: + return tuple_member.cast(head_field.type) + else: + return None + + +class UniquePtrDerefWorker(UniquePtrGetWorker): + """Implement std::unique_ptr::operator*().""" + + def __init__(self, elem_type): + UniquePtrGetWorker.__init__(self, elem_type) + + def get_result_type(self, obj): + return self._elem_type + + def _supports(self, method_name): + # operator* is not supported for unique_ptr + return not self._is_array + + def __call__(self, obj): + return UniquePtrGetWorker.__call__(self, obj).dereference() + + +class UniquePtrSubscriptWorker(UniquePtrGetWorker): + """Implement std::unique_ptr::operator[](size_t).""" + + def __init__(self, elem_type): + UniquePtrGetWorker.__init__(self, elem_type) + + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._elem_type + + def _supports(self, method_name): + # operator[] is only supported for unique_ptr + return self._is_array + + def __call__(self, obj, index): + return UniquePtrGetWorker.__call__(self, obj)[index] + + +class UniquePtrMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'unique_ptr') + self._method_dict = { + 'get': LibStdCxxXMethod('get', UniquePtrGetWorker), + 'operator->': LibStdCxxXMethod('operator->', UniquePtrGetWorker), + 'operator*': LibStdCxxXMethod('operator*', UniquePtrDerefWorker), + 'operator[]': LibStdCxxXMethod('operator[]', UniquePtrSubscriptWorker), + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, 'unique_ptr'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + worker = method.worker_class(class_type.template_argument(0)) + if worker._supports(method_name): + return worker + return None + +# Xmethods for std::shared_ptr + + +class SharedPtrGetWorker(gdb.xmethod.XMethodWorker): + """ + Implements std::shared_ptr::get() and std::shared_ptr::operator->(). + """ + + def __init__(self, elem_type): + self._is_array = elem_type.code == gdb.TYPE_CODE_ARRAY + if self._is_array: + self._elem_type = elem_type.target() + else: + self._elem_type = elem_type + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return self._elem_type.pointer() + + def _supports(self, method_name): + # operator-> is not supported for shared_ptr + return method_name == 'get' or not self._is_array + + def __call__(self, obj): + return obj['_M_ptr'] + + +class SharedPtrDerefWorker(SharedPtrGetWorker): + """Implement std::shared_ptr::operator*().""" + + def __init__(self, elem_type): + SharedPtrGetWorker.__init__(self, elem_type) + + def get_result_type(self, obj): + return self._elem_type + + def _supports(self, method_name): + # operator* is not supported for shared_ptr + return not self._is_array + + def __call__(self, obj): + return SharedPtrGetWorker.__call__(self, obj).dereference() + + +class SharedPtrSubscriptWorker(SharedPtrGetWorker): + """Implement std::shared_ptr::operator[](size_t).""" + + def __init__(self, elem_type): + SharedPtrGetWorker.__init__(self, elem_type) + + def get_arg_types(self): + return get_std_size_type() + + def get_result_type(self, obj, index): + return self._elem_type + + def _supports(self, method_name): + # operator[] is only supported for shared_ptr + return self._is_array + + def __call__(self, obj, index): + # Check bounds if _elem_type is an array of known bound + m = re.match(r'.*\[(\d+)]$', str(self._elem_type)) + if m and index >= int(m.group(1)): + raise IndexError('shared_ptr<%s> index "%d" should not be >= %d.' % + (self._elem_type, int(index), int(m.group(1)))) + return SharedPtrGetWorker.__call__(self, obj)[index] + + +class SharedPtrUseCountWorker(gdb.xmethod.XMethodWorker): + """Implement std::shared_ptr::use_count().""" + + def __init__(self, elem_type): + pass + + def get_arg_types(self): + return None + + def get_result_type(self, obj): + return gdb.lookup_type('long') + + def _supports(self, method_name): + return True + + def __call__(self, obj): + refcounts = obj['_M_refcount']['_M_pi'] + return refcounts['_M_use_count'] if refcounts else 0 + + +class SharedPtrUniqueWorker(SharedPtrUseCountWorker): + """Implement std::shared_ptr::unique().""" + + def __init__(self, elem_type): + SharedPtrUseCountWorker.__init__(self, elem_type) + + def get_result_type(self, obj): + return gdb.lookup_type('bool') + + def __call__(self, obj): + return SharedPtrUseCountWorker.__call__(self, obj) == 1 + + +class SharedPtrMethodsMatcher(gdb.xmethod.XMethodMatcher): + def __init__(self): + gdb.xmethod.XMethodMatcher.__init__(self, + matcher_name_prefix + 'shared_ptr') + self._method_dict = { + 'get': LibStdCxxXMethod('get', SharedPtrGetWorker), + 'operator->': LibStdCxxXMethod('operator->', SharedPtrGetWorker), + 'operator*': LibStdCxxXMethod('operator*', SharedPtrDerefWorker), + 'operator[]': LibStdCxxXMethod('operator[]', SharedPtrSubscriptWorker), + 'use_count': LibStdCxxXMethod('use_count', SharedPtrUseCountWorker), + 'unique': LibStdCxxXMethod('unique', SharedPtrUniqueWorker), + } + self.methods = [self._method_dict[m] for m in self._method_dict] + + def match(self, class_type, method_name): + if not is_specialization_of(class_type, 'shared_ptr'): + return None + method = self._method_dict.get(method_name) + if method is None or not method.enabled: + return None + worker = method.worker_class(class_type.template_argument(0)) + if worker._supports(method_name): + return worker + return None + + +def register_libstdcxx_xmethods(locus): + gdb.xmethod.register_xmethod_matcher(locus, ArrayMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher(locus, ForwardListMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher(locus, DequeMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher(locus, ListMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher(locus, VectorMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('set')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('map')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('multiset')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('multimap')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('unordered_set')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('unordered_map')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('unordered_multiset')) + gdb.xmethod.register_xmethod_matcher( + locus, AssociativeContainerMethodsMatcher('unordered_multimap')) + gdb.xmethod.register_xmethod_matcher(locus, UniquePtrMethodsMatcher()) + gdb.xmethod.register_xmethod_matcher(locus, SharedPtrMethodsMatcher()) diff --git a/squashfs-root/runtime/compat/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33-gdb.py b/squashfs-root/runtime/compat/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33-gdb.py new file mode 100644 index 0000000..f777be0 --- /dev/null +++ b/squashfs-root/runtime/compat/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33-gdb.py @@ -0,0 +1,61 @@ +# -*- python -*- +# Copyright (C) 2009-2024 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import sys +import gdb +import os +import os.path + +pythondir = '/usr/share/gcc/python' +libdir = '/usr/lib/x86_64-linux-gnu' + +# This file might be loaded when there is no current objfile. This +# can happen if the user loads it manually. In this case we don't +# update sys.path; instead we just hope the user managed to do that +# beforehand. +if gdb.current_objfile () is not None: + # Update module path. We want to find the relative path from libdir + # to pythondir, and then we want to apply that relative path to the + # directory holding the objfile with which this file is associated. + # This preserves relocatability of the gcc tree. + + # Do a simple normalization that removes duplicate separators. + pythondir = os.path.normpath (pythondir) + libdir = os.path.normpath (libdir) + + prefix = os.path.commonprefix ([libdir, pythondir]) + # In some bizarre configuration we might have found a match in the + # middle of a directory name. + if prefix[-1] != '/': + prefix = os.path.dirname (prefix) + '/' + + # Strip off the prefix. + pythondir = pythondir[len (prefix):] + libdir = libdir[len (prefix):] + + # Compute the ".."s needed to get from libdir to the prefix. + dotdots = ('..' + os.sep) * len (libdir.split (os.sep)) + + objfile = gdb.current_objfile ().filename + dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir) + + if not dir_ in sys.path: + sys.path.insert(0, dir_) + +# Call a function as a plain import would not execute body of the included file +# on repeated reloads of this object file. +from libstdcxx.v6 import register_libstdcxx_printers +register_libstdcxx_printers(gdb.current_objfile()) diff --git a/squashfs-root/runtime/default/lib64/ld-linux-x86-64.so.2 b/squashfs-root/runtime/default/lib64/ld-linux-x86-64.so.2 new file mode 120000 index 0000000..19f9f75 --- /dev/null +++ b/squashfs-root/runtime/default/lib64/ld-linux-x86-64.so.2 @@ -0,0 +1 @@ +/lib64/ld-linux-x86-64.so.2 \ No newline at end of file diff --git a/squashfs-root/runtime/default/usr/bin/python3 b/squashfs-root/runtime/default/usr/bin/python3 new file mode 120000 index 0000000..1ef1428 --- /dev/null +++ b/squashfs-root/runtime/default/usr/bin/python3 @@ -0,0 +1 @@ +../../../../usr/bin/python3 \ No newline at end of file diff --git a/squashfs-root/runtime/default/usr/bin/python3.12 b/squashfs-root/runtime/default/usr/bin/python3.12 new file mode 120000 index 0000000..2d95b4d --- /dev/null +++ b/squashfs-root/runtime/default/usr/bin/python3.12 @@ -0,0 +1 @@ +../../../../usr/bin/python3.12 \ No newline at end of file diff --git a/squashfs-root/usr/bin/addpart b/squashfs-root/usr/bin/addpart new file mode 100755 index 0000000..b836016 Binary files /dev/null and b/squashfs-root/usr/bin/addpart differ diff --git a/squashfs-root/usr/bin/busctl b/squashfs-root/usr/bin/busctl new file mode 100755 index 0000000..13dacd5 Binary files /dev/null and b/squashfs-root/usr/bin/busctl differ diff --git a/squashfs-root/usr/bin/c_rehash b/squashfs-root/usr/bin/c_rehash new file mode 100755 index 0000000..dd52aed --- /dev/null +++ b/squashfs-root/usr/bin/c_rehash @@ -0,0 +1,249 @@ +#!/usr/bin/perl + +# WARNING: do not edit! +# Generated by Makefile from ../tools/c_rehash.in +# Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +# Perl c_rehash script, scan all files in a directory +# and add symbolic links to their hash values. + +my $dir = "/usr/lib/ssl"; +my $prefix = "/usr"; + +my $errorcount = 0; +my $openssl = $ENV{OPENSSL} || "openssl"; +my $pwd; +my $verbose = 0; +my $symlink_exists=eval {symlink("",""); 1}; +my $removelinks = 1; + +## Parse flags. +while ( $ARGV[0] =~ /^-/ ) { + my $flag = shift @ARGV; + last if ( $flag eq '--'); + if ( $flag eq '-h' || $flag eq '-help' ) { + help(); + } elsif ( $flag eq '-n' ) { + $removelinks = 0; + } elsif ( $flag eq '-v' ) { + $verbose++; + } + else { + print STDERR "Usage error; try -h.\n"; + exit 1; + } +} + +sub help { + print "Usage: c_rehash [-old] [-h] [-help] [-v] [dirs...]\n"; + print " -old use old-style digest\n"; + print " -h or -help print this help text\n"; + print " -v print files removed and linked\n"; + exit 0; +} + +eval "require Cwd"; +if (defined(&Cwd::getcwd)) { + $pwd=Cwd::getcwd(); +} else { + $pwd=`pwd`; + chomp($pwd); +} + +# DOS/Win32 or Unix delimiter? Prefix our installdir, then search. +my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; +$ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : ""); + +if (! -x $openssl) { + my $found = 0; + foreach (split /$path_delim/, $ENV{PATH}) { + if (-x "$_/$openssl") { + $found = 1; + $openssl = "$_/$openssl"; + last; + } + } + if ($found == 0) { + print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; + exit 0; + } +} + +if (@ARGV) { + @dirlist = @ARGV; +} elsif ($ENV{SSL_CERT_DIR}) { + @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; +} else { + $dirlist[0] = "$dir/certs"; +} + +if (-d $dirlist[0]) { + chdir $dirlist[0]; + $openssl="$pwd/$openssl" if (!-x $openssl); + chdir $pwd; +} + +foreach (@dirlist) { + if (-d $_ ) { + if ( -w $_) { + hash_dir($_); + } else { + print "Skipping $_, can't write\n"; + $errorcount++; + } + } +} +exit($errorcount); + +sub copy_file { + my ($src_fname, $dst_fname) = @_; + + if (open(my $in, "<", $src_fname)) { + if (open(my $out, ">", $dst_fname)) { + print $out $_ while (<$in>); + close $out; + } else { + warn "Cannot open $dst_fname for write, $!"; + } + close $in; + } else { + warn "Cannot open $src_fname for read, $!"; + } +} + +sub hash_dir { + my $dir = shift; + my %hashlist; + + print "Doing $dir\n"; + + if (!chdir $dir) { + print STDERR "WARNING: Cannot chdir to '$dir', $!\n"; + return; + } + + opendir(DIR, ".") || print STDERR "WARNING: Cannot opendir '.', $!\n"; + my @flist = sort readdir(DIR); + closedir DIR; + if ( $removelinks ) { + # Delete any existing symbolic links + foreach (grep {/^[\da-f]+\.r{0,1}\d+$/} @flist) { + if (-l $_) { + print "unlink $_\n" if $verbose; + unlink $_ || warn "Can't unlink $_, $!\n"; + } + } + } + FILE: foreach $fname (grep {/\.(pem)|(crt)|(cer)|(crl)$/} @flist) { + # Check to see if certificates and/or CRLs present. + my ($cert, $crl) = check_file($fname); + if (!$cert && !$crl) { + print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n"; + next; + } + link_hash_cert($fname) if ($cert); + link_hash_crl($fname) if ($crl); + } + + chdir $pwd; +} + +sub check_file { + my ($is_cert, $is_crl) = (0,0); + my $fname = $_[0]; + + open(my $in, "<", $fname); + while(<$in>) { + if (/^-----BEGIN (.*)-----/) { + my $hdr = $1; + if ($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) { + $is_cert = 1; + last if ($is_crl); + } elsif ($hdr eq "X509 CRL") { + $is_crl = 1; + last if ($is_cert); + } + } + } + close $in; + return ($is_cert, $is_crl); +} + +sub compute_hash { + my $fh; + if ( $^O eq "VMS" ) { + # VMS uses the open through shell + # The file names are safe there and list form is unsupported + if (!open($fh, "-|", join(' ', @_))) { + print STDERR "Cannot compute hash on '$fname'\n"; + return; + } + } else { + if (!open($fh, "-|", @_)) { + print STDERR "Cannot compute hash on '$fname'\n"; + return; + } + } + return (<$fh>, <$fh>); +} + +# Link a certificate to its subject name hash value, each hash is of +# the form . where n is an integer. If the hash value already exists +# then we need to up the value of n, unless its a duplicate in which +# case we skip the link. We check for duplicates by comparing the +# certificate fingerprints + +sub link_hash_cert { + link_hash($_[0], 'cert', '-subject_hash'); + link_hash($_[0], 'cert', '-subject_hash_old'); +} + +# Same as above except for a CRL. CRL links are of the form .r + +sub link_hash_crl { + link_hash($_[0], 'crl', '-hash'); + link_hash($_[0], 'crl', '-hash_old'); +} + +sub link_hash { + my ($fname, $type, $hash_name) = @_; + my $is_cert = $type eq 'cert' or $type eq 'cert_old'; + + my ($hash, $fprint) = compute_hash($openssl, + $is_cert ? "x509" : "crl", + $hash_name, + "-fingerprint", "-noout", + "-in", $fname); + chomp $hash; + $hash =~ s/^.*=// if !$is_cert; + chomp $fprint; + return if !$hash; + $fprint =~ s/^.*=//; + $fprint =~ tr/://d; + my $suffix = 0; + # Search for an unused hash filename + my $crlmark = $is_cert ? "" : "r"; + while(exists $hashlist{"$hash.$crlmark$suffix"}) { + # Hash matches: if fingerprint matches its a duplicate cert + if ($hashlist{"$hash.$crlmark$suffix"} eq $fprint) { + my $what = $is_cert ? 'certificate' : 'CRL'; + print STDERR "WARNING: Skipping duplicate $what $fname\n"; + return; + } + $suffix++; + } + $hash .= ".$crlmark$suffix"; + if ($symlink_exists) { + print "link $fname -> $hash\n" if $verbose; + symlink $fname, $hash || warn "Can't symlink, $!"; + } else { + print "copy $fname -> $hash\n" if $verbose; + copy_file($fname, $hash); + } + $hashlist{$hash} = $fprint; +} diff --git a/squashfs-root/usr/bin/chardet b/squashfs-root/usr/bin/chardet new file mode 120000 index 0000000..3d7dd99 --- /dev/null +++ b/squashfs-root/usr/bin/chardet @@ -0,0 +1 @@ +chardetect \ No newline at end of file diff --git a/squashfs-root/usr/bin/chardetect b/squashfs-root/usr/bin/chardetect new file mode 100755 index 0000000..5d26a5d --- /dev/null +++ b/squashfs-root/usr/bin/chardetect @@ -0,0 +1,8 @@ +#! usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from chardet.cli.chardetect import main +if __name__ == "__main__": + sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0]) + sys.exit(main()) diff --git a/squashfs-root/usr/bin/choom b/squashfs-root/usr/bin/choom new file mode 100755 index 0000000..83ef3ae Binary files /dev/null and b/squashfs-root/usr/bin/choom differ diff --git a/squashfs-root/usr/bin/chrt b/squashfs-root/usr/bin/chrt new file mode 100755 index 0000000..28d44a6 Binary files /dev/null and b/squashfs-root/usr/bin/chrt differ diff --git a/squashfs-root/usr/bin/dbus-cleanup-sockets b/squashfs-root/usr/bin/dbus-cleanup-sockets new file mode 100755 index 0000000..93c6c67 Binary files /dev/null and b/squashfs-root/usr/bin/dbus-cleanup-sockets differ diff --git a/squashfs-root/usr/bin/dbus-daemon b/squashfs-root/usr/bin/dbus-daemon new file mode 100755 index 0000000..63d36b1 Binary files /dev/null and b/squashfs-root/usr/bin/dbus-daemon differ diff --git a/squashfs-root/usr/bin/dbus-monitor b/squashfs-root/usr/bin/dbus-monitor new file mode 100755 index 0000000..de8e540 Binary files /dev/null and b/squashfs-root/usr/bin/dbus-monitor differ diff --git a/squashfs-root/usr/bin/dbus-run-session b/squashfs-root/usr/bin/dbus-run-session new file mode 100755 index 0000000..2f91e76 Binary files /dev/null and b/squashfs-root/usr/bin/dbus-run-session differ diff --git a/squashfs-root/usr/bin/dbus-send b/squashfs-root/usr/bin/dbus-send new file mode 100755 index 0000000..91a9329 Binary files /dev/null and b/squashfs-root/usr/bin/dbus-send differ diff --git a/squashfs-root/usr/bin/dbus-update-activation-environment b/squashfs-root/usr/bin/dbus-update-activation-environment new file mode 100755 index 0000000..5591f37 Binary files /dev/null and b/squashfs-root/usr/bin/dbus-update-activation-environment differ diff --git a/squashfs-root/usr/bin/dbus-uuidgen b/squashfs-root/usr/bin/dbus-uuidgen new file mode 100755 index 0000000..357237e Binary files /dev/null and b/squashfs-root/usr/bin/dbus-uuidgen differ diff --git a/squashfs-root/usr/bin/delpart b/squashfs-root/usr/bin/delpart new file mode 100755 index 0000000..75f35d5 Binary files /dev/null and b/squashfs-root/usr/bin/delpart differ diff --git a/squashfs-root/usr/bin/dmesg b/squashfs-root/usr/bin/dmesg new file mode 100755 index 0000000..53d5d64 Binary files /dev/null and b/squashfs-root/usr/bin/dmesg differ diff --git a/squashfs-root/usr/bin/fallocate b/squashfs-root/usr/bin/fallocate new file mode 100755 index 0000000..991cc00 Binary files /dev/null and b/squashfs-root/usr/bin/fallocate differ diff --git a/squashfs-root/usr/bin/fc-cache b/squashfs-root/usr/bin/fc-cache new file mode 100755 index 0000000..d6adf5a Binary files /dev/null and b/squashfs-root/usr/bin/fc-cache differ diff --git a/squashfs-root/usr/bin/fc-cat b/squashfs-root/usr/bin/fc-cat new file mode 100755 index 0000000..2afa2e1 Binary files /dev/null and b/squashfs-root/usr/bin/fc-cat differ diff --git a/squashfs-root/usr/bin/fc-conflist b/squashfs-root/usr/bin/fc-conflist new file mode 100755 index 0000000..fe9b5f2 Binary files /dev/null and b/squashfs-root/usr/bin/fc-conflist differ diff --git a/squashfs-root/usr/bin/fc-list b/squashfs-root/usr/bin/fc-list new file mode 100755 index 0000000..0267b9b Binary files /dev/null and b/squashfs-root/usr/bin/fc-list differ diff --git a/squashfs-root/usr/bin/fc-match b/squashfs-root/usr/bin/fc-match new file mode 100755 index 0000000..15fa49f Binary files /dev/null and b/squashfs-root/usr/bin/fc-match differ diff --git a/squashfs-root/usr/bin/fc-pattern b/squashfs-root/usr/bin/fc-pattern new file mode 100755 index 0000000..4ae8d1f Binary files /dev/null and b/squashfs-root/usr/bin/fc-pattern differ diff --git a/squashfs-root/usr/bin/fc-query b/squashfs-root/usr/bin/fc-query new file mode 100755 index 0000000..dfedffb Binary files /dev/null and b/squashfs-root/usr/bin/fc-query differ diff --git a/squashfs-root/usr/bin/fc-scan b/squashfs-root/usr/bin/fc-scan new file mode 100755 index 0000000..7c06148 Binary files /dev/null and b/squashfs-root/usr/bin/fc-scan differ diff --git a/squashfs-root/usr/bin/fc-validate b/squashfs-root/usr/bin/fc-validate new file mode 100755 index 0000000..6e88cbe Binary files /dev/null and b/squashfs-root/usr/bin/fc-validate differ diff --git a/squashfs-root/usr/bin/findmnt b/squashfs-root/usr/bin/findmnt new file mode 100755 index 0000000..d834e0e Binary files /dev/null and b/squashfs-root/usr/bin/findmnt differ diff --git a/squashfs-root/usr/bin/flock b/squashfs-root/usr/bin/flock new file mode 100755 index 0000000..5d8f3a1 Binary files /dev/null and b/squashfs-root/usr/bin/flock differ diff --git a/squashfs-root/usr/bin/free b/squashfs-root/usr/bin/free new file mode 100755 index 0000000..c840157 Binary files /dev/null and b/squashfs-root/usr/bin/free differ diff --git a/squashfs-root/usr/bin/gapplication b/squashfs-root/usr/bin/gapplication new file mode 100755 index 0000000..e52d926 Binary files /dev/null and b/squashfs-root/usr/bin/gapplication differ diff --git a/squashfs-root/usr/bin/gdbus b/squashfs-root/usr/bin/gdbus new file mode 100755 index 0000000..18d7b35 Binary files /dev/null and b/squashfs-root/usr/bin/gdbus differ diff --git a/squashfs-root/usr/bin/getopt b/squashfs-root/usr/bin/getopt new file mode 100755 index 0000000..58afefb Binary files /dev/null and b/squashfs-root/usr/bin/getopt differ diff --git a/squashfs-root/usr/bin/gio b/squashfs-root/usr/bin/gio new file mode 100755 index 0000000..b99ec02 Binary files /dev/null and b/squashfs-root/usr/bin/gio differ diff --git a/squashfs-root/usr/bin/gio-querymodules b/squashfs-root/usr/bin/gio-querymodules new file mode 120000 index 0000000..d2a7410 --- /dev/null +++ b/squashfs-root/usr/bin/gio-querymodules @@ -0,0 +1 @@ +../lib/x86_64-linux-gnu/glib-2.0/gio-querymodules \ No newline at end of file diff --git a/squashfs-root/usr/bin/glib-compile-schemas b/squashfs-root/usr/bin/glib-compile-schemas new file mode 120000 index 0000000..dc8b2a5 --- /dev/null +++ b/squashfs-root/usr/bin/glib-compile-schemas @@ -0,0 +1 @@ +../lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas \ No newline at end of file diff --git a/squashfs-root/usr/bin/gresource b/squashfs-root/usr/bin/gresource new file mode 100755 index 0000000..9e0dc7e Binary files /dev/null and b/squashfs-root/usr/bin/gresource differ diff --git a/squashfs-root/usr/bin/gsettings b/squashfs-root/usr/bin/gsettings new file mode 100755 index 0000000..3671dbd Binary files /dev/null and b/squashfs-root/usr/bin/gsettings differ diff --git a/squashfs-root/usr/bin/gtk-update-icon-cache b/squashfs-root/usr/bin/gtk-update-icon-cache new file mode 100755 index 0000000..c95b6f4 Binary files /dev/null and b/squashfs-root/usr/bin/gtk-update-icon-cache differ diff --git a/squashfs-root/usr/bin/hardlink b/squashfs-root/usr/bin/hardlink new file mode 100755 index 0000000..e9ff708 Binary files /dev/null and b/squashfs-root/usr/bin/hardlink differ diff --git a/squashfs-root/usr/bin/hostnamectl b/squashfs-root/usr/bin/hostnamectl new file mode 100755 index 0000000..473685a Binary files /dev/null and b/squashfs-root/usr/bin/hostnamectl differ diff --git a/squashfs-root/usr/bin/i386 b/squashfs-root/usr/bin/i386 new file mode 120000 index 0000000..da0d0cc --- /dev/null +++ b/squashfs-root/usr/bin/i386 @@ -0,0 +1 @@ +setarch \ No newline at end of file diff --git a/squashfs-root/usr/bin/ionice b/squashfs-root/usr/bin/ionice new file mode 100755 index 0000000..b9f84a5 Binary files /dev/null and b/squashfs-root/usr/bin/ionice differ diff --git a/squashfs-root/usr/bin/ipcmk b/squashfs-root/usr/bin/ipcmk new file mode 100755 index 0000000..84c72c6 Binary files /dev/null and b/squashfs-root/usr/bin/ipcmk differ diff --git a/squashfs-root/usr/bin/ipcrm b/squashfs-root/usr/bin/ipcrm new file mode 100755 index 0000000..5dbcfc8 Binary files /dev/null and b/squashfs-root/usr/bin/ipcrm differ diff --git a/squashfs-root/usr/bin/ipcs b/squashfs-root/usr/bin/ipcs new file mode 100755 index 0000000..c694587 Binary files /dev/null and b/squashfs-root/usr/bin/ipcs differ diff --git a/squashfs-root/usr/bin/journalctl b/squashfs-root/usr/bin/journalctl new file mode 100755 index 0000000..05a275f Binary files /dev/null and b/squashfs-root/usr/bin/journalctl differ diff --git a/squashfs-root/usr/bin/kernel-install b/squashfs-root/usr/bin/kernel-install new file mode 100755 index 0000000..08d1a4b Binary files /dev/null and b/squashfs-root/usr/bin/kernel-install differ diff --git a/squashfs-root/usr/bin/kill b/squashfs-root/usr/bin/kill new file mode 100755 index 0000000..3e862df Binary files /dev/null and b/squashfs-root/usr/bin/kill differ diff --git a/squashfs-root/usr/bin/last b/squashfs-root/usr/bin/last new file mode 100755 index 0000000..9a443bd Binary files /dev/null and b/squashfs-root/usr/bin/last differ diff --git a/squashfs-root/usr/bin/lastb b/squashfs-root/usr/bin/lastb new file mode 120000 index 0000000..1c1206e --- /dev/null +++ b/squashfs-root/usr/bin/lastb @@ -0,0 +1 @@ +last \ No newline at end of file diff --git a/squashfs-root/usr/bin/linux32 b/squashfs-root/usr/bin/linux32 new file mode 120000 index 0000000..da0d0cc --- /dev/null +++ b/squashfs-root/usr/bin/linux32 @@ -0,0 +1 @@ +setarch \ No newline at end of file diff --git a/squashfs-root/usr/bin/linux64 b/squashfs-root/usr/bin/linux64 new file mode 120000 index 0000000..da0d0cc --- /dev/null +++ b/squashfs-root/usr/bin/linux64 @@ -0,0 +1 @@ +setarch \ No newline at end of file diff --git a/squashfs-root/usr/bin/localectl b/squashfs-root/usr/bin/localectl new file mode 100755 index 0000000..c5f5abd Binary files /dev/null and b/squashfs-root/usr/bin/localectl differ diff --git a/squashfs-root/usr/bin/loginctl b/squashfs-root/usr/bin/loginctl new file mode 100755 index 0000000..302f9ab Binary files /dev/null and b/squashfs-root/usr/bin/loginctl differ diff --git a/squashfs-root/usr/bin/lsblk b/squashfs-root/usr/bin/lsblk new file mode 100755 index 0000000..ebfcfcc Binary files /dev/null and b/squashfs-root/usr/bin/lsblk differ diff --git a/squashfs-root/usr/bin/lscpu b/squashfs-root/usr/bin/lscpu new file mode 100755 index 0000000..c6f3f3d Binary files /dev/null and b/squashfs-root/usr/bin/lscpu differ diff --git a/squashfs-root/usr/bin/lsipc b/squashfs-root/usr/bin/lsipc new file mode 100755 index 0000000..8c4074c Binary files /dev/null and b/squashfs-root/usr/bin/lsipc differ diff --git a/squashfs-root/usr/bin/lslocks b/squashfs-root/usr/bin/lslocks new file mode 100755 index 0000000..2ee1e91 Binary files /dev/null and b/squashfs-root/usr/bin/lslocks differ diff --git a/squashfs-root/usr/bin/lslogins b/squashfs-root/usr/bin/lslogins new file mode 100755 index 0000000..f656565 Binary files /dev/null and b/squashfs-root/usr/bin/lslogins differ diff --git a/squashfs-root/usr/bin/lsmem b/squashfs-root/usr/bin/lsmem new file mode 100755 index 0000000..94bd28a Binary files /dev/null and b/squashfs-root/usr/bin/lsmem differ diff --git a/squashfs-root/usr/bin/lsns b/squashfs-root/usr/bin/lsns new file mode 100755 index 0000000..dcb52f2 Binary files /dev/null and b/squashfs-root/usr/bin/lsns differ diff --git a/squashfs-root/usr/bin/mcookie b/squashfs-root/usr/bin/mcookie new file mode 100755 index 0000000..8e9f32a Binary files /dev/null and b/squashfs-root/usr/bin/mcookie differ diff --git a/squashfs-root/usr/bin/mesg b/squashfs-root/usr/bin/mesg new file mode 100755 index 0000000..27eaecc Binary files /dev/null and b/squashfs-root/usr/bin/mesg differ diff --git a/squashfs-root/usr/bin/mhwmm b/squashfs-root/usr/bin/mhwmm new file mode 100755 index 0000000..3e6eec2 --- /dev/null +++ b/squashfs-root/usr/bin/mhwmm @@ -0,0 +1,3 @@ +#!/bin/bash +export PYTHONPATH="${APPDIR}/usr/share/mhwmm:${PYTHONPATH}" +exec python3 -m mhwmm "$@" diff --git a/squashfs-root/usr/bin/more b/squashfs-root/usr/bin/more new file mode 100755 index 0000000..d3cbf77 Binary files /dev/null and b/squashfs-root/usr/bin/more differ diff --git a/squashfs-root/usr/bin/mount b/squashfs-root/usr/bin/mount new file mode 100755 index 0000000..c93d719 Binary files /dev/null and b/squashfs-root/usr/bin/mount differ diff --git a/squashfs-root/usr/bin/mountpoint b/squashfs-root/usr/bin/mountpoint new file mode 100755 index 0000000..3062de1 Binary files /dev/null and b/squashfs-root/usr/bin/mountpoint differ diff --git a/squashfs-root/usr/bin/namei b/squashfs-root/usr/bin/namei new file mode 100755 index 0000000..6f7416c Binary files /dev/null and b/squashfs-root/usr/bin/namei differ diff --git a/squashfs-root/usr/bin/networkctl b/squashfs-root/usr/bin/networkctl new file mode 100755 index 0000000..639957a Binary files /dev/null and b/squashfs-root/usr/bin/networkctl differ diff --git a/squashfs-root/usr/bin/nsenter b/squashfs-root/usr/bin/nsenter new file mode 100755 index 0000000..2ef2cb8 Binary files /dev/null and b/squashfs-root/usr/bin/nsenter differ diff --git a/squashfs-root/usr/bin/openssl b/squashfs-root/usr/bin/openssl new file mode 100755 index 0000000..b3f9d80 Binary files /dev/null and b/squashfs-root/usr/bin/openssl differ diff --git a/squashfs-root/usr/bin/partx b/squashfs-root/usr/bin/partx new file mode 100755 index 0000000..dfeff37 Binary files /dev/null and b/squashfs-root/usr/bin/partx differ diff --git a/squashfs-root/usr/bin/pdb3 b/squashfs-root/usr/bin/pdb3 new file mode 120000 index 0000000..e7d6680 --- /dev/null +++ b/squashfs-root/usr/bin/pdb3 @@ -0,0 +1 @@ +pdb3.12 \ No newline at end of file diff --git a/squashfs-root/usr/bin/pdb3.12 b/squashfs-root/usr/bin/pdb3.12 new file mode 120000 index 0000000..e3179f3 --- /dev/null +++ b/squashfs-root/usr/bin/pdb3.12 @@ -0,0 +1 @@ +../lib/python3.12/pdb.py \ No newline at end of file diff --git a/squashfs-root/usr/bin/pgrep b/squashfs-root/usr/bin/pgrep new file mode 100755 index 0000000..853df00 Binary files /dev/null and b/squashfs-root/usr/bin/pgrep differ diff --git a/squashfs-root/usr/bin/pidwait b/squashfs-root/usr/bin/pidwait new file mode 100755 index 0000000..853df00 Binary files /dev/null and b/squashfs-root/usr/bin/pidwait differ diff --git a/squashfs-root/usr/bin/pkill b/squashfs-root/usr/bin/pkill new file mode 120000 index 0000000..7d4b826 --- /dev/null +++ b/squashfs-root/usr/bin/pkill @@ -0,0 +1 @@ +pgrep \ No newline at end of file diff --git a/squashfs-root/usr/bin/pmap b/squashfs-root/usr/bin/pmap new file mode 100755 index 0000000..aa37a8c Binary files /dev/null and b/squashfs-root/usr/bin/pmap differ diff --git a/squashfs-root/usr/bin/prlimit b/squashfs-root/usr/bin/prlimit new file mode 100755 index 0000000..3589490 Binary files /dev/null and b/squashfs-root/usr/bin/prlimit differ diff --git a/squashfs-root/usr/bin/ps b/squashfs-root/usr/bin/ps new file mode 100755 index 0000000..a2ad52e Binary files /dev/null and b/squashfs-root/usr/bin/ps differ diff --git a/squashfs-root/usr/bin/pwdx b/squashfs-root/usr/bin/pwdx new file mode 100755 index 0000000..18cd1d1 Binary files /dev/null and b/squashfs-root/usr/bin/pwdx differ diff --git a/squashfs-root/usr/bin/py3clean b/squashfs-root/usr/bin/py3clean new file mode 100755 index 0000000..22c7d06 --- /dev/null +++ b/squashfs-root/usr/bin/py3clean @@ -0,0 +1,210 @@ +#! usr/bin/python3 +# vim: et ts=4 sw=4 + +# Copyright © 2010-2012 Piotr Ożarowski +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import logging +import optparse +import sys +# glob1() is not in the public documentation, UTSL. +from glob import glob1 +from os import environ, remove, rmdir +from os.path import dirname, basename, exists, join, splitext +sys.path.insert(1, '/usr/share/python3/') +from debpython import files as dpf +from debpython.interpreter import Interpreter +from debpython.version import SUPPORTED, getver, vrepr + + +# initialize script +logging.basicConfig(format='%(levelname).1s: %(module)s:%(lineno)d: ' + '%(message)s') +log = logging.getLogger(__name__) + +"""TODO: move it to manpage +Examples: + py3clean -p python3-mako # all .py[co] files and __pycache__ directories from the package + py3clean /usr/lib/python3.1/dist-packages # python3.1 + py3clean -V 3.3 /usr/lib/python3/ # python 3.3 only + py3clean -V 3.3 /usr/lib/foo/bar.py # bar/__pycache__/bar.cpython-33.py[co] + py3clean /usr/lib/python3/ # all Python 3.X +""" + + +def get_magic_tag_to_remove(version): + """Returns magic tag or True if all of them should be removed.""" + i = Interpreter('python') + map_ = {} + for v in SUPPORTED: + try: + map_[v] = i.magic_tag(v) + except Exception: + log.debug('magic tag for %s not recognized', vrepr(v), exc_info=True) + if version not in map_: + try: + map_[version] = i.magic_tag(version) + except Exception as e: + log.error('cannot find magic tag for Python %s: %s', vrepr(version), e) + exit(4) + + tag = map_[version] + # skip shared tags + for v, t in map_.items(): + if v == version: + continue + if t == tag: + log.info('magic tag(s) used by python%s. Nothing to remove.', + vrepr(v)) + exit(0) + + log.debug('magic tags to remove: %s', tag) + return tag + + +def destroyer(magic_tag=None): # ;-) + """Remove every .py[co] file associated to received .py file. + + :param magic_tag: + * If None, removes all associated .py[co] files from __pycache__ + directory. If the resulting directory is empty, and is not a system + site package, then the directory is also removed. + * If False, removes python3.1's .pyc files only + * Otherwise removes given magic tag from __pycache__ directory. If + the resulting directory is empty, and is not a system site package, + then the directory is also removed. + :type magic_tag: None or False or str + """ + if magic_tag is None: + + # remove compiled files in __pycache__ directory + def find_files_to_remove(pyfile): + directory = join(dirname(pyfile), '__pycache__') + fname = splitext(basename(pyfile))[0] + for fn in glob1(directory, "%s.*" % fname): + yield join(directory, fn) + # remove "classic" .pyc files as well + for filename in ("%sc" % pyfile, "%so" % pyfile): + if exists(filename): + yield filename + # workaround for http://bugs.python.org/issue22966 + if '.' in fname: + sane_fname = join(dirname(pyfile), fname.split('.', 1)[0]) + for fn in find_files_to_remove(sane_fname): + yield join(directory, fn) + elif magic_tag is False: + + # remove 3.1's .pyc files only + def find_files_to_remove(pyfile): # NOQA + for filename in ("%sc" % pyfile, "%so" % pyfile): + if exists(filename): + yield filename + else: + + # remove .pyc files for no longer needed magic tags + def find_files_to_remove(pyfile): # NOQA + directory = join(dirname(pyfile), '__pycache__') + fname = splitext(basename(pyfile))[0] + for fn in glob1(directory, "%s.%s.py[co]" % (fname, magic_tag)): + yield join(directory, fn) + # workaround for http://bugs.python.org/issue22966 + if '.' in fname: + sane_fname = join(dirname(pyfile), fname.split('.', 1)[0]) + for fn in find_files_to_remove(sane_fname): + yield join(directory, fn) + + def myremove(fname): + remove(fname) + directory = dirname(fname) + # remove __pycache__ directory if it's empty + if directory.endswith('__pycache__'): + try: + rmdir(directory) + except Exception: + pass + + counter = 0 + try: + while True: + pyfile = (yield) + for filename in find_files_to_remove(pyfile): + try: + myremove(filename) + counter += 1 + except (IOError, OSError) as e: + log.error('cannot remove %s', filename) + log.debug(e) + except GeneratorExit: + log.info("removed files: %s", counter) + + +def main(): + usage = '%prog [-V VERSION] [-p PACKAGE] [DIR_OR_FILE]' + parser = optparse.OptionParser(usage, version='%prog 3.12.3-0ubuntu2.1') + parser.add_option('-v', '--verbose', action='store_true', dest='verbose', + help='turn verbose mode on') + parser.add_option('-q', '--quiet', action='store_false', dest='verbose', + default=False, help='be quiet') + parser.add_option('-p', '--package', + help='specify Debian package name to clean') + parser.add_option('-V', dest='version', + help='specify Python version to clean') + + (options, args) = parser.parse_args() + + if options.verbose or environ.get('PYCLEAN_DEBUG') == '1': + log.setLevel(logging.DEBUG) + log.debug('argv: %s', sys.argv) + log.debug('options: %s', options) + log.debug('args: %s', args) + else: + log.setLevel(logging.WARNING) + + if options.version: + if options.version.endswith('3.1'): # 3.1, -3.1 + magic_tag = False + else: + magic_tag = get_magic_tag_to_remove(getver(options.version)) + d = destroyer(magic_tag) + else: + d = destroyer() # remove everything + next(d) # initialize coroutine + + if not options.package and not args: + parser.print_usage() + exit(1) + + if options.package: + log.info('cleaning package %s', options.package) + pfiles = set(dpf.from_package(options.package)) + + if args: + log.info('cleaning directories: %s', args) + files = set(dpf.from_directory(args)) + if options.package: + files = files & pfiles + else: + files = pfiles + + for filename in files: + d.send(filename) + +if __name__ == '__main__': + main() diff --git a/squashfs-root/usr/bin/py3compile b/squashfs-root/usr/bin/py3compile new file mode 100755 index 0000000..c8134c7 --- /dev/null +++ b/squashfs-root/usr/bin/py3compile @@ -0,0 +1,323 @@ +#! usr/bin/python3 +# vim: et ts=4 sw=4 + +# Copyright © 2010-2012 Piotr Ożarowski +# Copyright © 2010 Canonical Ltd +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +import logging +import optparse +import os +import struct +import sys +from os import environ, listdir, mkdir +from os.path import dirname, exists, isdir, join +from subprocess import PIPE, Popen +sys.path.insert(1, '/usr/share/python3/') +from debpython.version import SUPPORTED, debsorted, vrepr, \ + get_requested_versions, parse_vrange, getver +from debpython import files as dpf, PUBLIC_DIR_RE, memoize +from debpython.interpreter import Interpreter +from debpython.option import Option, compile_regexpr + +# initialize script +logging.basicConfig(format='%(levelname).1s: %(module)s:%(lineno)d: ' + '%(message)s') +log = logging.getLogger(__name__) +STDINS = {} +WORKERS = {} + +"""TODO: move it to manpage +Examples: + pycompile -p python3-mako # package's public files + pycompile -p python3-foo /usr/share/foo # package's private files + pycompile -V 3.1 /usr/lib/python3.1/ # python3.1 only + pycompile -V 3.1 /usr/lib/foo/bar.py # python3.1 only + pycompile -V 3.2- /usr/lib/python3/ +""" + + +### EXCLUDES ################################################### +@memoize +def get_exclude_patterns_from_dir(name='/usr/share/python3/bcep/'): + """Return patterns for files that shouldn't be bytecompiled.""" + if not isdir(name): + return [] + + result = [] + for fn in listdir(name): + if fn.startswith('.'): + continue + with open(join(name, fn), 'r', encoding='utf-8') as lines: + for line in lines: + if line.startswith('#'): + continue + line = line.rstrip('\n') + + try: + type_, vrange, dname, pattern = line.split('|', 3) + except ValueError: + pattern = '.*' + type_, vrange, dname = line.split('|', 2) + if type_ != 'file': + dname = dname.rstrip('/') + '/' # make sure it ends with slash + vrange = parse_vrange(vrange) + + versions = get_requested_versions(vrange, available=True) + if not versions: + # pattern doesn't match installed Python versions + continue + + if type_ == 're' or pattern: + try: + pattern = compile_regexpr(None, None, pattern) + except Exception: + log.warning('skipping invalid pattern in file %s, line: %s', fn, line) + continue + + result.append((type_, versions, dname, pattern)) + return result + + +def get_exclude_patterns(directory='/', patterns=None, versions=None): + """Return patterns for files that shouldn't be compiled in given dir.""" + + # make sure directory name ends with a slash + directory = directory.rstrip('/') + '/' + + if versions is not None: + # make sure it's a set (debsorted returns a list) + versions = set(versions) + if patterns: + if versions is None: + versions = set(SUPPORTED) + patterns = [('re', versions, directory, i) for i in patterns] + else: + patterns = [] + + for type_, vers, dname, pattern in get_exclude_patterns_from_dir(): + # skip patterns that do not match requested directory + if not dname.startswith(directory[:len(dname)]): + continue + # skip patterns that do not match requested versions + if versions and not versions & vers: + continue + patterns.append((type_, vers, dname, pattern)) + return patterns + + +def filter_files(files, e_patterns, compile_versions): + """Generate (file, versions_to_compile) pairs.""" + for fpath in files: + valid_versions = set(compile_versions) # all by default + + for type_, vers, dname, pattern in e_patterns: + if not fpath.startswith(dname): + continue + rfpath = fpath[len(dname):] # relative to dname + + if type_ == 'dir': # fpath.startswith(dname) - see above + valid_versions = valid_versions - vers + elif type_ == 'file' and fpath == dname: + valid_versions = valid_versions - vers + elif type_ == 're' and (pattern.match(fpath) or pattern.match(rfpath)): + # NOTE: directory is checked at the beginning of this loop + valid_versions = valid_versions - vers + + # move to the next file if all versions were removed + if not valid_versions: + break + if valid_versions: + public_dir = PUBLIC_DIR_RE.match(fpath) + if public_dir and len(public_dir.group(1)) != 1: + yield fpath, set([getver(public_dir.group(1))]) + else: + yield fpath, valid_versions + + +### COMPILE #################################################### +def py_compile(version, optimize, workers): + if not isinstance(version, str): + version = vrepr(version) + cmd = ["/usr/bin/python" + version] + if optimize: + cmd.append("-O") + cmd += ["-m", "py_compile", "-"] + process = Popen(cmd, bufsize=0, + stdin=PIPE, close_fds=True) + workers[version] = process # keep the reference for .communicate() + stdin = process.stdin + while True: + filename = (yield) + stdin.write(filename.encode('utf-8') + b'\n') + + +def compile(files, versions, force, optimize, e_patterns=None): + global STDINS, WORKERS + # start Python interpreters that will handle byte compilation + for version in versions: + if version not in STDINS: + coroutine = py_compile(version, optimize, WORKERS) + next(coroutine) + STDINS[version] = coroutine + + interpreter = Interpreter('python' if not optimize else 'python -O') + + # byte compile files + skip_dirs = set() + for fn, versions_to_compile in filter_files(files, e_patterns, versions): + for version in versions_to_compile: + cfn = interpreter.cache_file(fn, version) + if version == (3, 1): + if exists(cfn) and not force: + ftime = os.stat(fn).st_mtime + try: + ctime = os.stat(cfn).st_mtime + except os.error: + ctime = 0 + if ctime > ftime: + continue + else: + pycache_dir = dirname(cfn) + if not force: + try: + mtime = int(os.stat(fn).st_mtime) + expect = struct.pack('<4sLL', + interpreter.magic_number(version), + 0, + mtime & 0xFFFF_FFFF) + with open(cfn, 'rb') as chandle: + actual = chandle.read(12) + if expect == actual: + continue + except (IOError, OSError): + pass + if pycache_dir not in skip_dirs and not exists(pycache_dir): + try: + mkdir(pycache_dir) + except Exception as e: + log.error("cannot create directory %s: %r", pycache_dir, e) + skip_dirs.add(pycache_dir) + continue + pipe = STDINS[version] + pipe.send(fn) + + +################################################################ +def main(): + usage = '%prog [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR]\n' +\ + ' %prog -p PACKAGE' + parser = optparse.OptionParser(usage, version='%prog 3.12.3-0ubuntu2.1', + option_class=Option) + parser.add_option('-v', '--verbose', action='store_true', dest='verbose', + help='turn verbose mode on') + parser.add_option('-q', '--quiet', action='store_false', dest='verbose', + default=False, help='be quiet') + parser.add_option('-f', '--force', action='store_true', dest='force', + default=False, + help='force rebuild even if timestamps are up-to-date') + parser.add_option('-O', action='store_true', dest='optimize', + default=False, help="byte-compile to .pyo files") + parser.add_option('-p', '--package', + help='specify Debian package name whose files should be bytecompiled') + parser.add_option('-V', type='version_range', dest='vrange', + help="""force private modules to be bytecompiled +with Python version from given range, regardless of the default Python version +in the system. If there are no other options, bytecompile all public modules +for installed Python versions that match given range. + +VERSION_RANGE examples: '3.1' (version 3.1 only), '3.1-' (version 3.1 or +newer), '3.1-3.3' (version 3.1 or 3.2), '-4.0' (all supported 3.X versions)""") + parser.add_option('-X', '--exclude', action='append', + dest='regexpr', type='regexpr', + help='exclude items that match given REGEXPR. \ +You may use this option multiple times to build up a list of things to exclude.') + + (options, args) = parser.parse_args() + + if options.verbose or environ.get('PYCOMPILE_DEBUG') == '1': + log.setLevel(logging.DEBUG) + log.debug('argv: %s', sys.argv) + log.debug('options: %s', options) + log.debug('args: %s', args) + else: + log.setLevel(logging.WARN) + + if options.regexpr and not args: + parser.error('--exclude option works with private directories ' + 'only, please use /usr/share/python3/bcep to specify ' + 'public modules to skip') + + if options.vrange and options.vrange[0] == options.vrange[1] and\ + options.vrange != (None, None) and\ + exists("/usr/bin/python%d.%d" % options.vrange[0]): + # specific version requested, use it even if it's not in SUPPORTED + versions = {options.vrange[0]} + else: + versions = get_requested_versions(options.vrange, available=True) + if not versions: + log.error('Requested versions are not installed') + exit(3) + + if options.package and args: # package's private directories + # get requested Python version + compile_versions = debsorted(versions)[:1] + log.debug('compile versions: %s', versions) + + pkg_files = tuple(dpf.from_package(options.package)) + for item in args: + e_patterns = get_exclude_patterns(item, options.regexpr, + compile_versions) + if not exists(item): + log.warning('No such file or directory: %s', item) + else: + log.debug('byte compiling %s using Python %s', + item, compile_versions) + files = dpf.filter_directory(pkg_files, item) + compile(files, compile_versions, options.force, + options.optimize, e_patterns) + elif options.package: # package's public modules + # no need to limit versions here, it's either pyr mode or version is + # hardcoded in path / via -V option + e_patterns = get_exclude_patterns() + files = dpf.from_package(options.package) + files = dpf.filter_public(files, versions) + compile(files, versions, + options.force, options.optimize, e_patterns) + elif args: # other directories/files + for item in args: + e_patterns = get_exclude_patterns(item, options.regexpr, versions) + files = dpf.from_directory(item) + compile(files, versions, + options.force, options.optimize, e_patterns) + else: + parser.print_usage() + exit(1) + + # wait for all processes to finish + rv = 0 + for process in WORKERS.values(): + process.communicate() + if process.returncode not in (None, 0): + rv = process.returncode + exit(rv) + +if __name__ == '__main__': + main() diff --git a/squashfs-root/usr/bin/py3versions b/squashfs-root/usr/bin/py3versions new file mode 120000 index 0000000..a7ba981 --- /dev/null +++ b/squashfs-root/usr/bin/py3versions @@ -0,0 +1 @@ +../share/python3/py3versions.py \ No newline at end of file diff --git a/squashfs-root/usr/bin/pydoc3 b/squashfs-root/usr/bin/pydoc3 new file mode 120000 index 0000000..8d6bdc6 --- /dev/null +++ b/squashfs-root/usr/bin/pydoc3 @@ -0,0 +1 @@ +pydoc3.12 \ No newline at end of file diff --git a/squashfs-root/usr/bin/pydoc3.12 b/squashfs-root/usr/bin/pydoc3.12 new file mode 100755 index 0000000..d2eb521 --- /dev/null +++ b/squashfs-root/usr/bin/pydoc3.12 @@ -0,0 +1,5 @@ +#! usr/bin/python3.12 + +import pydoc +if __name__ == '__main__': + pydoc.cli() diff --git a/squashfs-root/usr/bin/pygettext3 b/squashfs-root/usr/bin/pygettext3 new file mode 120000 index 0000000..e58c78d --- /dev/null +++ b/squashfs-root/usr/bin/pygettext3 @@ -0,0 +1 @@ +pygettext3.12 \ No newline at end of file diff --git a/squashfs-root/usr/bin/pygettext3.12 b/squashfs-root/usr/bin/pygettext3.12 new file mode 100755 index 0000000..9b826fb --- /dev/null +++ b/squashfs-root/usr/bin/pygettext3.12 @@ -0,0 +1,681 @@ +#! /usr/bin/python3.12 +# -*- coding: iso-8859-1 -*- +# Originally written by Barry Warsaw +# +# Minimally patched to make it even more xgettext compatible +# by Peter Funk +# +# 2002-11-22 Jürgen Hermann +# Added checks that _() only contains string literals, and +# command line args are resolved to module lists, i.e. you +# can now pass a filename, a module or package name, or a +# directory (including globbing chars, important for Win32). +# Made docstring fit in 80 chars wide displays using pydoc. +# + +# for selftesting +try: + import fintl + _ = fintl.gettext +except ImportError: + _ = lambda s: s + +__doc__ = _("""pygettext -- Python equivalent of xgettext(1) + +Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the +internationalization of C programs. Most of these tools are independent of +the programming language and can be used from within Python programs. +Martin von Loewis' work[1] helps considerably in this regard. + +There's one problem though; xgettext is the program that scans source code +looking for message strings, but it groks only C (or C++). Python +introduces a few wrinkles, such as dual quoting characters, triple quoted +strings, and raw strings. xgettext understands none of this. + +Enter pygettext, which uses Python's standard tokenize module to scan +Python source code, generating .pot files identical to what GNU xgettext[2] +generates for C and C++ code. From there, the standard GNU tools can be +used. + +A word about marking Python strings as candidates for translation. GNU +xgettext recognizes the following keywords: gettext, dgettext, dcgettext, +and gettext_noop. But those can be a lot of text to include all over your +code. C and C++ have a trick: they use the C preprocessor. Most +internationalized C source includes a #define for gettext() to _() so that +what has to be written in the source is much less. Thus these are both +translatable strings: + + gettext("Translatable String") + _("Translatable String") + +Python of course has no preprocessor so this doesn't work so well. Thus, +pygettext searches only for _() by default, but see the -k/--keyword flag +below for how to augment this. + + [1] https://www.python.org/workshops/1997-10/proceedings/loewis.html + [2] https://www.gnu.org/software/gettext/gettext.html + +NOTE: pygettext attempts to be option and feature compatible with GNU +xgettext where ever possible. However some options are still missing or are +not fully implemented. Also, xgettext's use of command line switches with +option arguments is broken, and in these cases, pygettext just defines +additional switches. + +Usage: pygettext [options] inputfile ... + +Options: + + -a + --extract-all + Extract all strings. + + -d name + --default-domain=name + Rename the default output file from messages.pot to name.pot. + + -E + --escape + Replace non-ASCII characters with octal escape sequences. + + -D + --docstrings + Extract module, class, method, and function docstrings. These do + not need to be wrapped in _() markers, and in fact cannot be for + Python to consider them docstrings. (See also the -X option). + + -h + --help + Print this help message and exit. + + -k word + --keyword=word + Keywords to look for in addition to the default set, which are: + %(DEFAULTKEYWORDS)s + + You can have multiple -k flags on the command line. + + -K + --no-default-keywords + Disable the default set of keywords (see above). Any keywords + explicitly added with the -k/--keyword option are still recognized. + + --no-location + Do not write filename/lineno location comments. + + -n + --add-location + Write filename/lineno location comments indicating where each + extracted string is found in the source. These lines appear before + each msgid. The style of comments is controlled by the -S/--style + option. This is the default. + + -o filename + --output=filename + Rename the default output file from messages.pot to filename. If + filename is `-' then the output is sent to standard out. + + -p dir + --output-dir=dir + Output files will be placed in directory dir. + + -S stylename + --style stylename + Specify which style to use for location comments. Two styles are + supported: + + Solaris # File: filename, line: line-number + GNU #: filename:line + + The style name is case insensitive. GNU style is the default. + + -v + --verbose + Print the names of the files being processed. + + -V + --version + Print the version of pygettext and exit. + + -w columns + --width=columns + Set width of output to columns. + + -x filename + --exclude-file=filename + Specify a file that contains a list of strings that are not be + extracted from the input files. Each string to be excluded must + appear on a line by itself in the file. + + -X filename + --no-docstrings=filename + Specify a file that contains a list of files (one per line) that + should not have their docstrings extracted. This is only useful in + conjunction with the -D option above. + +If `inputfile' is -, standard input is read. +""") + +import os +import importlib.machinery +import importlib.util +import sys +import glob +import time +import getopt +import ast +import token +import tokenize + +__version__ = '1.5' + +default_keywords = ['_'] +DEFAULTKEYWORDS = ', '.join(default_keywords) + +EMPTYSTRING = '' + + +# The normal pot-file header. msgmerge and Emacs's po-mode work better if it's +# there. +pot_header = _('''\ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\\n" +"POT-Creation-Date: %(time)s\\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" +"Last-Translator: FULL NAME \\n" +"Language-Team: LANGUAGE \\n" +"MIME-Version: 1.0\\n" +"Content-Type: text/plain; charset=%(charset)s\\n" +"Content-Transfer-Encoding: %(encoding)s\\n" +"Generated-By: pygettext.py %(version)s\\n" + +''') + + +def usage(code, msg=''): + print(__doc__ % globals(), file=sys.stderr) + if msg: + print(msg, file=sys.stderr) + sys.exit(code) + + +def make_escapes(pass_nonascii): + global escapes, escape + if pass_nonascii: + # Allow non-ascii characters to pass through so that e.g. 'msgid + # "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we + # escape any character outside the 32..126 range. + mod = 128 + escape = escape_ascii + else: + mod = 256 + escape = escape_nonascii + escapes = [r"\%03o" % i for i in range(mod)] + for i in range(32, 127): + escapes[i] = chr(i) + escapes[ord('\\')] = r'\\' + escapes[ord('\t')] = r'\t' + escapes[ord('\r')] = r'\r' + escapes[ord('\n')] = r'\n' + escapes[ord('\"')] = r'\"' + + +def escape_ascii(s, encoding): + return ''.join(escapes[ord(c)] if ord(c) < 128 else c for c in s) + +def escape_nonascii(s, encoding): + return ''.join(escapes[b] for b in s.encode(encoding)) + + +def is_literal_string(s): + return s[0] in '\'"' or (s[0] in 'rRuU' and s[1] in '\'"') + + +def safe_eval(s): + # unwrap quotes, safely + return eval(s, {'__builtins__':{}}, {}) + + +def normalize(s, encoding): + # This converts the various Python string types into a format that is + # appropriate for .po files, namely much closer to C style. + lines = s.split('\n') + if len(lines) == 1: + s = '"' + escape(s, encoding) + '"' + else: + if not lines[-1]: + del lines[-1] + lines[-1] = lines[-1] + '\n' + for i in range(len(lines)): + lines[i] = escape(lines[i], encoding) + lineterm = '\\n"\n"' + s = '""\n"' + lineterm.join(lines) + '"' + return s + + +def containsAny(str, set): + """Check whether 'str' contains ANY of the chars in 'set'""" + return 1 in [c in str for c in set] + + +def getFilesForName(name): + """Get a list of module files for a filename, a module or package name, + or a directory. + """ + if not os.path.exists(name): + # check for glob chars + if containsAny(name, "*?[]"): + files = glob.glob(name) + list = [] + for file in files: + list.extend(getFilesForName(file)) + return list + + # try to find module or package + try: + spec = importlib.util.find_spec(name) + name = spec.origin + except ImportError: + name = None + if not name: + return [] + + if os.path.isdir(name): + # find all python files in directory + list = [] + # get extension for python source files + _py_ext = importlib.machinery.SOURCE_SUFFIXES[0] + for root, dirs, files in os.walk(name): + # don't recurse into CVS directories + if 'CVS' in dirs: + dirs.remove('CVS') + # add all *.py files to list + list.extend( + [os.path.join(root, file) for file in files + if os.path.splitext(file)[1] == _py_ext] + ) + return list + elif os.path.exists(name): + # a single file + return [name] + + return [] + + +class TokenEater: + def __init__(self, options): + self.__options = options + self.__messages = {} + self.__state = self.__waiting + self.__data = [] + self.__lineno = -1 + self.__freshmodule = 1 + self.__curfile = None + self.__enclosurecount = 0 + + def __call__(self, ttype, tstring, stup, etup, line): + # dispatch +## import token +## print('ttype:', token.tok_name[ttype], 'tstring:', tstring, +## file=sys.stderr) + self.__state(ttype, tstring, stup[0]) + + def __waiting(self, ttype, tstring, lineno): + opts = self.__options + # Do docstring extractions, if enabled + if opts.docstrings and not opts.nodocstrings.get(self.__curfile): + # module docstring? + if self.__freshmodule: + if ttype == tokenize.STRING and is_literal_string(tstring): + self.__addentry(safe_eval(tstring), lineno, isdocstring=1) + self.__freshmodule = 0 + return + if ttype in (tokenize.COMMENT, tokenize.NL, tokenize.ENCODING): + return + self.__freshmodule = 0 + # class or func/method docstring? + if ttype == tokenize.NAME and tstring in ('class', 'def'): + self.__state = self.__suiteseen + return + if ttype == tokenize.NAME and tstring in opts.keywords: + self.__state = self.__keywordseen + return + if ttype == tokenize.STRING: + maybe_fstring = ast.parse(tstring, mode='eval').body + if not isinstance(maybe_fstring, ast.JoinedStr): + return + for value in filter(lambda node: isinstance(node, ast.FormattedValue), + maybe_fstring.values): + for call in filter(lambda node: isinstance(node, ast.Call), + ast.walk(value)): + func = call.func + if isinstance(func, ast.Name): + func_name = func.id + elif isinstance(func, ast.Attribute): + func_name = func.attr + else: + continue + + if func_name not in opts.keywords: + continue + if len(call.args) != 1: + print(_( + '*** %(file)s:%(lineno)s: Seen unexpected amount of' + ' positional arguments in gettext call: %(source_segment)s' + ) % { + 'source_segment': ast.get_source_segment(tstring, call) or tstring, + 'file': self.__curfile, + 'lineno': lineno + }, file=sys.stderr) + continue + if call.keywords: + print(_( + '*** %(file)s:%(lineno)s: Seen unexpected keyword arguments' + ' in gettext call: %(source_segment)s' + ) % { + 'source_segment': ast.get_source_segment(tstring, call) or tstring, + 'file': self.__curfile, + 'lineno': lineno + }, file=sys.stderr) + continue + arg = call.args[0] + if not isinstance(arg, ast.Constant): + print(_( + '*** %(file)s:%(lineno)s: Seen unexpected argument type' + ' in gettext call: %(source_segment)s' + ) % { + 'source_segment': ast.get_source_segment(tstring, call) or tstring, + 'file': self.__curfile, + 'lineno': lineno + }, file=sys.stderr) + continue + if isinstance(arg.value, str): + self.__addentry(arg.value, lineno) + + def __suiteseen(self, ttype, tstring, lineno): + # skip over any enclosure pairs until we see the colon + if ttype == tokenize.OP: + if tstring == ':' and self.__enclosurecount == 0: + # we see a colon and we're not in an enclosure: end of def + self.__state = self.__suitedocstring + elif tstring in '([{': + self.__enclosurecount += 1 + elif tstring in ')]}': + self.__enclosurecount -= 1 + + def __suitedocstring(self, ttype, tstring, lineno): + # ignore any intervening noise + if ttype == tokenize.STRING and is_literal_string(tstring): + self.__addentry(safe_eval(tstring), lineno, isdocstring=1) + self.__state = self.__waiting + elif ttype not in (tokenize.NEWLINE, tokenize.INDENT, + tokenize.COMMENT): + # there was no class docstring + self.__state = self.__waiting + + def __keywordseen(self, ttype, tstring, lineno): + if ttype == tokenize.OP and tstring == '(': + self.__data = [] + self.__lineno = lineno + self.__state = self.__openseen + else: + self.__state = self.__waiting + + def __openseen(self, ttype, tstring, lineno): + if ttype == tokenize.OP and tstring == ')': + # We've seen the last of the translatable strings. Record the + # line number of the first line of the strings and update the list + # of messages seen. Reset state for the next batch. If there + # were no strings inside _(), then just ignore this entry. + if self.__data: + self.__addentry(EMPTYSTRING.join(self.__data)) + self.__state = self.__waiting + elif ttype == tokenize.STRING and is_literal_string(tstring): + self.__data.append(safe_eval(tstring)) + elif ttype not in [tokenize.COMMENT, token.INDENT, token.DEDENT, + token.NEWLINE, tokenize.NL]: + # warn if we see anything else than STRING or whitespace + print(_( + '*** %(file)s:%(lineno)s: Seen unexpected token "%(token)s"' + ) % { + 'token': tstring, + 'file': self.__curfile, + 'lineno': self.__lineno + }, file=sys.stderr) + self.__state = self.__waiting + + def __addentry(self, msg, lineno=None, isdocstring=0): + if lineno is None: + lineno = self.__lineno + if not msg in self.__options.toexclude: + entry = (self.__curfile, lineno) + self.__messages.setdefault(msg, {})[entry] = isdocstring + + def set_filename(self, filename): + self.__curfile = filename + self.__freshmodule = 1 + + def write(self, fp): + options = self.__options + timestamp = time.strftime('%Y-%m-%d %H:%M%z') + encoding = fp.encoding if fp.encoding else 'UTF-8' + print(pot_header % {'time': timestamp, 'version': __version__, + 'charset': encoding, + 'encoding': '8bit'}, file=fp) + # Sort the entries. First sort each particular entry's keys, then + # sort all the entries by their first item. + reverse = {} + for k, v in self.__messages.items(): + keys = sorted(v.keys()) + reverse.setdefault(tuple(keys), []).append((k, v)) + rkeys = sorted(reverse.keys()) + for rkey in rkeys: + rentries = reverse[rkey] + rentries.sort() + for k, v in rentries: + # If the entry was gleaned out of a docstring, then add a + # comment stating so. This is to aid translators who may wish + # to skip translating some unimportant docstrings. + isdocstring = any(v.values()) + # k is the message string, v is a dictionary-set of (filename, + # lineno) tuples. We want to sort the entries in v first by + # file name and then by line number. + v = sorted(v.keys()) + if not options.writelocations: + pass + # location comments are different b/w Solaris and GNU: + elif options.locationstyle == options.SOLARIS: + for filename, lineno in v: + d = {'filename': filename, 'lineno': lineno} + print(_( + '# File: %(filename)s, line: %(lineno)d') % d, file=fp) + elif options.locationstyle == options.GNU: + # fit as many locations on one line, as long as the + # resulting line length doesn't exceed 'options.width' + locline = '#:' + for filename, lineno in v: + d = {'filename': filename, 'lineno': lineno} + s = _(' %(filename)s:%(lineno)d') % d + if len(locline) + len(s) <= options.width: + locline = locline + s + else: + print(locline, file=fp) + locline = "#:" + s + if len(locline) > 2: + print(locline, file=fp) + if isdocstring: + print('#, docstring', file=fp) + print('msgid', normalize(k, encoding), file=fp) + print('msgstr ""\n', file=fp) + + +def main(): + global default_keywords + try: + opts, args = getopt.getopt( + sys.argv[1:], + 'ad:DEhk:Kno:p:S:Vvw:x:X:', + ['extract-all', 'default-domain=', 'escape', 'help', + 'keyword=', 'no-default-keywords', + 'add-location', 'no-location', 'output=', 'output-dir=', + 'style=', 'verbose', 'version', 'width=', 'exclude-file=', + 'docstrings', 'no-docstrings', + ]) + except getopt.error as msg: + usage(1, msg) + + # for holding option values + class Options: + # constants + GNU = 1 + SOLARIS = 2 + # defaults + extractall = 0 # FIXME: currently this option has no effect at all. + escape = 0 + keywords = [] + outpath = '' + outfile = 'messages.pot' + writelocations = 1 + locationstyle = GNU + verbose = 0 + width = 78 + excludefilename = '' + docstrings = 0 + nodocstrings = {} + + options = Options() + locations = {'gnu' : options.GNU, + 'solaris' : options.SOLARIS, + } + + # parse options + for opt, arg in opts: + if opt in ('-h', '--help'): + usage(0) + elif opt in ('-a', '--extract-all'): + options.extractall = 1 + elif opt in ('-d', '--default-domain'): + options.outfile = arg + '.pot' + elif opt in ('-E', '--escape'): + options.escape = 1 + elif opt in ('-D', '--docstrings'): + options.docstrings = 1 + elif opt in ('-k', '--keyword'): + options.keywords.append(arg) + elif opt in ('-K', '--no-default-keywords'): + default_keywords = [] + elif opt in ('-n', '--add-location'): + options.writelocations = 1 + elif opt in ('--no-location',): + options.writelocations = 0 + elif opt in ('-S', '--style'): + options.locationstyle = locations.get(arg.lower()) + if options.locationstyle is None: + usage(1, _('Invalid value for --style: %s') % arg) + elif opt in ('-o', '--output'): + options.outfile = arg + elif opt in ('-p', '--output-dir'): + options.outpath = arg + elif opt in ('-v', '--verbose'): + options.verbose = 1 + elif opt in ('-V', '--version'): + print(_('pygettext.py (xgettext for Python) %s') % __version__) + sys.exit(0) + elif opt in ('-w', '--width'): + try: + options.width = int(arg) + except ValueError: + usage(1, _('--width argument must be an integer: %s') % arg) + elif opt in ('-x', '--exclude-file'): + options.excludefilename = arg + elif opt in ('-X', '--no-docstrings'): + fp = open(arg) + try: + while 1: + line = fp.readline() + if not line: + break + options.nodocstrings[line[:-1]] = 1 + finally: + fp.close() + + # calculate escapes + make_escapes(not options.escape) + + # calculate all keywords + options.keywords.extend(default_keywords) + + # initialize list of strings to exclude + if options.excludefilename: + try: + with open(options.excludefilename) as fp: + options.toexclude = fp.readlines() + except IOError: + print(_( + "Can't read --exclude-file: %s") % options.excludefilename, file=sys.stderr) + sys.exit(1) + else: + options.toexclude = [] + + # resolve args to module lists + expanded = [] + for arg in args: + if arg == '-': + expanded.append(arg) + else: + expanded.extend(getFilesForName(arg)) + args = expanded + + # slurp through all the files + eater = TokenEater(options) + for filename in args: + if filename == '-': + if options.verbose: + print(_('Reading standard input')) + fp = sys.stdin.buffer + closep = 0 + else: + if options.verbose: + print(_('Working on %s') % filename) + fp = open(filename, 'rb') + closep = 1 + try: + eater.set_filename(filename) + try: + tokens = tokenize.tokenize(fp.readline) + for _token in tokens: + eater(*_token) + except tokenize.TokenError as e: + print('%s: %s, line %d, column %d' % ( + e.args[0], filename, e.args[1][0], e.args[1][1]), + file=sys.stderr) + finally: + if closep: + fp.close() + + # write the output + if options.outfile == '-': + fp = sys.stdout + closep = 0 + else: + if options.outpath: + options.outfile = os.path.join(options.outpath, options.outfile) + fp = open(options.outfile, 'w') + closep = 1 + try: + eater.write(fp) + finally: + if closep: + fp.close() + + +if __name__ == '__main__': + main() + # some more test strings + # this one creates a warning + _('*** Seen unexpected token "%(token)s"') % {'token': 'test'} + _('more' 'than' 'one' 'string') diff --git a/squashfs-root/usr/bin/python3 b/squashfs-root/usr/bin/python3 new file mode 120000 index 0000000..11b9d88 --- /dev/null +++ b/squashfs-root/usr/bin/python3 @@ -0,0 +1 @@ +python3.12 \ No newline at end of file diff --git a/squashfs-root/usr/bin/python3.12 b/squashfs-root/usr/bin/python3.12 new file mode 100755 index 0000000..d74bd65 Binary files /dev/null and b/squashfs-root/usr/bin/python3.12 differ diff --git a/squashfs-root/usr/bin/rename.ul b/squashfs-root/usr/bin/rename.ul new file mode 100755 index 0000000..e683b91 Binary files /dev/null and b/squashfs-root/usr/bin/rename.ul differ diff --git a/squashfs-root/usr/bin/resizepart b/squashfs-root/usr/bin/resizepart new file mode 100755 index 0000000..a60ae19 Binary files /dev/null and b/squashfs-root/usr/bin/resizepart differ diff --git a/squashfs-root/usr/bin/rev b/squashfs-root/usr/bin/rev new file mode 100755 index 0000000..d6d4048 Binary files /dev/null and b/squashfs-root/usr/bin/rev differ diff --git a/squashfs-root/usr/bin/setarch b/squashfs-root/usr/bin/setarch new file mode 100755 index 0000000..8032021 Binary files /dev/null and b/squashfs-root/usr/bin/setarch differ diff --git a/squashfs-root/usr/bin/setpriv b/squashfs-root/usr/bin/setpriv new file mode 100755 index 0000000..8ab7a96 Binary files /dev/null and b/squashfs-root/usr/bin/setpriv differ diff --git a/squashfs-root/usr/bin/setsid b/squashfs-root/usr/bin/setsid new file mode 100755 index 0000000..c7d398a Binary files /dev/null and b/squashfs-root/usr/bin/setsid differ diff --git a/squashfs-root/usr/bin/setterm b/squashfs-root/usr/bin/setterm new file mode 100755 index 0000000..48e45a0 Binary files /dev/null and b/squashfs-root/usr/bin/setterm differ diff --git a/squashfs-root/usr/bin/skill b/squashfs-root/usr/bin/skill new file mode 100755 index 0000000..609e80e Binary files /dev/null and b/squashfs-root/usr/bin/skill differ diff --git a/squashfs-root/usr/bin/slabtop b/squashfs-root/usr/bin/slabtop new file mode 100755 index 0000000..6b7fbdc Binary files /dev/null and b/squashfs-root/usr/bin/slabtop differ diff --git a/squashfs-root/usr/bin/snice b/squashfs-root/usr/bin/snice new file mode 120000 index 0000000..8b9b83d --- /dev/null +++ b/squashfs-root/usr/bin/snice @@ -0,0 +1 @@ +skill \ No newline at end of file diff --git a/squashfs-root/usr/bin/su b/squashfs-root/usr/bin/su new file mode 100755 index 0000000..b37f5d7 Binary files /dev/null and b/squashfs-root/usr/bin/su differ diff --git a/squashfs-root/usr/bin/systemctl b/squashfs-root/usr/bin/systemctl new file mode 100755 index 0000000..78df7f0 Binary files /dev/null and b/squashfs-root/usr/bin/systemctl differ diff --git a/squashfs-root/usr/bin/systemd b/squashfs-root/usr/bin/systemd new file mode 120000 index 0000000..89bef32 --- /dev/null +++ b/squashfs-root/usr/bin/systemd @@ -0,0 +1 @@ +../lib/systemd/systemd \ No newline at end of file diff --git a/squashfs-root/usr/bin/systemd-ac-power b/squashfs-root/usr/bin/systemd-ac-power new file mode 100755 index 0000000..1576ab3 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-ac-power differ diff --git a/squashfs-root/usr/bin/systemd-analyze b/squashfs-root/usr/bin/systemd-analyze new file mode 100755 index 0000000..5c5c80d Binary files /dev/null and b/squashfs-root/usr/bin/systemd-analyze differ diff --git a/squashfs-root/usr/bin/systemd-ask-password b/squashfs-root/usr/bin/systemd-ask-password new file mode 100755 index 0000000..a1b0892 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-ask-password differ diff --git a/squashfs-root/usr/bin/systemd-cat b/squashfs-root/usr/bin/systemd-cat new file mode 100755 index 0000000..644f3be Binary files /dev/null and b/squashfs-root/usr/bin/systemd-cat differ diff --git a/squashfs-root/usr/bin/systemd-cgls b/squashfs-root/usr/bin/systemd-cgls new file mode 100755 index 0000000..ac13040 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-cgls differ diff --git a/squashfs-root/usr/bin/systemd-cgtop b/squashfs-root/usr/bin/systemd-cgtop new file mode 100755 index 0000000..28d1cd5 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-cgtop differ diff --git a/squashfs-root/usr/bin/systemd-confext b/squashfs-root/usr/bin/systemd-confext new file mode 120000 index 0000000..87bcd0c --- /dev/null +++ b/squashfs-root/usr/bin/systemd-confext @@ -0,0 +1 @@ +systemd-sysext \ No newline at end of file diff --git a/squashfs-root/usr/bin/systemd-creds b/squashfs-root/usr/bin/systemd-creds new file mode 100755 index 0000000..26d5edd Binary files /dev/null and b/squashfs-root/usr/bin/systemd-creds differ diff --git a/squashfs-root/usr/bin/systemd-cryptenroll b/squashfs-root/usr/bin/systemd-cryptenroll new file mode 100755 index 0000000..335fdbd Binary files /dev/null and b/squashfs-root/usr/bin/systemd-cryptenroll differ diff --git a/squashfs-root/usr/bin/systemd-cryptsetup b/squashfs-root/usr/bin/systemd-cryptsetup new file mode 100755 index 0000000..808e182 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-cryptsetup differ diff --git a/squashfs-root/usr/bin/systemd-delta b/squashfs-root/usr/bin/systemd-delta new file mode 100755 index 0000000..62cda70 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-delta differ diff --git a/squashfs-root/usr/bin/systemd-detect-virt b/squashfs-root/usr/bin/systemd-detect-virt new file mode 100755 index 0000000..ac3ef05 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-detect-virt differ diff --git a/squashfs-root/usr/bin/systemd-escape b/squashfs-root/usr/bin/systemd-escape new file mode 100755 index 0000000..32b895b Binary files /dev/null and b/squashfs-root/usr/bin/systemd-escape differ diff --git a/squashfs-root/usr/bin/systemd-firstboot b/squashfs-root/usr/bin/systemd-firstboot new file mode 100755 index 0000000..216a579 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-firstboot differ diff --git a/squashfs-root/usr/bin/systemd-id128 b/squashfs-root/usr/bin/systemd-id128 new file mode 100755 index 0000000..0eb8353 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-id128 differ diff --git a/squashfs-root/usr/bin/systemd-inhibit b/squashfs-root/usr/bin/systemd-inhibit new file mode 100755 index 0000000..6dc292c Binary files /dev/null and b/squashfs-root/usr/bin/systemd-inhibit differ diff --git a/squashfs-root/usr/bin/systemd-machine-id-setup b/squashfs-root/usr/bin/systemd-machine-id-setup new file mode 100755 index 0000000..7892728 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-machine-id-setup differ diff --git a/squashfs-root/usr/bin/systemd-mount b/squashfs-root/usr/bin/systemd-mount new file mode 100755 index 0000000..9a2962b Binary files /dev/null and b/squashfs-root/usr/bin/systemd-mount differ diff --git a/squashfs-root/usr/bin/systemd-notify b/squashfs-root/usr/bin/systemd-notify new file mode 100755 index 0000000..3c1ebae Binary files /dev/null and b/squashfs-root/usr/bin/systemd-notify differ diff --git a/squashfs-root/usr/bin/systemd-path b/squashfs-root/usr/bin/systemd-path new file mode 100755 index 0000000..60374df Binary files /dev/null and b/squashfs-root/usr/bin/systemd-path differ diff --git a/squashfs-root/usr/bin/systemd-repart b/squashfs-root/usr/bin/systemd-repart new file mode 100755 index 0000000..88a0584 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-repart differ diff --git a/squashfs-root/usr/bin/systemd-run b/squashfs-root/usr/bin/systemd-run new file mode 100755 index 0000000..ed962d6 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-run differ diff --git a/squashfs-root/usr/bin/systemd-socket-activate b/squashfs-root/usr/bin/systemd-socket-activate new file mode 100755 index 0000000..f4fdf9b Binary files /dev/null and b/squashfs-root/usr/bin/systemd-socket-activate differ diff --git a/squashfs-root/usr/bin/systemd-stdio-bridge b/squashfs-root/usr/bin/systemd-stdio-bridge new file mode 100755 index 0000000..9d6bfc0 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-stdio-bridge differ diff --git a/squashfs-root/usr/bin/systemd-sysext b/squashfs-root/usr/bin/systemd-sysext new file mode 100755 index 0000000..e7163b3 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-sysext differ diff --git a/squashfs-root/usr/bin/systemd-sysusers b/squashfs-root/usr/bin/systemd-sysusers new file mode 100755 index 0000000..7fedb57 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-sysusers differ diff --git a/squashfs-root/usr/bin/systemd-tmpfiles b/squashfs-root/usr/bin/systemd-tmpfiles new file mode 100755 index 0000000..280a9ac Binary files /dev/null and b/squashfs-root/usr/bin/systemd-tmpfiles differ diff --git a/squashfs-root/usr/bin/systemd-tty-ask-password-agent b/squashfs-root/usr/bin/systemd-tty-ask-password-agent new file mode 100755 index 0000000..d4200c9 Binary files /dev/null and b/squashfs-root/usr/bin/systemd-tty-ask-password-agent differ diff --git a/squashfs-root/usr/bin/systemd-umount b/squashfs-root/usr/bin/systemd-umount new file mode 120000 index 0000000..7a46fb1 --- /dev/null +++ b/squashfs-root/usr/bin/systemd-umount @@ -0,0 +1 @@ +systemd-mount \ No newline at end of file diff --git a/squashfs-root/usr/bin/taskset b/squashfs-root/usr/bin/taskset new file mode 100755 index 0000000..20a36cb Binary files /dev/null and b/squashfs-root/usr/bin/taskset differ diff --git a/squashfs-root/usr/bin/timedatectl b/squashfs-root/usr/bin/timedatectl new file mode 100755 index 0000000..7fc4992 Binary files /dev/null and b/squashfs-root/usr/bin/timedatectl differ diff --git a/squashfs-root/usr/bin/tload b/squashfs-root/usr/bin/tload new file mode 100755 index 0000000..17269cf Binary files /dev/null and b/squashfs-root/usr/bin/tload differ diff --git a/squashfs-root/usr/bin/top b/squashfs-root/usr/bin/top new file mode 100755 index 0000000..7ba675f Binary files /dev/null and b/squashfs-root/usr/bin/top differ diff --git a/squashfs-root/usr/bin/uclampset b/squashfs-root/usr/bin/uclampset new file mode 100755 index 0000000..2ad251f Binary files /dev/null and b/squashfs-root/usr/bin/uclampset differ diff --git a/squashfs-root/usr/bin/umount b/squashfs-root/usr/bin/umount new file mode 100755 index 0000000..04659f6 Binary files /dev/null and b/squashfs-root/usr/bin/umount differ diff --git a/squashfs-root/usr/bin/unshare b/squashfs-root/usr/bin/unshare new file mode 100755 index 0000000..105ec2b Binary files /dev/null and b/squashfs-root/usr/bin/unshare differ diff --git a/squashfs-root/usr/bin/uptime b/squashfs-root/usr/bin/uptime new file mode 100755 index 0000000..f209668 Binary files /dev/null and b/squashfs-root/usr/bin/uptime differ diff --git a/squashfs-root/usr/bin/utmpdump b/squashfs-root/usr/bin/utmpdump new file mode 100755 index 0000000..e539416 Binary files /dev/null and b/squashfs-root/usr/bin/utmpdump differ diff --git a/squashfs-root/usr/bin/varlinkctl b/squashfs-root/usr/bin/varlinkctl new file mode 100755 index 0000000..8caed2a Binary files /dev/null and b/squashfs-root/usr/bin/varlinkctl differ diff --git a/squashfs-root/usr/bin/vmstat b/squashfs-root/usr/bin/vmstat new file mode 100755 index 0000000..1038a78 Binary files /dev/null and b/squashfs-root/usr/bin/vmstat differ diff --git a/squashfs-root/usr/bin/w b/squashfs-root/usr/bin/w new file mode 100755 index 0000000..f99a183 Binary files /dev/null and b/squashfs-root/usr/bin/w differ diff --git a/squashfs-root/usr/bin/watch b/squashfs-root/usr/bin/watch new file mode 100755 index 0000000..0b0b930 Binary files /dev/null and b/squashfs-root/usr/bin/watch differ diff --git a/squashfs-root/usr/bin/wdctl b/squashfs-root/usr/bin/wdctl new file mode 100755 index 0000000..1ab2f2d Binary files /dev/null and b/squashfs-root/usr/bin/wdctl differ diff --git a/squashfs-root/usr/bin/whereis b/squashfs-root/usr/bin/whereis new file mode 100755 index 0000000..8a3b323 Binary files /dev/null and b/squashfs-root/usr/bin/whereis differ diff --git a/squashfs-root/usr/bin/x86_64 b/squashfs-root/usr/bin/x86_64 new file mode 120000 index 0000000..da0d0cc --- /dev/null +++ b/squashfs-root/usr/bin/x86_64 @@ -0,0 +1 @@ +setarch \ No newline at end of file diff --git a/squashfs-root/usr/lib/binfmt.d/python3.12.conf b/squashfs-root/usr/lib/binfmt.d/python3.12.conf new file mode 100644 index 0000000..d896686 --- /dev/null +++ b/squashfs-root/usr/lib/binfmt.d/python3.12.conf @@ -0,0 +1 @@ +:python3.12:M::\xcb\x0d\x0d\x0a::/usr/bin/python3.12: diff --git a/squashfs-root/usr/lib/dbus-1.0/dbus-daemon-launch-helper b/squashfs-root/usr/lib/dbus-1.0/dbus-daemon-launch-helper new file mode 100755 index 0000000..3b18a7e Binary files /dev/null and b/squashfs-root/usr/lib/dbus-1.0/dbus-daemon-launch-helper differ diff --git a/squashfs-root/usr/lib/environment.d/99-environment.conf b/squashfs-root/usr/lib/environment.d/99-environment.conf new file mode 120000 index 0000000..de31f27 --- /dev/null +++ b/squashfs-root/usr/lib/environment.d/99-environment.conf @@ -0,0 +1 @@ +../../../etc/environment \ No newline at end of file diff --git a/squashfs-root/usr/lib/kernel/install.conf b/squashfs-root/usr/lib/kernel/install.conf new file mode 100644 index 0000000..4520c01 --- /dev/null +++ b/squashfs-root/usr/lib/kernel/install.conf @@ -0,0 +1,12 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# See kernel-install(8) for details. + +#layout=bls|other|... +#initrd_generator=dracut|... +#uki_generator=ukify|... diff --git a/squashfs-root/usr/lib/kernel/install.d/50-depmod.install b/squashfs-root/usr/lib/kernel/install.d/50-depmod.install new file mode 100755 index 0000000..88f858f --- /dev/null +++ b/squashfs-root/usr/lib/kernel/install.d/50-depmod.install @@ -0,0 +1,53 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . + +set -e + +COMMAND="${1:?}" +KERNEL_VERSION="${2:?}" + +[ -w "/lib/modules" ] || exit 0 + +case "$COMMAND" in + add) + [ -d "/lib/modules/$KERNEL_VERSION/kernel" ] || exit 0 + command -v depmod >/dev/null || exit 0 + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+depmod -a $KERNEL_VERSION" + exec depmod -a "$KERNEL_VERSION" + ;; + remove) + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ + echo "Removing /lib/modules/${KERNEL_VERSION}/modules.dep and associated files" + exec rm -f \ + "/lib/modules/$KERNEL_VERSION/modules.alias" \ + "/lib/modules/$KERNEL_VERSION/modules.alias.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.builtin.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.builtin.alias.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.dep" \ + "/lib/modules/$KERNEL_VERSION/modules.dep.bin" \ + "/lib/modules/$KERNEL_VERSION/modules.devname" \ + "/lib/modules/$KERNEL_VERSION/modules.softdep" \ + "/lib/modules/$KERNEL_VERSION/modules.symbols" \ + "/lib/modules/$KERNEL_VERSION/modules.symbols.bin" + ;; + *) + exit 0 + ;; +esac diff --git a/squashfs-root/usr/lib/kernel/install.d/55-initrd.install b/squashfs-root/usr/lib/kernel/install.d/55-initrd.install new file mode 100755 index 0000000..ecbed87 --- /dev/null +++ b/squashfs-root/usr/lib/kernel/install.d/55-initrd.install @@ -0,0 +1,26 @@ +#!/bin/sh +set -eu +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +COMMAND="$1" +KERNEL_VERSION="$2" + +INITRD_SRC="/boot/initrd.img-$KERNEL_VERSION" + +[ "$COMMAND" = add ] || exit 0 + +if [ "$#" -ge 5 ]; then + # Explicit initrd paths were passed, fall through to default 90-loaderentry.install handling; + # we'd be either injecting an unwanted image or, worse, overriding a user-provided one + exit 0 +fi + +if [ -e "$INITRD_SRC" ]; then + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing '$INITRD_SRC'" + ln -fs "$INITRD_SRC" "$KERNEL_INSTALL_STAGING_AREA" +else + echo "$INITRD_SRC does not exist, not installing an initrd" +fi + +exit 0 diff --git a/squashfs-root/usr/lib/kernel/install.d/90-loaderentry.install b/squashfs-root/usr/lib/kernel/install.d/90-loaderentry.install new file mode 100755 index 0000000..0704da0 --- /dev/null +++ b/squashfs-root/usr/lib/kernel/install.d/90-loaderentry.install @@ -0,0 +1,210 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . + +set -e + +COMMAND="${1:?}" +KERNEL_VERSION="${2:?}" +ENTRY_DIR_ABS="${3:?}" +KERNEL_IMAGE="$4" +INITRD_OPTIONS_SHIFT=4 + +[ "$KERNEL_INSTALL_LAYOUT" = "bls" ] || exit 0 + +MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID:?}" +ENTRY_TOKEN="${KERNEL_INSTALL_ENTRY_TOKEN:?}" +BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT:?}" + +[ -n "$BOOT_MNT" ] || BOOT_MNT="$(stat -c %m "$BOOT_ROOT")" +if [ "$BOOT_MNT" = '/' ]; then + ENTRY_DIR="$ENTRY_DIR_ABS" +else + ENTRY_DIR="${ENTRY_DIR_ABS#"$BOOT_MNT"}" +fi + +KERNEL_DEST="$ENTRY_DIR_ABS/linux" +KERNEL_ENTRY="$ENTRY_DIR/linux" +LOADER_ENTRY="$BOOT_ROOT/loader/entries/$ENTRY_TOKEN-$KERNEL_VERSION.conf" + +case "$COMMAND" in + remove) + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ + echo "Removing ${LOADER_ENTRY%.conf}*.conf" + exec rm -f \ + "$LOADER_ENTRY" \ + "${LOADER_ENTRY%.conf}"*".conf" + ;; + add) + ;; + *) + exit 0 + ;; +esac + +if [ -f /etc/os-release ]; then + # shellcheck source=/dev/null + . /etc/os-release +elif [ -f /usr/lib/os-release ]; then + # shellcheck source=/dev/null + . /usr/lib/os-release +fi + +[ -n "$PRETTY_NAME" ] || PRETTY_NAME="Linux $KERNEL_VERSION" + +SORT_KEY="$IMAGE_ID" +[ -z "$SORT_KEY" ] && SORT_KEY="$ID" + +if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then + if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then + BOOT_OPTIONS="$(tr -s "$IFS" ' ' <"$KERNEL_INSTALL_CONF_ROOT/cmdline")" + fi +elif [ -f /etc/kernel/cmdline ]; then + BOOT_OPTIONS="$(tr -s "$IFS" ' ' &2 + exit 1 + fi + LOADER_ENTRY="${LOADER_ENTRY%.conf}+$TRIES.conf" +fi + +if ! [ -d "$ENTRY_DIR_ABS" ]; then + echo "Error: entry directory '$ENTRY_DIR_ABS' does not exist" >&2 + exit 1 +fi + +install -m 0644 "$KERNEL_IMAGE" "$KERNEL_DEST" || { + echo "Error: could not copy '$KERNEL_IMAGE' to '$KERNEL_DEST'." >&2 + exit 1 +} +chown root:root "$KERNEL_DEST" || : + +if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then + if [ -f "$KERNEL_INSTALL_CONF_ROOT/devicetree" ]; then + read -r DEVICETREE <"$KERNEL_INSTALL_CONF_ROOT/devicetree" + fi +elif [ -f /etc/kernel/devicetree ]; then + read -r DEVICETREE &2 + exit 1 + } + + DEVICETREE_DEST="$ENTRY_DIR_ABS/${DEVICETREE##*/}" + DEVICETREE_ENTRY="$ENTRY_DIR/${DEVICETREE##*/}" + + install -m 0644 "$DEVICETREE_SRC" "$DEVICETREE_DEST" || { + echo "Error: could not copy '$DEVICETREE_SRC' to '$DEVICETREE_DEST'." >&2 + exit 1 + } + chown root:root "$DEVICETREE_DEST" || : +fi + +shift "$INITRD_OPTIONS_SHIFT" +# All files listed as arguments, and staged files starting with "initrd" are installed as initrds. +for initrd in "${KERNEL_INSTALL_STAGING_AREA}"/microcode* "${@}" "${KERNEL_INSTALL_STAGING_AREA}"/initrd*; do + [ -f "$initrd" ] || { + case "$initrd" in + "${KERNEL_INSTALL_STAGING_AREA}/initrd*" | "${KERNEL_INSTALL_STAGING_AREA}/microcode*") + continue ;; + esac + echo "Error: '$initrd' is not a file." >&2 + exit 1 + } + + initrd_basename="${initrd##*/}" + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $ENTRY_DIR_ABS/$initrd_basename" + install -m 0644 "$initrd" "$ENTRY_DIR_ABS/$initrd_basename" || { + echo "Error: could not copy '$initrd' to '$ENTRY_DIR_ABS/$initrd_basename'." >&2 + exit 1 + } + chown root:root "$ENTRY_DIR_ABS/$initrd_basename" || : +done + +mkdir -p "${LOADER_ENTRY%/*}" || { + echo "Error: could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2 + exit 1 +} + +[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Creating $LOADER_ENTRY" +{ + echo "# Boot Loader Specification type#1 entry" + echo "# File created by $0 (systemd 255.4-1ubuntu8.17)" + echo "title $PRETTY_NAME" + echo "version $KERNEL_VERSION" + if [ "$ENTRY_TOKEN" = "$MACHINE_ID" ]; then + # See similar logic above for the systemd.machine_id= kernel command line option + echo "machine-id $MACHINE_ID" + fi + [ -n "$SORT_KEY" ] && echo "sort-key $SORT_KEY" + echo "options $BOOT_OPTIONS" + echo "linux $KERNEL_ENTRY" + [ -n "$DEVICETREE_ENTRY" ] && echo "devicetree $DEVICETREE_ENTRY" + + have_initrd= + for initrd in "${KERNEL_INSTALL_STAGING_AREA}"/microcode* "${@}" "${KERNEL_INSTALL_STAGING_AREA}"/initrd*; do + [ -f "$initrd" ] || continue + echo "initrd $ENTRY_DIR/${initrd##*/}" + have_initrd=yes + done + + # Try "initrd", generated by dracut in its kernel-install hook, if no initrds were supplied + [ -z "$have_initrd" ] && [ -f "$ENTRY_DIR_ABS/initrd" ] && echo "initrd $ENTRY_DIR/initrd" + : +} >"$LOADER_ENTRY" || { + echo "Error: could not create loader entry '$LOADER_ENTRY'." >&2 + exit 1 +} +exit 0 diff --git a/squashfs-root/usr/lib/kernel/install.d/90-uki-copy.install b/squashfs-root/usr/lib/kernel/install.d/90-uki-copy.install new file mode 100755 index 0000000..c66c097 --- /dev/null +++ b/squashfs-root/usr/lib/kernel/install.d/90-uki-copy.install @@ -0,0 +1,97 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . + +set -e + +COMMAND="${1:?}" +KERNEL_VERSION="${2:?}" +# shellcheck disable=SC2034 +ENTRY_DIR_ABS="$3" +KERNEL_IMAGE="$4" + +[ "$KERNEL_INSTALL_LAYOUT" = "uki" ] || exit 0 + +ENTRY_TOKEN="$KERNEL_INSTALL_ENTRY_TOKEN" +BOOT_ROOT="$KERNEL_INSTALL_BOOT_ROOT" + +UKI_DIR="$BOOT_ROOT/EFI/Linux" + +case "$COMMAND" in + remove) + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ + echo "Removing $UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION*.efi" + exec rm -f \ + "$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi" \ + "$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION+"*".efi" + ;; + add) + ;; + *) + exit 0 + ;; +esac + +if ! [ -d "$UKI_DIR" ]; then + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "creating $UKI_DIR" + mkdir -p "$UKI_DIR" +fi + +TRIES_FILE="${KERNEL_INSTALL_CONF_ROOT:-/etc/kernel}/tries" + +if [ -f "$TRIES_FILE" ]; then + read -r TRIES <"$TRIES_FILE" + if ! echo "$TRIES" | grep -q '^[0-9][0-9]*$'; then + echo "$TRIES_FILE does not contain an integer." >&2 + exit 1 + fi + UKI_FILE="$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION+$TRIES.efi" +else + UKI_FILE="$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi" +fi + +# If there is a UKI named uki.efi on the staging area use that, if not use what +# was passed in as $KERNEL_IMAGE but insist it has a .efi extension +if [ -f "$KERNEL_INSTALL_STAGING_AREA/uki.efi" ]; then + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $KERNEL_INSTALL_STAGING_AREA/uki.efi as $UKI_FILE" + install -m 0644 "$KERNEL_INSTALL_STAGING_AREA/uki.efi" "$UKI_FILE" || { + echo "Error: could not copy '$KERNEL_INSTALL_STAGING_AREA/uki.efi' to '$UKI_FILE'." >&2 + exit 1 + } +elif [ -n "$KERNEL_IMAGE" ]; then + [ -f "$KERNEL_IMAGE" ] || { + echo "Error: UKI '$KERNEL_IMAGE' not a file." >&2 + exit 1 + } + [ "$KERNEL_IMAGE" != "${KERNEL_IMAGE%*.efi}.efi" ] && { + echo "Error: $KERNEL_IMAGE is missing .efi suffix." >&2 + exit 1 + } + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "Installing $KERNEL_IMAGE as $UKI_FILE" + install -m 0644 "$KERNEL_IMAGE" "$UKI_FILE" || { + echo "Error: could not copy '$KERNEL_IMAGE' to '$UKI_FILE'." >&2 + exit 1 + } +else + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "No UKI available. Nothing to do." + exit 0 +fi +chown root:root "$UKI_FILE" || : + +exit 0 diff --git a/squashfs-root/usr/lib/lsb/init-functions.d/40-systemd b/squashfs-root/usr/lib/lsb/init-functions.d/40-systemd new file mode 100644 index 0000000..d1dc03e --- /dev/null +++ b/squashfs-root/usr/lib/lsb/init-functions.d/40-systemd @@ -0,0 +1,101 @@ +# -*-Shell-script-*- +# /lib/lsb/init-functions + +_use_systemctl=0 +if [ -d /run/systemd/system ]; then + + if [ -n "${__init_d_script_name:-}" ]; then # scripts run with new init-d-script + executable="$__init_d_script_name" + argument="$1" + elif [ "${0##*/}" = "init-d-script" ] || + [ "${0##*/}" = "${1:-}" ]; then # scripts run with old init-d-script + executable="$1" + argument="$2" + else # plain old scripts + executable="$0" + argument="${1:-}" + fi + + prog=${executable##*/} + service="${prog%.sh}.service" + + # Don't try to run masked services. systemctl <= 230 always succeeds here, + # but later systemctls fail on nonexisting units; be compatible with both + state=$(systemctl -p LoadState --value show $service 2>/dev/null) || state="not-found" + [ "$state" = "masked" ] && exit 0 + + # Redirect SysV init scripts when executed by the user + if [ $PPID -ne 1 ] && [ -z "${SYSTEMCTL_SKIP_REDIRECT:-}" ]; then + case $(readlink -f "$executable") in + /etc/init.d/*) + # If the state is not-found, this might be a newly installed SysV init + # script where systemd-sysv-generator has not been run yet. + [ "$state" != "not-found" ] || [ "$(id -u)" != 0 ] || systemctl --no-ask-password daemon-reload + + _use_systemctl=1 + # Some services can't reload through the .service file, + # but can through the init script. + if [ "$(systemctl -p CanReload --value show $service 2>/dev/null)" = "no" ] && [ "${argument:-}" = "reload" ]; then + _use_systemctl=0 + fi + ;; + esac + fi +fi + +systemctl_redirect () { + local s + local rc + local prog=${1##*/} + local command=$2 + + case "$command" in + start) + s="Starting $prog (via systemctl)" + ;; + stop) + s="Stopping $prog (via systemctl)" + ;; + reload|force-reload) + s="Reloading $prog configuration (via systemctl)" + ;; + try-restart) + s="Restarting $prog if running (via systemctl)" + ;; + restart) + s="Restarting $prog (via systemctl)" + ;; + esac + + service="${prog%.sh}.service" + + # avoid deadlocks during bootup and shutdown from units/hooks + # which call "invoke-rc.d service reload" and similar, since + # the synchronous wait plus systemd's normal behaviour of + # transactionally processing all dependencies first easily + # causes dependency loops + if ! systemctl --quiet is-system-running && [ "$command" = "reload" ]; then + sctl_args="--no-block" + fi + + [ "$command" = status ] || log_daemon_msg "$s" "$service" + systemctl --no-pager $sctl_args $command "$service" + rc=$? + [ "$command" = status ] || log_end_msg $rc + + return $rc +} + +if [ "$_use_systemctl" = "1" ]; then + # Some init scripts use "set -e" and "set -u", we don't want that + # here + set +e + set +u + + case "$argument" in + start|stop|restart|reload|force-reload|try-restart|status) + systemctl_redirect $executable $argument + exit $? + ;; + esac +fi diff --git a/squashfs-root/usr/lib/mime/packages/util-linux b/squashfs-root/usr/lib/mime/packages/util-linux new file mode 100644 index 0000000..2653e42 --- /dev/null +++ b/squashfs-root/usr/lib/mime/packages/util-linux @@ -0,0 +1,2 @@ +text/plain; more %s; needsterminal; priority=5 +text/*; more %s; needsterminal; priority=1 diff --git a/squashfs-root/usr/lib/modprobe.d/systemd.conf b/squashfs-root/usr/lib/modprobe.d/systemd.conf new file mode 100644 index 0000000..e6499a0 --- /dev/null +++ b/squashfs-root/usr/lib/modprobe.d/systemd.conf @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# When bonding module is loaded, it creates bond0 by default due to max_bonds +# option default value 1. This interferes with the network configuration +# management / networkd, as it is not possible to detect whether this bond0 was +# intentionally configured by the user, or should be managed by +# networkd/NM/etc. Therefore disable bond0 creation. + +options bonding max_bonds=0 + +# Do the same for dummy0. + +options dummy numdummies=0 + +# Do the same for ifb0. + +options ifb numifbs=0 diff --git a/squashfs-root/usr/lib/pam.d/systemd-user b/squashfs-root/usr/lib/pam.d/systemd-user new file mode 100644 index 0000000..65279f9 --- /dev/null +++ b/squashfs-root/usr/lib/pam.d/systemd-user @@ -0,0 +1,13 @@ +# This file is part of systemd. +# +# Used by systemd --user instances. + +@include common-account + +session required pam_selinux.so close +session required pam_selinux.so nottys open +session required pam_loginuid.so +session required pam_limits.so +@include common-session-noninteractive +session optional pam_keyinit.so force revoke +session optional pam_systemd.so diff --git a/squashfs-root/usr/lib/pcrlock.d/350-action-efi-application.pcrlock b/squashfs-root/usr/lib/pcrlock.d/350-action-efi-application.pcrlock new file mode 100644 index 0000000..2baaa9c --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/350-action-efi-application.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":4,"digests":[{"hashAlg":"sha1","digest":"cd0fdb4531a6ec41be2753ba042637d6e5f7f256"},{"hashAlg":"sha256","digest":"3d6772b4f84ed47595d72a2c4c5ffd15f5bb72c7507fe26f2aaee2c69d5633ba"},{"hashAlg":"sha384","digest":"77a0dab2312b4e1e57a84d865a21e5b2ee8d677a21012ada819d0a98988078d3d740f6346bfe0abaa938ca20439a8d71"},{"hashAlg":"sha512","digest":"03020279c5ea3676d6630c82a9931343225e8eab81529b65c786aeb6a445d3852a34dd193178f938b6b47345a72d4b647df309c971f7c02f0ede296a136a1086"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/300-0x00000000.pcrlock b/squashfs-root/usr/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/300-0x00000000.pcrlock new file mode 100644 index 0000000..c577c98 --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/300-0x00000000.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":7,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/600-0xffffffff.pcrlock b/squashfs-root/usr/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/600-0xffffffff.pcrlock new file mode 100644 index 0000000..2e86898 --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/400-secureboot-separator.pcrlock.d/600-0xffffffff.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":7,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/500-separator.pcrlock.d/300-0x00000000.pcrlock b/squashfs-root/usr/lib/pcrlock.d/500-separator.pcrlock.d/300-0x00000000.pcrlock new file mode 100644 index 0000000..f1e473f --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/500-separator.pcrlock.d/300-0x00000000.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":0,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]},{"pcr":1,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]},{"pcr":2,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]},{"pcr":3,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]},{"pcr":4,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]},{"pcr":5,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]},{"pcr":6,"digests":[{"hashAlg":"sha1","digest":"9069ca78e7450a285173431b3e52c5c25299e473"},{"hashAlg":"sha256","digest":"df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"},{"hashAlg":"sha384","digest":"394341b7182cd227c5c6b07ef8000cdfd86136c4292b8e576573ad7ed9ae41019f5818b4b971c9effc60e1ad9f1289f0"},{"hashAlg":"sha512","digest":"ec2d57691d9b2d40182ac565032054b7d784ba96b18bcb5be0bb4e70e3fb041eff582c8af66ee50256539f2181d7f9e53627c0189da7e75a4d5ef10ea93b20b3"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/500-separator.pcrlock.d/600-0xffffffff.pcrlock b/squashfs-root/usr/lib/pcrlock.d/500-separator.pcrlock.d/600-0xffffffff.pcrlock new file mode 100644 index 0000000..0b8d20b --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/500-separator.pcrlock.d/600-0xffffffff.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":0,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]},{"pcr":1,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]},{"pcr":2,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]},{"pcr":3,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]},{"pcr":4,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]},{"pcr":5,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]},{"pcr":6,"digests":[{"hashAlg":"sha1","digest":"d9be6524a5f5047db5866813acf3277892a7a30a"},{"hashAlg":"sha256","digest":"ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e"},{"hashAlg":"sha384","digest":"4a06b879c7eedbe01c945d46b5bd785b59203dce81ea6a1206c28091ca285365f760d9167778f0dc1763d4854aafd40a"},{"hashAlg":"sha512","digest":"ea71bb243b0b2db729b9eb88e3c55a3f490fbff23457825051224a1fe6e6d3f480590cfa3a4a6b12c622d6ac366feb03cd17004ed004cb3f0d52731626946679"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/300-present.pcrlock b/squashfs-root/usr/lib/pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/300-present.pcrlock new file mode 100644 index 0000000..d7012df --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/300-present.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":5,"digests":[{"hashAlg":"sha1","digest":"443a6b7b82b7af564f2e393cd9d5a388b7fa4a98"},{"hashAlg":"sha256","digest":"d8043d6b7b85ad358eb3b6ae6a873ab7ef23a26352c5dc4faa5aeedacf5eb41b"},{"hashAlg":"sha384","digest":"214b0bef1379756011344877743fdc2a5382bac6e70362d624ccf3f654407c1b4badf7d8f9295dd3dabdef65b27677e0"},{"hashAlg":"sha512","digest":"0fed3a4c9552021436534d27f3adb481e22b50b29e4b37a63f518540a651a174f149b69f500b0bdb2cb3bf4e0e21e0781451090af33e88f6bee4cbebd15c1668"}]},{"pcr":5,"digests":[{"hashAlg":"sha1","digest":"475545ddc978d7bfd036facc7e2e987f48189f0d"},{"hashAlg":"sha256","digest":"b54f7542cbd872a81a9d9dea839b2b8d747c7ebd5ea6615c40f42f44a6dbeba0"},{"hashAlg":"sha384","digest":"0a2e01c85deae718a530ad8c6d20a84009babe6c8989269e950d8cf440c6e997695e64d455c4174a652cd080f6230b74"},{"hashAlg":"sha512","digest":"1bb30cdbd6da78fe2a8a161ef51176e22d64dce305b40b47243673af64a2b16fca6182116433e3891be94773f6d7d411275721d5bf7d40ea51a274d5c891637c"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/600-absent.pcrlock b/squashfs-root/usr/lib/pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/600-absent.pcrlock new file mode 100644 index 0000000..a16142b --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/700-action-efi-exit-boot-services.pcrlock.d/600-absent.pcrlock @@ -0,0 +1 @@ +{"records":[]} diff --git a/squashfs-root/usr/lib/pcrlock.d/750-enter-initrd.pcrlock b/squashfs-root/usr/lib/pcrlock.d/750-enter-initrd.pcrlock new file mode 100644 index 0000000..a2332dc --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/750-enter-initrd.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":11,"digests":[{"hashAlg":"sha1","digest":"b1b01d5f73f321eb70e76f8a0e241ac0a3fa4a6e"},{"hashAlg":"sha256","digest":"51e6b92f405d1f98d96e3de343d61d420ad6923b25de21d766f9298192f14fed"},{"hashAlg":"sha384","digest":"687eef3a3a8c716439b5ed583657e8668401630c321f2f35d19b953ddf20b68a96474d0c2e5f0e1757bfa5ba70b9fc32"},{"hashAlg":"sha512","digest":"ab0ddfdabe43f1d06b3e58fbe17439a0f7f552e9e228d85665d485ececf7e733bae4cd7e0a17e5456e2ee7e412f5a0f37de05a782cce781e173ee26958de7f30"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/800-leave-initrd.pcrlock b/squashfs-root/usr/lib/pcrlock.d/800-leave-initrd.pcrlock new file mode 100644 index 0000000..bd8f436 --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/800-leave-initrd.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":11,"digests":[{"hashAlg":"sha1","digest":"865e1ff2cc5b8db815313b23fe3d8b561212f5d1"},{"hashAlg":"sha256","digest":"3be261aff7db92bf507eae947f4003ffa2bcad0bffe3524601d62d0bc8be7135"},{"hashAlg":"sha384","digest":"9c0743b7a2e1ee06c70b7137b763cd2205c26ced274149959b05bd5a51bfa96b4fedaa4f87398b5c88986d1ff0879910"},{"hashAlg":"sha512","digest":"01b8ca86b9f8fac967f383380aff7cdffd2ef0c496574517c25398f7c74aa611821dd469ba021b2aa9b9a7232865708ca45c79368f2e7fffda3dd6b308264008"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/850-sysinit.pcrlock b/squashfs-root/usr/lib/pcrlock.d/850-sysinit.pcrlock new file mode 100644 index 0000000..3bae445 --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/850-sysinit.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":11,"digests":[{"hashAlg":"sha1","digest":"aeabcf402223916e804cce79778a55d5a9276983"},{"hashAlg":"sha256","digest":"730bb5a583ba880c277e656d2dc8aba1a314a11b14d25b05153d2bab82567a48"},{"hashAlg":"sha384","digest":"955cc8939f81d862b3119aabe612fd36bf91668bb62397f5e4126085d79ba6d7cbfa4e3a2345747f0b476ce4b1cbc2c9"},{"hashAlg":"sha512","digest":"a9eb62cdd1cd8292b6325a8ee3770d6f1b613426a749e17ffba8f90bdd6c41806468fb79d01276de7cc791877dfebae165d4ed07585154acf96652c6db92acc1"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/900-ready.pcrlock b/squashfs-root/usr/lib/pcrlock.d/900-ready.pcrlock new file mode 100644 index 0000000..9a0e82f --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/900-ready.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":11,"digests":[{"hashAlg":"sha1","digest":"75c0533730caf1f78561c0883fb87bc8d98ef04b"},{"hashAlg":"sha256","digest":"b24d6d33736ecd5604a4b17bc9c6481039fac362bb7df044ef1c10a2bfd21db6"},{"hashAlg":"sha384","digest":"23ed5781da39fe6dc17f79478aeeb9eb2bca1d776061da188e10f9c85f7933fb39cfdba50f39af8aed24e5b45b80d006"},{"hashAlg":"sha512","digest":"ca6616f94a209e53f6fdc526b473172eb4b2157cf4809c31e36ad52db614ed352e68407be53c238ba17a561c4fde43f4a859aa8711f9781a0c934296d4d7571b"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/950-shutdown.pcrlock b/squashfs-root/usr/lib/pcrlock.d/950-shutdown.pcrlock new file mode 100644 index 0000000..1bc3f76 --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/950-shutdown.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":11,"digests":[{"hashAlg":"sha1","digest":"53669f193b2174641c72654b5c3e5b67950334ae"},{"hashAlg":"sha256","digest":"08434ba9cdf55a02284e2913400586cd289878e0f055f7bb0b07ce392caeb989"},{"hashAlg":"sha384","digest":"186e2d6603b9755221b7ef894dd52b1154b48ef4786aec06ab6f7709e639715e89bd59fa80736bb45f0ca88583c212c1"},{"hashAlg":"sha512","digest":"9e5549deb36fc48768cb80e03bc91c36cf549ff5921e05bab5b68faefda7fac8c8a0755db783cbf1c1b98c80dc22ef06ff3f4a0a16704749f5cd4acf40e42a94"}]}]} diff --git a/squashfs-root/usr/lib/pcrlock.d/990-final.pcrlock b/squashfs-root/usr/lib/pcrlock.d/990-final.pcrlock new file mode 100644 index 0000000..77081ae --- /dev/null +++ b/squashfs-root/usr/lib/pcrlock.d/990-final.pcrlock @@ -0,0 +1 @@ +{"records":[{"pcr":11,"digests":[{"hashAlg":"sha1","digest":"d594c2cc0a53025004791399d80e20852af4c988"},{"hashAlg":"sha256","digest":"2443630b4620165c8b173e7265e17526fe2787ae594364dd6d839ad58f2fc007"},{"hashAlg":"sha384","digest":"90697eec39ed47f2b7ed278aa6fe6a1c073fcc7f3af54299fb95ac8a18c771acbac71e25b5a5639554943bfdfab76737"},{"hashAlg":"sha512","digest":"b3d9598ca0aa5da28be1c97a45d53cc5c72a80e61c439c8bf3e89c5c0661f49df8fa34019a21cd5e31261ae3a3a87ef4592d8010aad6a5ecdc9dbaae38cd1470"}]}]} diff --git a/squashfs-root/usr/lib/python3.12/EXTERNALLY-MANAGED b/squashfs-root/usr/lib/python3.12/EXTERNALLY-MANAGED new file mode 100644 index 0000000..e28ca54 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/EXTERNALLY-MANAGED @@ -0,0 +1,15 @@ +[externally-managed] +Error=To install Python packages system-wide, try apt install + python3-xyz, where xyz is the package you are trying to + install. + + If you wish to install a non-Debian-packaged Python package, + create a virtual environment using python3 -m venv path/to/venv. + Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make + sure you have python3-full installed. + + If you wish to install a non-Debian packaged Python application, + it may be easiest to use pipx install xyz, which will manage a + virtual environment for you. Make sure you have pipx installed. + + See /usr/share/doc/python3.12/README.venv for more information. diff --git a/squashfs-root/usr/lib/python3.12/LICENSE.txt b/squashfs-root/usr/lib/python3.12/LICENSE.txt new file mode 100644 index 0000000..f26bcf4 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/LICENSE.txt @@ -0,0 +1,279 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see https://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see https://opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +Python software and documentation are licensed under the +Python Software Foundation License Version 2. + +Starting with Python 3.8.6, examples, recipes, and other code in +the documentation are dual licensed under the PSF License Version 2 +and the Zero-Clause BSD license. + +Some software incorporated into Python is under different licenses. +The licenses are listed with code falling under that license. + + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION +---------------------------------------------------------------------- + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/squashfs-root/usr/lib/python3.12/__future__.py b/squashfs-root/usr/lib/python3.12/__future__.py new file mode 100644 index 0000000..39720a5 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/__future__.py @@ -0,0 +1,147 @@ +"""Record of phased-in incompatible language changes. + +Each line is of the form: + + FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," + CompilerFlag ")" + +where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples +of the same form as sys.version_info: + + (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int + PY_MINOR_VERSION, # the 1; an int + PY_MICRO_VERSION, # the 0; an int + PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string + PY_RELEASE_SERIAL # the 3; an int + ) + +OptionalRelease records the first release in which + + from __future__ import FeatureName + +was accepted. + +In the case of MandatoryReleases that have not yet occurred, +MandatoryRelease predicts the release in which the feature will become part +of the language. + +Else MandatoryRelease records when the feature became part of the language; +in releases at or after that, modules no longer need + + from __future__ import FeatureName + +to use the feature in question, but may continue to use such imports. + +MandatoryRelease may also be None, meaning that a planned feature got +dropped or that the release version is undetermined. + +Instances of class _Feature have two corresponding methods, +.getOptionalRelease() and .getMandatoryRelease(). + +CompilerFlag is the (bitfield) flag that should be passed in the fourth +argument to the builtin function compile() to enable the feature in +dynamically compiled code. This flag is stored in the .compiler_flag +attribute on _Future instances. These values must match the appropriate +#defines of CO_xxx flags in Include/cpython/compile.h. + +No feature line is ever to be deleted from this file. +""" + +all_feature_names = [ + "nested_scopes", + "generators", + "division", + "absolute_import", + "with_statement", + "print_function", + "unicode_literals", + "barry_as_FLUFL", + "generator_stop", + "annotations", +] + +__all__ = ["all_feature_names"] + all_feature_names + +# The CO_xxx symbols are defined here under the same names defined in +# code.h and used by compile.h, so that an editor search will find them here. +# However, they're not exported in __all__, because they don't really belong to +# this module. +CO_NESTED = 0x0010 # nested_scopes +CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) +CO_FUTURE_DIVISION = 0x20000 # division +CO_FUTURE_ABSOLUTE_IMPORT = 0x40000 # perform absolute imports by default +CO_FUTURE_WITH_STATEMENT = 0x80000 # with statement +CO_FUTURE_PRINT_FUNCTION = 0x100000 # print function +CO_FUTURE_UNICODE_LITERALS = 0x200000 # unicode string literals +CO_FUTURE_BARRY_AS_BDFL = 0x400000 +CO_FUTURE_GENERATOR_STOP = 0x800000 # StopIteration becomes RuntimeError in generators +CO_FUTURE_ANNOTATIONS = 0x1000000 # annotations become strings at runtime + + +class _Feature: + + def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): + self.optional = optionalRelease + self.mandatory = mandatoryRelease + self.compiler_flag = compiler_flag + + def getOptionalRelease(self): + """Return first release in which this feature was recognized. + + This is a 5-tuple, of the same form as sys.version_info. + """ + return self.optional + + def getMandatoryRelease(self): + """Return release in which this feature will become mandatory. + + This is a 5-tuple, of the same form as sys.version_info, or, if + the feature was dropped, or the release date is undetermined, is None. + """ + return self.mandatory + + def __repr__(self): + return "_Feature" + repr((self.optional, + self.mandatory, + self.compiler_flag)) + + +nested_scopes = _Feature((2, 1, 0, "beta", 1), + (2, 2, 0, "alpha", 0), + CO_NESTED) + +generators = _Feature((2, 2, 0, "alpha", 1), + (2, 3, 0, "final", 0), + CO_GENERATOR_ALLOWED) + +division = _Feature((2, 2, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_DIVISION) + +absolute_import = _Feature((2, 5, 0, "alpha", 1), + (3, 0, 0, "alpha", 0), + CO_FUTURE_ABSOLUTE_IMPORT) + +with_statement = _Feature((2, 5, 0, "alpha", 1), + (2, 6, 0, "alpha", 0), + CO_FUTURE_WITH_STATEMENT) + +print_function = _Feature((2, 6, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_PRINT_FUNCTION) + +unicode_literals = _Feature((2, 6, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_UNICODE_LITERALS) + +barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2), + (4, 0, 0, "alpha", 0), + CO_FUTURE_BARRY_AS_BDFL) + +generator_stop = _Feature((3, 5, 0, "beta", 1), + (3, 7, 0, "alpha", 0), + CO_FUTURE_GENERATOR_STOP) + +annotations = _Feature((3, 7, 0, "beta", 1), + None, + CO_FUTURE_ANNOTATIONS) diff --git a/squashfs-root/usr/lib/python3.12/__hello__.py b/squashfs-root/usr/lib/python3.12/__hello__.py new file mode 100644 index 0000000..c09d6a4 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/__hello__.py @@ -0,0 +1,16 @@ +initialized = True + +class TestFrozenUtf8_1: + """\u00b6""" + +class TestFrozenUtf8_2: + """\u03c0""" + +class TestFrozenUtf8_4: + """\U0001f600""" + +def main(): + print("Hello world!") + +if __name__ == '__main__': + main() diff --git a/squashfs-root/usr/lib/python3.12/__phello__/__init__.py b/squashfs-root/usr/lib/python3.12/__phello__/__init__.py new file mode 100644 index 0000000..d37bd27 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/__phello__/__init__.py @@ -0,0 +1,7 @@ +initialized = True + +def main(): + print("Hello world!") + +if __name__ == '__main__': + main() diff --git a/squashfs-root/usr/lib/python3.12/__phello__/spam.py b/squashfs-root/usr/lib/python3.12/__phello__/spam.py new file mode 100644 index 0000000..d37bd27 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/__phello__/spam.py @@ -0,0 +1,7 @@ +initialized = True + +def main(): + print("Hello world!") + +if __name__ == '__main__': + main() diff --git a/squashfs-root/usr/lib/python3.12/_aix_support.py b/squashfs-root/usr/lib/python3.12/_aix_support.py new file mode 100644 index 0000000..dadc75c --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/_aix_support.py @@ -0,0 +1,108 @@ +"""Shared AIX support functions.""" + +import sys +import sysconfig + + +# Taken from _osx_support _read_output function +def _read_cmd_output(commandstring, capture_stderr=False): + """Output from successful command execution or None""" + # Similar to os.popen(commandstring, "r").read(), + # but without actually using os.popen because that + # function is not usable during python bootstrap. + import os + import contextlib + fp = open("/tmp/_aix_support.%s"%( + os.getpid(),), "w+b") + + with contextlib.closing(fp) as fp: + if capture_stderr: + cmd = "%s >'%s' 2>&1" % (commandstring, fp.name) + else: + cmd = "%s 2>/dev/null >'%s'" % (commandstring, fp.name) + return fp.read() if not os.system(cmd) else None + + +def _aix_tag(vrtl, bd): + # type: (List[int], int) -> str + # Infer the ABI bitwidth from maxsize (assuming 64 bit as the default) + _sz = 32 if sys.maxsize == (2**31-1) else 64 + _bd = bd if bd != 0 else 9988 + # vrtl[version, release, technology_level] + return "aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(vrtl[0], vrtl[1], vrtl[2], _bd, _sz) + + +# extract version, release and technology level from a VRMF string +def _aix_vrtl(vrmf): + # type: (str) -> List[int] + v, r, tl = vrmf.split(".")[:3] + return [int(v[-1]), int(r), int(tl)] + + +def _aix_bos_rte(): + # type: () -> Tuple[str, int] + """ + Return a Tuple[str, int] e.g., ['7.1.4.34', 1806] + The fileset bos.rte represents the current AIX run-time level. It's VRMF and + builddate reflect the current ABI levels of the runtime environment. + If no builddate is found give a value that will satisfy pep425 related queries + """ + # All AIX systems to have lslpp installed in this location + # subprocess may not be available during python bootstrap + try: + import subprocess + out = subprocess.check_output(["/usr/bin/lslpp", "-Lqc", "bos.rte"]) + except ImportError: + out = _read_cmd_output("/usr/bin/lslpp -Lqc bos.rte") + out = out.decode("utf-8") + out = out.strip().split(":") # type: ignore + _bd = int(out[-1]) if out[-1] != '' else 9988 + return (str(out[2]), _bd) + + +def aix_platform(): + # type: () -> str + """ + AIX filesets are identified by four decimal values: V.R.M.F. + V (version) and R (release) can be retrieved using ``uname`` + Since 2007, starting with AIX 5.3 TL7, the M value has been + included with the fileset bos.rte and represents the Technology + Level (TL) of AIX. The F (Fix) value also increases, but is not + relevant for comparing releases and binary compatibility. + For binary compatibility the so-called builddate is needed. + Again, the builddate of an AIX release is associated with bos.rte. + AIX ABI compatibility is described as guaranteed at: https://www.ibm.com/\ + support/knowledgecenter/en/ssw_aix_72/install/binary_compatability.html + + For pep425 purposes the AIX platform tag becomes: + "aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(v, r, tl, builddate, bitsize) + e.g., "aix-6107-1415-32" for AIX 6.1 TL7 bd 1415, 32-bit + and, "aix-6107-1415-64" for AIX 6.1 TL7 bd 1415, 64-bit + """ + vrmf, bd = _aix_bos_rte() + return _aix_tag(_aix_vrtl(vrmf), bd) + + +# extract vrtl from the BUILD_GNU_TYPE as an int +def _aix_bgt(): + # type: () -> List[int] + gnu_type = sysconfig.get_config_var("BUILD_GNU_TYPE") + if not gnu_type: + raise ValueError("BUILD_GNU_TYPE is not defined") + return _aix_vrtl(vrmf=gnu_type) + + +def aix_buildtag(): + # type: () -> str + """ + Return the platform_tag of the system Python was built on. + """ + # AIX_BUILDDATE is defined by configure with: + # lslpp -Lcq bos.rte | awk -F: '{ print $NF }' + build_date = sysconfig.get_config_var("AIX_BUILDDATE") + try: + build_date = int(build_date) + except (ValueError, TypeError): + raise ValueError(f"AIX_BUILDDATE is not defined or invalid: " + f"{build_date!r}") + return _aix_tag(_aix_bgt(), build_date) diff --git a/squashfs-root/usr/lib/python3.12/_collections_abc.py b/squashfs-root/usr/lib/python3.12/_collections_abc.py new file mode 100644 index 0000000..601107d --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/_collections_abc.py @@ -0,0 +1,1173 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Abstract Base Classes (ABCs) for collections, according to PEP 3119. + +Unit tests are in test_collections. +""" + +############ Maintenance notes ######################################### +# +# ABCs are different from other standard library modules in that they +# specify compliance tests. In general, once an ABC has been published, +# new methods (either abstract or concrete) cannot be added. +# +# Though classes that inherit from an ABC would automatically receive a +# new mixin method, registered classes would become non-compliant and +# violate the contract promised by ``isinstance(someobj, SomeABC)``. +# +# Though irritating, the correct procedure for adding new abstract or +# mixin methods is to create a new ABC as a subclass of the previous +# ABC. For example, union(), intersection(), and difference() cannot +# be added to Set but could go into a new ABC that extends Set. +# +# Because they are so hard to change, new ABCs should have their APIs +# carefully thought through prior to publication. +# +# Since ABCMeta only checks for the presence of methods, it is possible +# to alter the signature of a method by adding optional arguments +# or changing parameters names. This is still a bit dubious but at +# least it won't cause isinstance() to return an incorrect result. +# +# +####################################################################### + +from abc import ABCMeta, abstractmethod +import sys + +GenericAlias = type(list[int]) +EllipsisType = type(...) +def _f(): pass +FunctionType = type(_f) +del _f + +__all__ = ["Awaitable", "Coroutine", + "AsyncIterable", "AsyncIterator", "AsyncGenerator", + "Hashable", "Iterable", "Iterator", "Generator", "Reversible", + "Sized", "Container", "Callable", "Collection", + "Set", "MutableSet", + "Mapping", "MutableMapping", + "MappingView", "KeysView", "ItemsView", "ValuesView", + "Sequence", "MutableSequence", + "ByteString", "Buffer", + ] + +# This module has been renamed from collections.abc to _collections_abc to +# speed up interpreter startup. Some of the types such as MutableMapping are +# required early but collections module imports a lot of other modules. +# See issue #19218 +__name__ = "collections.abc" + +# Private list of types that we want to register with the various ABCs +# so that they will pass tests like: +# it = iter(somebytearray) +# assert isinstance(it, Iterable) +# Note: in other implementations, these types might not be distinct +# and they may have their own implementation specific types that +# are not included on this list. +bytes_iterator = type(iter(b'')) +bytearray_iterator = type(iter(bytearray())) +#callable_iterator = ??? +dict_keyiterator = type(iter({}.keys())) +dict_valueiterator = type(iter({}.values())) +dict_itemiterator = type(iter({}.items())) +list_iterator = type(iter([])) +list_reverseiterator = type(iter(reversed([]))) +range_iterator = type(iter(range(0))) +longrange_iterator = type(iter(range(1 << 1000))) +set_iterator = type(iter(set())) +str_iterator = type(iter("")) +tuple_iterator = type(iter(())) +zip_iterator = type(iter(zip())) +## views ## +dict_keys = type({}.keys()) +dict_values = type({}.values()) +dict_items = type({}.items()) +## misc ## +mappingproxy = type(type.__dict__) +generator = type((lambda: (yield))()) +## coroutine ## +async def _coro(): pass +_coro = _coro() +coroutine = type(_coro) +_coro.close() # Prevent ResourceWarning +del _coro +## asynchronous generator ## +async def _ag(): yield +_ag = _ag() +async_generator = type(_ag) +del _ag + + +### ONE-TRICK PONIES ### + +def _check_methods(C, *methods): + mro = C.__mro__ + for method in methods: + for B in mro: + if method in B.__dict__: + if B.__dict__[method] is None: + return NotImplemented + break + else: + return NotImplemented + return True + +class Hashable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __hash__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Hashable: + return _check_methods(C, "__hash__") + return NotImplemented + + +class Awaitable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __await__(self): + yield + + @classmethod + def __subclasshook__(cls, C): + if cls is Awaitable: + return _check_methods(C, "__await__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class Coroutine(Awaitable): + + __slots__ = () + + @abstractmethod + def send(self, value): + """Send a value into the coroutine. + Return next yielded value or raise StopIteration. + """ + raise StopIteration + + @abstractmethod + def throw(self, typ, val=None, tb=None): + """Raise an exception in the coroutine. + Return next yielded value or raise StopIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + def close(self): + """Raise GeneratorExit inside coroutine. + """ + try: + self.throw(GeneratorExit) + except (GeneratorExit, StopIteration): + pass + else: + raise RuntimeError("coroutine ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is Coroutine: + return _check_methods(C, '__await__', 'send', 'throw', 'close') + return NotImplemented + + +Coroutine.register(coroutine) + + +class AsyncIterable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __aiter__(self): + return AsyncIterator() + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncIterable: + return _check_methods(C, "__aiter__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class AsyncIterator(AsyncIterable): + + __slots__ = () + + @abstractmethod + async def __anext__(self): + """Return the next item or raise StopAsyncIteration when exhausted.""" + raise StopAsyncIteration + + def __aiter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncIterator: + return _check_methods(C, "__anext__", "__aiter__") + return NotImplemented + + +class AsyncGenerator(AsyncIterator): + + __slots__ = () + + async def __anext__(self): + """Return the next item from the asynchronous generator. + When exhausted, raise StopAsyncIteration. + """ + return await self.asend(None) + + @abstractmethod + async def asend(self, value): + """Send a value into the asynchronous generator. + Return next yielded value or raise StopAsyncIteration. + """ + raise StopAsyncIteration + + @abstractmethod + async def athrow(self, typ, val=None, tb=None): + """Raise an exception in the asynchronous generator. + Return next yielded value or raise StopAsyncIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + async def aclose(self): + """Raise GeneratorExit inside coroutine. + """ + try: + await self.athrow(GeneratorExit) + except (GeneratorExit, StopAsyncIteration): + pass + else: + raise RuntimeError("asynchronous generator ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncGenerator: + return _check_methods(C, '__aiter__', '__anext__', + 'asend', 'athrow', 'aclose') + return NotImplemented + + +AsyncGenerator.register(async_generator) + + +class Iterable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __iter__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterable: + return _check_methods(C, "__iter__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class Iterator(Iterable): + + __slots__ = () + + @abstractmethod + def __next__(self): + 'Return the next item from the iterator. When exhausted, raise StopIteration' + raise StopIteration + + def __iter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterator: + return _check_methods(C, '__iter__', '__next__') + return NotImplemented + + +Iterator.register(bytes_iterator) +Iterator.register(bytearray_iterator) +#Iterator.register(callable_iterator) +Iterator.register(dict_keyiterator) +Iterator.register(dict_valueiterator) +Iterator.register(dict_itemiterator) +Iterator.register(list_iterator) +Iterator.register(list_reverseiterator) +Iterator.register(range_iterator) +Iterator.register(longrange_iterator) +Iterator.register(set_iterator) +Iterator.register(str_iterator) +Iterator.register(tuple_iterator) +Iterator.register(zip_iterator) + + +class Reversible(Iterable): + + __slots__ = () + + @abstractmethod + def __reversed__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Reversible: + return _check_methods(C, "__reversed__", "__iter__") + return NotImplemented + + +class Generator(Iterator): + + __slots__ = () + + def __next__(self): + """Return the next item from the generator. + When exhausted, raise StopIteration. + """ + return self.send(None) + + @abstractmethod + def send(self, value): + """Send a value into the generator. + Return next yielded value or raise StopIteration. + """ + raise StopIteration + + @abstractmethod + def throw(self, typ, val=None, tb=None): + """Raise an exception in the generator. + Return next yielded value or raise StopIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + def close(self): + """Raise GeneratorExit inside generator. + """ + try: + self.throw(GeneratorExit) + except (GeneratorExit, StopIteration): + pass + else: + raise RuntimeError("generator ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is Generator: + return _check_methods(C, '__iter__', '__next__', + 'send', 'throw', 'close') + return NotImplemented + + +Generator.register(generator) + + +class Sized(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __len__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Sized: + return _check_methods(C, "__len__") + return NotImplemented + + +class Container(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __contains__(self, x): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Container: + return _check_methods(C, "__contains__") + return NotImplemented + + __class_getitem__ = classmethod(GenericAlias) + + +class Collection(Sized, Iterable, Container): + + __slots__ = () + + @classmethod + def __subclasshook__(cls, C): + if cls is Collection: + return _check_methods(C, "__len__", "__iter__", "__contains__") + return NotImplemented + + +class Buffer(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __buffer__(self, flags: int, /) -> memoryview: + raise NotImplementedError + + @classmethod + def __subclasshook__(cls, C): + if cls is Buffer: + return _check_methods(C, "__buffer__") + return NotImplemented + + +class _CallableGenericAlias(GenericAlias): + """ Represent `Callable[argtypes, resulttype]`. + + This sets ``__args__`` to a tuple containing the flattened ``argtypes`` + followed by ``resulttype``. + + Example: ``Callable[[int, str], float]`` sets ``__args__`` to + ``(int, str, float)``. + """ + + __slots__ = () + + def __new__(cls, origin, args): + if not (isinstance(args, tuple) and len(args) == 2): + raise TypeError( + "Callable must be used as Callable[[arg, ...], result].") + t_args, t_result = args + if isinstance(t_args, (tuple, list)): + args = (*t_args, t_result) + elif not _is_param_expr(t_args): + raise TypeError(f"Expected a list of types, an ellipsis, " + f"ParamSpec, or Concatenate. Got {t_args}") + return super().__new__(cls, origin, args) + + def __repr__(self): + if len(self.__args__) == 2 and _is_param_expr(self.__args__[0]): + return super().__repr__() + return (f'collections.abc.Callable' + f'[[{", ".join([_type_repr(a) for a in self.__args__[:-1]])}], ' + f'{_type_repr(self.__args__[-1])}]') + + def __reduce__(self): + args = self.__args__ + if not (len(args) == 2 and _is_param_expr(args[0])): + args = list(args[:-1]), args[-1] + return _CallableGenericAlias, (Callable, args) + + def __getitem__(self, item): + # Called during TypeVar substitution, returns the custom subclass + # rather than the default types.GenericAlias object. Most of the + # code is copied from typing's _GenericAlias and the builtin + # types.GenericAlias. + if not isinstance(item, tuple): + item = (item,) + + new_args = super().__getitem__(item).__args__ + + # args[0] occurs due to things like Z[[int, str, bool]] from PEP 612 + if not isinstance(new_args[0], (tuple, list)): + t_result = new_args[-1] + t_args = new_args[:-1] + new_args = (t_args, t_result) + return _CallableGenericAlias(Callable, tuple(new_args)) + +def _is_param_expr(obj): + """Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or + ``_ConcatenateGenericAlias`` from typing.py + """ + if obj is Ellipsis: + return True + if isinstance(obj, list): + return True + obj = type(obj) + names = ('ParamSpec', '_ConcatenateGenericAlias') + return obj.__module__ == 'typing' and any(obj.__name__ == name for name in names) + +def _type_repr(obj): + """Return the repr() of an object, special-casing types (internal helper). + + Copied from :mod:`typing` since collections.abc + shouldn't depend on that module. + (Keep this roughly in sync with the typing version.) + """ + if isinstance(obj, type): + if obj.__module__ == 'builtins': + return obj.__qualname__ + return f'{obj.__module__}.{obj.__qualname__}' + if obj is Ellipsis: + return '...' + if isinstance(obj, FunctionType): + return obj.__name__ + return repr(obj) + + +class Callable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __call__(self, *args, **kwds): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Callable: + return _check_methods(C, "__call__") + return NotImplemented + + __class_getitem__ = classmethod(_CallableGenericAlias) + + +### SETS ### + + +class Set(Collection): + """A set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__ and __len__. + + To override the comparisons (presumably for speed, as the + semantics are fixed), redefine __le__ and __ge__, + then the other operations will automatically follow suit. + """ + + __slots__ = () + + def __le__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) > len(other): + return False + for elem in self: + if elem not in other: + return False + return True + + def __lt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) < len(other) and self.__le__(other) + + def __gt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) > len(other) and self.__ge__(other) + + def __ge__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) < len(other): + return False + for elem in other: + if elem not in self: + return False + return True + + def __eq__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) == len(other) and self.__le__(other) + + @classmethod + def _from_iterable(cls, it): + '''Construct an instance of the class from any iterable input. + + Must override this method if the class constructor signature + does not accept an iterable for an input. + ''' + return cls(it) + + def __and__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + return self._from_iterable(value for value in other if value in self) + + __rand__ = __and__ + + def isdisjoint(self, other): + 'Return True if two sets have a null intersection.' + for value in other: + if value in self: + return False + return True + + def __or__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + chain = (e for s in (self, other) for e in s) + return self._from_iterable(chain) + + __ror__ = __or__ + + def __sub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in self + if value not in other) + + def __rsub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in other + if value not in self) + + def __xor__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return (self - other) | (other - self) + + __rxor__ = __xor__ + + def _hash(self): + """Compute the hash value of a set. + + Note that we don't define __hash__: not all sets are hashable. + But if you define a hashable set type, its __hash__ should + call this function. + + This must be compatible __eq__. + + All sets ought to compare equal if they contain the same + elements, regardless of how they are implemented, and + regardless of the order of the elements; so there's not much + freedom for __eq__ or __hash__. We match the algorithm used + by the built-in frozenset type. + """ + MAX = sys.maxsize + MASK = 2 * MAX + 1 + n = len(self) + h = 1927868237 * (n + 1) + h &= MASK + for x in self: + hx = hash(x) + h ^= (hx ^ (hx << 16) ^ 89869747) * 3644798167 + h &= MASK + h ^= (h >> 11) ^ (h >> 25) + h = h * 69069 + 907133923 + h &= MASK + if h > MAX: + h -= MASK + 1 + if h == -1: + h = 590923713 + return h + + +Set.register(frozenset) + + +class MutableSet(Set): + """A mutable set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__, __len__, + add(), and discard(). + + To override the comparisons (presumably for speed, as the + semantics are fixed), all you have to do is redefine __le__ and + then the other operations will automatically follow suit. + """ + + __slots__ = () + + @abstractmethod + def add(self, value): + """Add an element.""" + raise NotImplementedError + + @abstractmethod + def discard(self, value): + """Remove an element. Do not raise an exception if absent.""" + raise NotImplementedError + + def remove(self, value): + """Remove an element. If not a member, raise a KeyError.""" + if value not in self: + raise KeyError(value) + self.discard(value) + + def pop(self): + """Return the popped value. Raise KeyError if empty.""" + it = iter(self) + try: + value = next(it) + except StopIteration: + raise KeyError from None + self.discard(value) + return value + + def clear(self): + """This is slow (creates N new iterators!) but effective.""" + try: + while True: + self.pop() + except KeyError: + pass + + def __ior__(self, it): + for value in it: + self.add(value) + return self + + def __iand__(self, it): + for value in (self - it): + self.discard(value) + return self + + def __ixor__(self, it): + if it is self: + self.clear() + else: + if not isinstance(it, Set): + it = self._from_iterable(it) + for value in it: + if value in self: + self.discard(value) + else: + self.add(value) + return self + + def __isub__(self, it): + if it is self: + self.clear() + else: + for value in it: + self.discard(value) + return self + + +MutableSet.register(set) + + +### MAPPINGS ### + +class Mapping(Collection): + """A Mapping is a generic container for associating key/value + pairs. + + This class provides concrete generic implementations of all + methods except for __getitem__, __iter__, and __len__. + """ + + __slots__ = () + + # Tell ABCMeta.__new__ that this class should have TPFLAGS_MAPPING set. + __abc_tpflags__ = 1 << 6 # Py_TPFLAGS_MAPPING + + @abstractmethod + def __getitem__(self, key): + raise KeyError + + def get(self, key, default=None): + 'D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.' + try: + return self[key] + except KeyError: + return default + + def __contains__(self, key): + try: + self[key] + except KeyError: + return False + else: + return True + + def keys(self): + "D.keys() -> a set-like object providing a view on D's keys" + return KeysView(self) + + def items(self): + "D.items() -> a set-like object providing a view on D's items" + return ItemsView(self) + + def values(self): + "D.values() -> an object providing a view on D's values" + return ValuesView(self) + + def __eq__(self, other): + if not isinstance(other, Mapping): + return NotImplemented + return dict(self.items()) == dict(other.items()) + + __reversed__ = None + +Mapping.register(mappingproxy) + + +class MappingView(Sized): + + __slots__ = '_mapping', + + def __init__(self, mapping): + self._mapping = mapping + + def __len__(self): + return len(self._mapping) + + def __repr__(self): + return '{0.__class__.__name__}({0._mapping!r})'.format(self) + + __class_getitem__ = classmethod(GenericAlias) + + +class KeysView(MappingView, Set): + + __slots__ = () + + @classmethod + def _from_iterable(cls, it): + return set(it) + + def __contains__(self, key): + return key in self._mapping + + def __iter__(self): + yield from self._mapping + + +KeysView.register(dict_keys) + + +class ItemsView(MappingView, Set): + + __slots__ = () + + @classmethod + def _from_iterable(cls, it): + return set(it) + + def __contains__(self, item): + key, value = item + try: + v = self._mapping[key] + except KeyError: + return False + else: + return v is value or v == value + + def __iter__(self): + for key in self._mapping: + yield (key, self._mapping[key]) + + +ItemsView.register(dict_items) + + +class ValuesView(MappingView, Collection): + + __slots__ = () + + def __contains__(self, value): + for key in self._mapping: + v = self._mapping[key] + if v is value or v == value: + return True + return False + + def __iter__(self): + for key in self._mapping: + yield self._mapping[key] + + +ValuesView.register(dict_values) + + +class MutableMapping(Mapping): + """A MutableMapping is a generic container for associating + key/value pairs. + + This class provides concrete generic implementations of all + methods except for __getitem__, __setitem__, __delitem__, + __iter__, and __len__. + """ + + __slots__ = () + + @abstractmethod + def __setitem__(self, key, value): + raise KeyError + + @abstractmethod + def __delitem__(self, key): + raise KeyError + + __marker = object() + + def pop(self, key, default=__marker): + '''D.pop(k[,d]) -> v, remove specified key and return the corresponding value. + If key is not found, d is returned if given, otherwise KeyError is raised. + ''' + try: + value = self[key] + except KeyError: + if default is self.__marker: + raise + return default + else: + del self[key] + return value + + def popitem(self): + '''D.popitem() -> (k, v), remove and return some (key, value) pair + as a 2-tuple; but raise KeyError if D is empty. + ''' + try: + key = next(iter(self)) + except StopIteration: + raise KeyError from None + value = self[key] + del self[key] + return key, value + + def clear(self): + 'D.clear() -> None. Remove all items from D.' + try: + while True: + self.popitem() + except KeyError: + pass + + def update(self, other=(), /, **kwds): + ''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. + If E present and has a .keys() method, does: for k in E: D[k] = E[k] + If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v + In either case, this is followed by: for k, v in F.items(): D[k] = v + ''' + if isinstance(other, Mapping): + for key in other: + self[key] = other[key] + elif hasattr(other, "keys"): + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + + def setdefault(self, key, default=None): + 'D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D' + try: + return self[key] + except KeyError: + self[key] = default + return default + + +MutableMapping.register(dict) + + +### SEQUENCES ### + +class Sequence(Reversible, Collection): + """All the operations on a read-only sequence. + + Concrete subclasses must override __new__ or __init__, + __getitem__, and __len__. + """ + + __slots__ = () + + # Tell ABCMeta.__new__ that this class should have TPFLAGS_SEQUENCE set. + __abc_tpflags__ = 1 << 5 # Py_TPFLAGS_SEQUENCE + + @abstractmethod + def __getitem__(self, index): + raise IndexError + + def __iter__(self): + i = 0 + try: + while True: + v = self[i] + yield v + i += 1 + except IndexError: + return + + def __contains__(self, value): + for v in self: + if v is value or v == value: + return True + return False + + def __reversed__(self): + for i in reversed(range(len(self))): + yield self[i] + + def index(self, value, start=0, stop=None): + '''S.index(value, [start, [stop]]) -> integer -- return first index of value. + Raises ValueError if the value is not present. + + Supporting start and stop arguments is optional, but + recommended. + ''' + if start is not None and start < 0: + start = max(len(self) + start, 0) + if stop is not None and stop < 0: + stop += len(self) + + i = start + while stop is None or i < stop: + try: + v = self[i] + except IndexError: + break + if v is value or v == value: + return i + i += 1 + raise ValueError + + def count(self, value): + 'S.count(value) -> integer -- return number of occurrences of value' + return sum(1 for v in self if v is value or v == value) + +Sequence.register(tuple) +Sequence.register(str) +Sequence.register(range) +Sequence.register(memoryview) + +class _DeprecateByteStringMeta(ABCMeta): + def __new__(cls, name, bases, namespace, **kwargs): + if name != "ByteString": + import warnings + + warnings._deprecated( + "collections.abc.ByteString", + remove=(3, 14), + ) + return super().__new__(cls, name, bases, namespace, **kwargs) + + def __instancecheck__(cls, instance): + import warnings + + warnings._deprecated( + "collections.abc.ByteString", + remove=(3, 14), + ) + return super().__instancecheck__(instance) + +class ByteString(Sequence, metaclass=_DeprecateByteStringMeta): + """This unifies bytes and bytearray. + + XXX Should add all their methods. + """ + + __slots__ = () + +ByteString.register(bytes) +ByteString.register(bytearray) + + +class MutableSequence(Sequence): + """All the operations on a read-write sequence. + + Concrete subclasses must provide __new__ or __init__, + __getitem__, __setitem__, __delitem__, __len__, and insert(). + """ + + __slots__ = () + + @abstractmethod + def __setitem__(self, index, value): + raise IndexError + + @abstractmethod + def __delitem__(self, index): + raise IndexError + + @abstractmethod + def insert(self, index, value): + 'S.insert(index, value) -- insert value before index' + raise IndexError + + def append(self, value): + 'S.append(value) -- append value to the end of the sequence' + self.insert(len(self), value) + + def clear(self): + 'S.clear() -> None -- remove all items from S' + try: + while True: + self.pop() + except IndexError: + pass + + def reverse(self): + 'S.reverse() -- reverse *IN PLACE*' + n = len(self) + for i in range(n//2): + self[i], self[n-i-1] = self[n-i-1], self[i] + + def extend(self, values): + 'S.extend(iterable) -- extend sequence by appending elements from the iterable' + if values is self: + values = list(values) + for v in values: + self.append(v) + + def pop(self, index=-1): + '''S.pop([index]) -> item -- remove and return item at index (default last). + Raise IndexError if list is empty or index is out of range. + ''' + v = self[index] + del self[index] + return v + + def remove(self, value): + '''S.remove(value) -- remove first occurrence of value. + Raise ValueError if the value is not present. + ''' + del self[self.index(value)] + + def __iadd__(self, values): + self.extend(values) + return self + + +MutableSequence.register(list) +MutableSequence.register(bytearray) # Multiply inheriting, see ByteString diff --git a/squashfs-root/usr/lib/python3.12/_compat_pickle.py b/squashfs-root/usr/lib/python3.12/_compat_pickle.py new file mode 100644 index 0000000..65a94b6 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/_compat_pickle.py @@ -0,0 +1,252 @@ +# This module is used to map the old Python 2 names to the new names used in +# Python 3 for the pickle module. This needed to make pickle streams +# generated with Python 2 loadable by Python 3. + +# This is a copy of lib2to3.fixes.fix_imports.MAPPING. We cannot import +# lib2to3 and use the mapping defined there, because lib2to3 uses pickle. +# Thus, this could cause the module to be imported recursively. +IMPORT_MAPPING = { + '__builtin__' : 'builtins', + 'copy_reg': 'copyreg', + 'Queue': 'queue', + 'SocketServer': 'socketserver', + 'ConfigParser': 'configparser', + 'repr': 'reprlib', + 'tkFileDialog': 'tkinter.filedialog', + 'tkSimpleDialog': 'tkinter.simpledialog', + 'tkColorChooser': 'tkinter.colorchooser', + 'tkCommonDialog': 'tkinter.commondialog', + 'Dialog': 'tkinter.dialog', + 'Tkdnd': 'tkinter.dnd', + 'tkFont': 'tkinter.font', + 'tkMessageBox': 'tkinter.messagebox', + 'ScrolledText': 'tkinter.scrolledtext', + 'Tkconstants': 'tkinter.constants', + 'Tix': 'tkinter.tix', + 'ttk': 'tkinter.ttk', + 'Tkinter': 'tkinter', + 'markupbase': '_markupbase', + '_winreg': 'winreg', + 'thread': '_thread', + 'dummy_thread': '_dummy_thread', + 'dbhash': 'dbm.bsd', + 'dumbdbm': 'dbm.dumb', + 'dbm': 'dbm.ndbm', + 'gdbm': 'dbm.gnu', + 'xmlrpclib': 'xmlrpc.client', + 'SimpleXMLRPCServer': 'xmlrpc.server', + 'httplib': 'http.client', + 'htmlentitydefs' : 'html.entities', + 'HTMLParser' : 'html.parser', + 'Cookie': 'http.cookies', + 'cookielib': 'http.cookiejar', + 'BaseHTTPServer': 'http.server', + 'test.test_support': 'test.support', + 'commands': 'subprocess', + 'urlparse' : 'urllib.parse', + 'robotparser' : 'urllib.robotparser', + 'urllib2': 'urllib.request', + 'anydbm': 'dbm', + '_abcoll' : 'collections.abc', +} + + +# This contains rename rules that are easy to handle. We ignore the more +# complex stuff (e.g. mapping the names in the urllib and types modules). +# These rules should be run before import names are fixed. +NAME_MAPPING = { + ('__builtin__', 'xrange'): ('builtins', 'range'), + ('__builtin__', 'reduce'): ('functools', 'reduce'), + ('__builtin__', 'intern'): ('sys', 'intern'), + ('__builtin__', 'unichr'): ('builtins', 'chr'), + ('__builtin__', 'unicode'): ('builtins', 'str'), + ('__builtin__', 'long'): ('builtins', 'int'), + ('itertools', 'izip'): ('builtins', 'zip'), + ('itertools', 'imap'): ('builtins', 'map'), + ('itertools', 'ifilter'): ('builtins', 'filter'), + ('itertools', 'ifilterfalse'): ('itertools', 'filterfalse'), + ('itertools', 'izip_longest'): ('itertools', 'zip_longest'), + ('UserDict', 'IterableUserDict'): ('collections', 'UserDict'), + ('UserList', 'UserList'): ('collections', 'UserList'), + ('UserString', 'UserString'): ('collections', 'UserString'), + ('whichdb', 'whichdb'): ('dbm', 'whichdb'), + ('_socket', 'fromfd'): ('socket', 'fromfd'), + ('_multiprocessing', 'Connection'): ('multiprocessing.connection', 'Connection'), + ('multiprocessing.process', 'Process'): ('multiprocessing.context', 'Process'), + ('multiprocessing.forking', 'Popen'): ('multiprocessing.popen_fork', 'Popen'), + ('urllib', 'ContentTooShortError'): ('urllib.error', 'ContentTooShortError'), + ('urllib', 'getproxies'): ('urllib.request', 'getproxies'), + ('urllib', 'pathname2url'): ('urllib.request', 'pathname2url'), + ('urllib', 'quote_plus'): ('urllib.parse', 'quote_plus'), + ('urllib', 'quote'): ('urllib.parse', 'quote'), + ('urllib', 'unquote_plus'): ('urllib.parse', 'unquote_plus'), + ('urllib', 'unquote'): ('urllib.parse', 'unquote'), + ('urllib', 'url2pathname'): ('urllib.request', 'url2pathname'), + ('urllib', 'urlcleanup'): ('urllib.request', 'urlcleanup'), + ('urllib', 'urlencode'): ('urllib.parse', 'urlencode'), + ('urllib', 'urlopen'): ('urllib.request', 'urlopen'), + ('urllib', 'urlretrieve'): ('urllib.request', 'urlretrieve'), + ('urllib2', 'HTTPError'): ('urllib.error', 'HTTPError'), + ('urllib2', 'URLError'): ('urllib.error', 'URLError'), +} + +PYTHON2_EXCEPTIONS = ( + "ArithmeticError", + "AssertionError", + "AttributeError", + "BaseException", + "BufferError", + "BytesWarning", + "DeprecationWarning", + "EOFError", + "EnvironmentError", + "Exception", + "FloatingPointError", + "FutureWarning", + "GeneratorExit", + "IOError", + "ImportError", + "ImportWarning", + "IndentationError", + "IndexError", + "KeyError", + "KeyboardInterrupt", + "LookupError", + "MemoryError", + "NameError", + "NotImplementedError", + "OSError", + "OverflowError", + "PendingDeprecationWarning", + "ReferenceError", + "RuntimeError", + "RuntimeWarning", + # StandardError is gone in Python 3, so we map it to Exception + "StopIteration", + "SyntaxError", + "SyntaxWarning", + "SystemError", + "SystemExit", + "TabError", + "TypeError", + "UnboundLocalError", + "UnicodeDecodeError", + "UnicodeEncodeError", + "UnicodeError", + "UnicodeTranslateError", + "UnicodeWarning", + "UserWarning", + "ValueError", + "Warning", + "ZeroDivisionError", +) + +try: + WindowsError +except NameError: + pass +else: + PYTHON2_EXCEPTIONS += ("WindowsError",) + +for excname in PYTHON2_EXCEPTIONS: + NAME_MAPPING[("exceptions", excname)] = ("builtins", excname) + +MULTIPROCESSING_EXCEPTIONS = ( + 'AuthenticationError', + 'BufferTooShort', + 'ProcessError', + 'TimeoutError', +) + +for excname in MULTIPROCESSING_EXCEPTIONS: + NAME_MAPPING[("multiprocessing", excname)] = ("multiprocessing.context", excname) + +# Same, but for 3.x to 2.x +REVERSE_IMPORT_MAPPING = dict((v, k) for (k, v) in IMPORT_MAPPING.items()) +assert len(REVERSE_IMPORT_MAPPING) == len(IMPORT_MAPPING) +REVERSE_NAME_MAPPING = dict((v, k) for (k, v) in NAME_MAPPING.items()) +assert len(REVERSE_NAME_MAPPING) == len(NAME_MAPPING) + +# Non-mutual mappings. + +IMPORT_MAPPING.update({ + 'cPickle': 'pickle', + '_elementtree': 'xml.etree.ElementTree', + 'FileDialog': 'tkinter.filedialog', + 'SimpleDialog': 'tkinter.simpledialog', + 'DocXMLRPCServer': 'xmlrpc.server', + 'SimpleHTTPServer': 'http.server', + 'CGIHTTPServer': 'http.server', + # For compatibility with broken pickles saved in old Python 3 versions + 'UserDict': 'collections', + 'UserList': 'collections', + 'UserString': 'collections', + 'whichdb': 'dbm', + 'StringIO': 'io', + 'cStringIO': 'io', +}) + +REVERSE_IMPORT_MAPPING.update({ + '_bz2': 'bz2', + '_dbm': 'dbm', + '_functools': 'functools', + '_gdbm': 'gdbm', + '_pickle': 'pickle', +}) + +NAME_MAPPING.update({ + ('__builtin__', 'basestring'): ('builtins', 'str'), + ('exceptions', 'StandardError'): ('builtins', 'Exception'), + ('UserDict', 'UserDict'): ('collections', 'UserDict'), + ('socket', '_socketobject'): ('socket', 'SocketType'), +}) + +REVERSE_NAME_MAPPING.update({ + ('_functools', 'reduce'): ('__builtin__', 'reduce'), + ('tkinter.filedialog', 'FileDialog'): ('FileDialog', 'FileDialog'), + ('tkinter.filedialog', 'LoadFileDialog'): ('FileDialog', 'LoadFileDialog'), + ('tkinter.filedialog', 'SaveFileDialog'): ('FileDialog', 'SaveFileDialog'), + ('tkinter.simpledialog', 'SimpleDialog'): ('SimpleDialog', 'SimpleDialog'), + ('xmlrpc.server', 'ServerHTMLDoc'): ('DocXMLRPCServer', 'ServerHTMLDoc'), + ('xmlrpc.server', 'XMLRPCDocGenerator'): + ('DocXMLRPCServer', 'XMLRPCDocGenerator'), + ('xmlrpc.server', 'DocXMLRPCRequestHandler'): + ('DocXMLRPCServer', 'DocXMLRPCRequestHandler'), + ('xmlrpc.server', 'DocXMLRPCServer'): + ('DocXMLRPCServer', 'DocXMLRPCServer'), + ('xmlrpc.server', 'DocCGIXMLRPCRequestHandler'): + ('DocXMLRPCServer', 'DocCGIXMLRPCRequestHandler'), + ('http.server', 'SimpleHTTPRequestHandler'): + ('SimpleHTTPServer', 'SimpleHTTPRequestHandler'), + ('http.server', 'CGIHTTPRequestHandler'): + ('CGIHTTPServer', 'CGIHTTPRequestHandler'), + ('_socket', 'socket'): ('socket', '_socketobject'), +}) + +PYTHON3_OSERROR_EXCEPTIONS = ( + 'BrokenPipeError', + 'ChildProcessError', + 'ConnectionAbortedError', + 'ConnectionError', + 'ConnectionRefusedError', + 'ConnectionResetError', + 'FileExistsError', + 'FileNotFoundError', + 'InterruptedError', + 'IsADirectoryError', + 'NotADirectoryError', + 'PermissionError', + 'ProcessLookupError', + 'TimeoutError', +) + +for excname in PYTHON3_OSERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'OSError') + +PYTHON3_IMPORTERROR_EXCEPTIONS = ( + 'ModuleNotFoundError', +) + +for excname in PYTHON3_IMPORTERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'ImportError') +del excname diff --git a/squashfs-root/usr/lib/python3.12/_compression.py b/squashfs-root/usr/lib/python3.12/_compression.py new file mode 100644 index 0000000..e8b70aa --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/_compression.py @@ -0,0 +1,162 @@ +"""Internal classes used by the gzip, lzma and bz2 modules""" + +import io +import sys + +BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE # Compressed data read chunk size + + +class BaseStream(io.BufferedIOBase): + """Mode-checking helper functions.""" + + def _check_not_closed(self): + if self.closed: + raise ValueError("I/O operation on closed file") + + def _check_can_read(self): + if not self.readable(): + raise io.UnsupportedOperation("File not open for reading") + + def _check_can_write(self): + if not self.writable(): + raise io.UnsupportedOperation("File not open for writing") + + def _check_can_seek(self): + if not self.readable(): + raise io.UnsupportedOperation("Seeking is only supported " + "on files open for reading") + if not self.seekable(): + raise io.UnsupportedOperation("The underlying file object " + "does not support seeking") + + +class DecompressReader(io.RawIOBase): + """Adapts the decompressor API to a RawIOBase reader API""" + + def readable(self): + return True + + def __init__(self, fp, decomp_factory, trailing_error=(), **decomp_args): + self._fp = fp + self._eof = False + self._pos = 0 # Current offset in decompressed stream + + # Set to size of decompressed stream once it is known, for SEEK_END + self._size = -1 + + # Save the decompressor factory and arguments. + # If the file contains multiple compressed streams, each + # stream will need a separate decompressor object. A new decompressor + # object is also needed when implementing a backwards seek(). + self._decomp_factory = decomp_factory + self._decomp_args = decomp_args + self._decompressor = self._decomp_factory(**self._decomp_args) + + # Exception class to catch from decompressor signifying invalid + # trailing data to ignore + self._trailing_error = trailing_error + + def close(self): + self._decompressor = None + return super().close() + + def seekable(self): + return self._fp.seekable() + + def readinto(self, b): + with memoryview(b) as view, view.cast("B") as byte_view: + data = self.read(len(byte_view)) + byte_view[:len(data)] = data + return len(data) + + def read(self, size=-1): + if size < 0: + return self.readall() + + if not size or self._eof: + return b"" + data = None # Default if EOF is encountered + # Depending on the input data, our call to the decompressor may not + # return any data. In this case, try again after reading another block. + while True: + if self._decompressor.eof: + rawblock = (self._decompressor.unused_data or + self._fp.read(BUFFER_SIZE)) + if not rawblock: + break + # Continue to next stream. + self._decompressor = self._decomp_factory( + **self._decomp_args) + try: + data = self._decompressor.decompress(rawblock, size) + except self._trailing_error: + # Trailing data isn't a valid compressed stream; ignore it. + break + else: + if self._decompressor.needs_input: + rawblock = self._fp.read(BUFFER_SIZE) + if not rawblock: + raise EOFError("Compressed file ended before the " + "end-of-stream marker was reached") + else: + rawblock = b"" + data = self._decompressor.decompress(rawblock, size) + if data: + break + if not data: + self._eof = True + self._size = self._pos + return b"" + self._pos += len(data) + return data + + def readall(self): + chunks = [] + # sys.maxsize means the max length of output buffer is unlimited, + # so that the whole input buffer can be decompressed within one + # .decompress() call. + while data := self.read(sys.maxsize): + chunks.append(data) + + return b"".join(chunks) + + # Rewind the file to the beginning of the data stream. + def _rewind(self): + self._fp.seek(0) + self._eof = False + self._pos = 0 + self._decompressor = self._decomp_factory(**self._decomp_args) + + def seek(self, offset, whence=io.SEEK_SET): + # Recalculate offset as an absolute file position. + if whence == io.SEEK_SET: + pass + elif whence == io.SEEK_CUR: + offset = self._pos + offset + elif whence == io.SEEK_END: + # Seeking relative to EOF - we need to know the file's size. + if self._size < 0: + while self.read(io.DEFAULT_BUFFER_SIZE): + pass + offset = self._size + offset + else: + raise ValueError("Invalid value for whence: {}".format(whence)) + + # Make it so that offset is the number of bytes to skip forward. + if offset < self._pos: + self._rewind() + else: + offset -= self._pos + + # Read and discard data until we reach the desired position. + while offset > 0: + data = self.read(min(io.DEFAULT_BUFFER_SIZE, offset)) + if not data: + break + offset -= len(data) + + return self._pos + + def tell(self): + """Return the current file position.""" + return self._pos diff --git a/squashfs-root/usr/lib/python3.12/_distutils_system_mod.py b/squashfs-root/usr/lib/python3.12/_distutils_system_mod.py new file mode 100644 index 0000000..0cbe45b --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/_distutils_system_mod.py @@ -0,0 +1,164 @@ +""" +Apply Debian-specific patches to distutils commands. + +Extracts the customized behavior from patches as reported +in pypa/distutils#2 and applies those customizations (except +for scheme definitions) to those commands. + +Place this module somewhere in sys.path to take effect. +""" + +import os +import sys + +import distutils.sysconfig +import distutils.command.install as orig_install +import distutils.command.install_egg_info as orig_install_egg_info +from distutils.command.install_egg_info import ( + to_filename, + safe_name, + safe_version, + ) +from distutils.errors import DistutilsOptionError + + +class install(orig_install.install): + user_options = list(orig_install.install.user_options) + [ + ('install-layout=', None, + "installation layout to choose (known values: deb, unix)"), + ] + + def initialize_options(self): + super().initialize_options() + self.prefix_option = None + self.install_layout = None + + def select_scheme(self, name): + if name == "posix_prefix": + if self.install_layout: + if self.install_layout.lower() in ['deb']: + name = "deb_system" + elif self.install_layout.lower() in ['unix']: + name = "posix_prefix" + else: + raise DistutilsOptionError( + "unknown value for --install-layout") + elif ((self.prefix_option and + os.path.normpath(self.prefix) != '/usr/local') + or is_virtual_environment()): + name = "posix_prefix" + else: + if os.path.normpath(self.prefix) == '/usr/local': + self.prefix = self.exec_prefix = '/usr' + self.install_base = self.install_platbase = '/usr' + name = "posix_local" + super().select_scheme(name) + + def finalize_unix(self): + self.prefix_option = self.prefix + super().finalize_unix() + + +class install_egg_info(orig_install_egg_info.install_egg_info): + user_options = list(orig_install_egg_info.install_egg_info.user_options) + [ + ('install-layout', None, "custom installation layout"), + ] + + def initialize_options(self): + super().initialize_options() + self.prefix_option = None + self.install_layout = None + + def finalize_options(self): + self.set_undefined_options('install',('install_layout','install_layout')) + self.set_undefined_options('install',('prefix_option','prefix_option')) + super().finalize_options() + + @property + def basename(self): + if self.install_layout: + if not self.install_layout.lower() in ['deb', 'unix']: + raise DistutilsOptionError( + "unknown value for --install-layout") + no_pyver = (self.install_layout.lower() == 'deb') + elif self.prefix_option: + no_pyver = False + else: + no_pyver = True + if no_pyver: + basename = "%s-%s.egg-info" % ( + to_filename(safe_name(self.distribution.get_name())), + to_filename(safe_version(self.distribution.get_version())) + ) + else: + basename = "%s-%s-py%d.%d.egg-info" % ( + to_filename(safe_name(self.distribution.get_name())), + to_filename(safe_version(self.distribution.get_version())), + *sys.version_info[:2] + ) + return basename + + +def is_virtual_environment(): + return sys.base_prefix != sys.prefix or hasattr(sys, "real_prefix") + + +def _posix_lib(standard_lib, libpython, early_prefix, prefix): + is_default_prefix = not early_prefix or os.path.normpath(early_prefix) in ('/usr', '/usr/local') + if standard_lib: + return libpython + elif is_default_prefix and not is_virtual_environment(): + return os.path.join(prefix, "lib", "python3", "dist-packages") + else: + return os.path.join(libpython, "site-packages") + + +def _inject_headers(name, scheme): + """ + Given a scheme name and the resolved scheme, + if the scheme does not include headers, resolve + the fallback scheme for the name and use headers + from it. pypa/distutils#88 + + headers: module headers install location (posix_local is /local/ prefixed) + include: cpython headers (Python.h) + See also: bpo-44445 + """ + if 'headers' not in scheme: + if name == 'posix_prefix': + headers = scheme['include'] + else: + headers = orig_install.INSTALL_SCHEMES['posix_prefix']['headers'] + if name == 'posix_local' and '/local/' not in headers: + headers = headers.replace('/include/', '/local/include/') + scheme['headers'] = headers + return scheme + + +def load_schemes_wrapper(_load_schemes): + """ + Implement the _inject_headers modification, above, but before + _inject_headers() was introduced, upstream. So, slower and messier. + """ + def wrapped_load_schemes(): + schemes = _load_schemes() + for name, scheme in schemes.items(): + _inject_headers(name, scheme) + return schemes + return wrapped_load_schemes + + +def apply_customizations(): + orig_install.install = install + orig_install_egg_info.install_egg_info = install_egg_info + distutils.sysconfig._posix_lib = _posix_lib + + if hasattr(orig_install, '_inject_headers'): + # setuptools-bundled distutils >= 60.0.5 + orig_install._inject_headers = _inject_headers + elif hasattr(orig_install, '_load_schemes'): + # setuptools-bundled distutils >= 59.2.0 + orig_install._load_schemes = load_schemes_wrapper(orig_install._load_schemes) + + +apply_customizations() diff --git a/squashfs-root/usr/lib/python3.12/_markupbase.py b/squashfs-root/usr/lib/python3.12/_markupbase.py new file mode 100644 index 0000000..3ad7e27 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/_markupbase.py @@ -0,0 +1,396 @@ +"""Shared support for scanning document type declarations in HTML and XHTML. + +This module is used as a foundation for the html.parser module. It has no +documented public API and should not be used directly. + +""" + +import re + +_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match +_declstringlit_match = re.compile(r'(\'[^\']*\'|"[^"]*")\s*').match +_commentclose = re.compile(r'--\s*>') +_markedsectionclose = re.compile(r']\s*]\s*>') + +# An analysis of the MS-Word extensions is available at +# http://www.planetpublish.com/xmlarena/xap/Thursday/WordtoXML.pdf + +_msmarkedsectionclose = re.compile(r']\s*>') + +del re + + +class ParserBase: + """Parser base class which provides some common support methods used + by the SGML/HTML and XHTML parsers.""" + + def __init__(self): + if self.__class__ is ParserBase: + raise RuntimeError( + "_markupbase.ParserBase must be subclassed") + + def reset(self): + self.lineno = 1 + self.offset = 0 + + def getpos(self): + """Return current line number and offset.""" + return self.lineno, self.offset + + # Internal -- update line number and offset. This should be + # called for each piece of data exactly once, in order -- in other + # words the concatenation of all the input strings to this + # function should be exactly the entire input. + def updatepos(self, i, j): + if i >= j: + return j + rawdata = self.rawdata + nlines = rawdata.count("\n", i, j) + if nlines: + self.lineno = self.lineno + nlines + pos = rawdata.rindex("\n", i, j) # Should not fail + self.offset = j-(pos+1) + else: + self.offset = self.offset + j-i + return j + + _decl_otherchars = '' + + # Internal -- parse declaration (for use by subclasses). + def parse_declaration(self, i): + # This is some sort of declaration; in "HTML as + # deployed," this should only be the document type + # declaration (""). + # ISO 8879:1986, however, has more complex + # declaration syntax for elements in , including: + # --comment-- + # [marked section] + # name in the following list: ENTITY, DOCTYPE, ELEMENT, + # ATTLIST, NOTATION, SHORTREF, USEMAP, + # LINKTYPE, LINK, IDLINK, USELINK, SYSTEM + rawdata = self.rawdata + j = i + 2 + assert rawdata[i:j] == "": + # the empty comment + return j + 1 + if rawdata[j:j+1] in ("-", ""): + # Start of comment followed by buffer boundary, + # or just a buffer boundary. + return -1 + # A simple, practical version could look like: ((name|stringlit) S*) + '>' + n = len(rawdata) + if rawdata[j:j+2] == '--': #comment + # Locate --.*-- as the body of the comment + return self.parse_comment(i) + elif rawdata[j] == '[': #marked section + # Locate [statusWord [...arbitrary SGML...]] as the body of the marked section + # Where statusWord is one of TEMP, CDATA, IGNORE, INCLUDE, RCDATA + # Note that this is extended by Microsoft Office "Save as Web" function + # to include [if...] and [endif]. + return self.parse_marked_section(i) + else: #all other declaration elements + decltype, j = self._scan_name(j, i) + if j < 0: + return j + if decltype == "doctype": + self._decl_otherchars = '' + while j < n: + c = rawdata[j] + if c == ">": + # end of declaration syntax + data = rawdata[i+2:j] + if decltype == "doctype": + self.handle_decl(data) + else: + # According to the HTML5 specs sections "8.2.4.44 Bogus + # comment state" and "8.2.4.45 Markup declaration open + # state", a comment token should be emitted. + # Calling unknown_decl provides more flexibility though. + self.unknown_decl(data) + return j + 1 + if c in "\"'": + m = _declstringlit_match(rawdata, j) + if not m: + return -1 # incomplete + j = m.end() + elif c in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ": + name, j = self._scan_name(j, i) + elif c in self._decl_otherchars: + j = j + 1 + elif c == "[": + # this could be handled in a separate doctype parser + if decltype == "doctype": + j = self._parse_doctype_subset(j + 1, i) + elif decltype in {"attlist", "linktype", "link", "element"}: + # must tolerate []'d groups in a content model in an element declaration + # also in data attribute specifications of attlist declaration + # also link type declaration subsets in linktype declarations + # also link attribute specification lists in link declarations + raise AssertionError("unsupported '[' char in %s declaration" % decltype) + else: + raise AssertionError("unexpected '[' char in declaration") + else: + raise AssertionError("unexpected %r char in declaration" % rawdata[j]) + if j < 0: + return j + return -1 # incomplete + + # Internal -- parse a marked section + # Override this to handle MS-word extension syntax content + def parse_marked_section(self, i, report=1): + rawdata= self.rawdata + assert rawdata[i:i+3] == ' ending + match= _markedsectionclose.search(rawdata, i+3) + elif sectName in {"if", "else", "endif"}: + # look for MS Office ]> ending + match= _msmarkedsectionclose.search(rawdata, i+3) + else: + raise AssertionError( + 'unknown status keyword %r in marked section' % rawdata[i+3:j] + ) + if not match: + return -1 + if report: + j = match.start(0) + self.unknown_decl(rawdata[i+3: j]) + return match.end(0) + + # Internal -- parse comment, return length or -1 if not terminated + def parse_comment(self, i, report=1): + rawdata = self.rawdata + if rawdata[i:i+4] != ' + --> --> + + ''' + +__UNDEF__ = [] # a special sentinel object +def small(text): + if text: + return '' + text + '' + else: + return '' + +def strong(text): + if text: + return '' + text + '' + else: + return '' + +def grey(text): + if text: + return '' + text + '' + else: + return '' + +def lookup(name, frame, locals): + """Find the value for a given name in the given environment.""" + if name in locals: + return 'local', locals[name] + if name in frame.f_globals: + return 'global', frame.f_globals[name] + if '__builtins__' in frame.f_globals: + builtins = frame.f_globals['__builtins__'] + if isinstance(builtins, dict): + if name in builtins: + return 'builtin', builtins[name] + else: + if hasattr(builtins, name): + return 'builtin', getattr(builtins, name) + return None, __UNDEF__ + +def scanvars(reader, frame, locals): + """Scan one logical line of Python and look up values of variables used.""" + vars, lasttoken, parent, prefix, value = [], None, None, '', __UNDEF__ + for ttype, token, start, end, line in tokenize.generate_tokens(reader): + if ttype == tokenize.NEWLINE: break + if ttype == tokenize.NAME and token not in keyword.kwlist: + if lasttoken == '.': + if parent is not __UNDEF__: + value = getattr(parent, token, __UNDEF__) + vars.append((prefix + token, prefix, value)) + else: + where, value = lookup(token, frame, locals) + vars.append((token, where, value)) + elif token == '.': + prefix += lasttoken + '.' + parent = value + else: + parent, prefix = None, '' + lasttoken = token + return vars + +def html(einfo, context=5): + """Return a nice HTML document describing a given traceback.""" + etype, evalue, etb = einfo + if isinstance(etype, type): + etype = etype.__name__ + pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable + date = time.ctime(time.time()) + head = f''' + + + + + +
 
+ 
+{html_escape(str(etype))}
+{pyver}
{date}
+

A problem occurred in a Python script. Here is the sequence of +function calls leading up to the error, in the order they occurred.

''' + + indent = '' + small(' ' * 5) + ' ' + frames = [] + records = inspect.getinnerframes(etb, context) + for frame, file, lnum, func, lines, index in records: + if file: + file = os.path.abspath(file) + link = '%s' % (file, pydoc.html.escape(file)) + else: + file = link = '?' + args, varargs, varkw, locals = inspect.getargvalues(frame) + call = '' + if func != '?': + call = 'in ' + strong(pydoc.html.escape(func)) + if func != "": + call += inspect.formatargvalues(args, varargs, varkw, locals, + formatvalue=lambda value: '=' + pydoc.html.repr(value)) + + highlight = {} + def reader(lnum=[lnum]): + highlight[lnum[0]] = 1 + try: return linecache.getline(file, lnum[0]) + finally: lnum[0] += 1 + vars = scanvars(reader, frame, locals) + + rows = ['%s%s %s' % + (' ', link, call)] + if index is not None: + i = lnum - index + for line in lines: + num = small(' ' * (5-len(str(i))) + str(i)) + ' ' + if i in highlight: + line = '=>%s%s' % (num, pydoc.html.preformat(line)) + rows.append('%s' % line) + else: + line = '  %s%s' % (num, pydoc.html.preformat(line)) + rows.append('%s' % grey(line)) + i += 1 + + done, dump = {}, [] + for name, where, value in vars: + if name in done: continue + done[name] = 1 + if value is not __UNDEF__: + if where in ('global', 'builtin'): + name = ('%s ' % where) + strong(name) + elif where == 'local': + name = strong(name) + else: + name = where + strong(name.split('.')[-1]) + dump.append('%s = %s' % (name, pydoc.html.repr(value))) + else: + dump.append(name + ' undefined') + + rows.append('%s' % small(grey(', '.join(dump)))) + frames.append(''' + +%s
''' % '\n'.join(rows)) + + exception = ['

%s: %s' % (strong(pydoc.html.escape(str(etype))), + pydoc.html.escape(str(evalue)))] + for name in dir(evalue): + if name[:1] == '_': continue + value = pydoc.html.repr(getattr(evalue, name)) + exception.append('\n
%s%s =\n%s' % (indent, name, value)) + + return head + ''.join(frames) + ''.join(exception) + ''' + + + +''' % pydoc.html.escape( + ''.join(traceback.format_exception(etype, evalue, etb))) + +def text(einfo, context=5): + """Return a plain text document describing a given traceback.""" + etype, evalue, etb = einfo + if isinstance(etype, type): + etype = etype.__name__ + pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable + date = time.ctime(time.time()) + head = "%s\n%s\n%s\n" % (str(etype), pyver, date) + ''' +A problem occurred in a Python script. Here is the sequence of +function calls leading up to the error, in the order they occurred. +''' + + frames = [] + records = inspect.getinnerframes(etb, context) + for frame, file, lnum, func, lines, index in records: + file = file and os.path.abspath(file) or '?' + args, varargs, varkw, locals = inspect.getargvalues(frame) + call = '' + if func != '?': + call = 'in ' + func + if func != "": + call += inspect.formatargvalues(args, varargs, varkw, locals, + formatvalue=lambda value: '=' + pydoc.text.repr(value)) + + highlight = {} + def reader(lnum=[lnum]): + highlight[lnum[0]] = 1 + try: return linecache.getline(file, lnum[0]) + finally: lnum[0] += 1 + vars = scanvars(reader, frame, locals) + + rows = [' %s %s' % (file, call)] + if index is not None: + i = lnum - index + for line in lines: + num = '%5d ' % i + rows.append(num+line.rstrip()) + i += 1 + + done, dump = {}, [] + for name, where, value in vars: + if name in done: continue + done[name] = 1 + if value is not __UNDEF__: + if where == 'global': name = 'global ' + name + elif where != 'local': name = where + name.split('.')[-1] + dump.append('%s = %s' % (name, pydoc.text.repr(value))) + else: + dump.append(name + ' undefined') + + rows.append('\n'.join(dump)) + frames.append('\n%s\n' % '\n'.join(rows)) + + exception = ['%s: %s' % (str(etype), str(evalue))] + for name in dir(evalue): + value = pydoc.text.repr(getattr(evalue, name)) + exception.append('\n%s%s = %s' % (" "*4, name, value)) + + return head + ''.join(frames) + ''.join(exception) + ''' + +The above is a description of an error in a Python program. Here is +the original traceback: + +%s +''' % ''.join(traceback.format_exception(etype, evalue, etb)) + +class Hook: + """A hook to replace sys.excepthook that shows tracebacks in HTML.""" + + def __init__(self, display=1, logdir=None, context=5, file=None, + format="html"): + self.display = display # send tracebacks to browser if true + self.logdir = logdir # log tracebacks to files if not None + self.context = context # number of source code lines per frame + self.file = file or sys.stdout # place to send the output + self.format = format + + def __call__(self, etype, evalue, etb): + self.handle((etype, evalue, etb)) + + def handle(self, info=None): + info = info or sys.exc_info() + if self.format == "html": + self.file.write(reset()) + + formatter = (self.format=="html") and html or text + plain = False + try: + doc = formatter(info, self.context) + except: # just in case something goes wrong + doc = ''.join(traceback.format_exception(*info)) + plain = True + + if self.display: + if plain: + doc = pydoc.html.escape(doc) + self.file.write('

' + doc + '
\n') + else: + self.file.write(doc + '\n') + else: + self.file.write('

A problem occurred in a Python script.\n') + + if self.logdir is not None: + suffix = ['.txt', '.html'][self.format=="html"] + (fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir) + + try: + with os.fdopen(fd, 'w') as file: + file.write(doc) + msg = '%s contains the description of this error.' % path + except: + msg = 'Tried to save traceback to %s, but failed.' % path + + if self.format == 'html': + self.file.write('

%s

\n' % msg) + else: + self.file.write(msg + '\n') + try: + self.file.flush() + except: pass + +handler = Hook().handle +def enable(display=1, logdir=None, context=5, format="html"): + """Install an exception handler that formats tracebacks as HTML. + + The optional argument 'display' can be set to 0 to suppress sending the + traceback to the browser, and 'logdir' can be set to a directory to cause + tracebacks to be written to files there.""" + sys.excepthook = Hook(display=display, logdir=logdir, + context=context, format=format) diff --git a/squashfs-root/usr/lib/python3.12/chunk.py b/squashfs-root/usr/lib/python3.12/chunk.py new file mode 100644 index 0000000..618781e --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/chunk.py @@ -0,0 +1,173 @@ +"""Simple class to read IFF chunks. + +An IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File +Format)) has the following structure: + ++----------------+ +| ID (4 bytes) | ++----------------+ +| size (4 bytes) | ++----------------+ +| data | +| ... | ++----------------+ + +The ID is a 4-byte string which identifies the type of chunk. + +The size field (a 32-bit value, encoded using big-endian byte order) +gives the size of the whole chunk, including the 8-byte header. + +Usually an IFF-type file consists of one or more chunks. The proposed +usage of the Chunk class defined here is to instantiate an instance at +the start of each chunk and read from the instance until it reaches +the end, after which a new instance can be instantiated. At the end +of the file, creating a new instance will fail with an EOFError +exception. + +Usage: +while True: + try: + chunk = Chunk(file) + except EOFError: + break + chunktype = chunk.getname() + while True: + data = chunk.read(nbytes) + if not data: + pass + # do something with data + +The interface is file-like. The implemented methods are: +read, close, seek, tell, isatty. +Extra methods are: skip() (called by close, skips to the end of the chunk), +getname() (returns the name (ID) of the chunk) + +The __init__ method has one required argument, a file-like object +(including a chunk instance), and one optional argument, a flag which +specifies whether or not chunks are aligned on 2-byte boundaries. The +default is 1, i.e. aligned. +""" + +import warnings + +warnings._deprecated(__name__, remove=(3, 13)) + +class Chunk: + def __init__(self, file, align=True, bigendian=True, inclheader=False): + import struct + self.closed = False + self.align = align # whether to align to word (2-byte) boundaries + if bigendian: + strflag = '>' + else: + strflag = '<' + self.file = file + self.chunkname = file.read(4) + if len(self.chunkname) < 4: + raise EOFError + try: + self.chunksize = struct.unpack_from(strflag+'L', file.read(4))[0] + except struct.error: + raise EOFError from None + if inclheader: + self.chunksize = self.chunksize - 8 # subtract header + self.size_read = 0 + try: + self.offset = self.file.tell() + except (AttributeError, OSError): + self.seekable = False + else: + self.seekable = True + + def getname(self): + """Return the name (ID) of the current chunk.""" + return self.chunkname + + def getsize(self): + """Return the size of the current chunk.""" + return self.chunksize + + def close(self): + if not self.closed: + try: + self.skip() + finally: + self.closed = True + + def isatty(self): + if self.closed: + raise ValueError("I/O operation on closed file") + return False + + def seek(self, pos, whence=0): + """Seek to specified position into the chunk. + Default position is 0 (start of chunk). + If the file is not seekable, this will result in an error. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if not self.seekable: + raise OSError("cannot seek") + if whence == 1: + pos = pos + self.size_read + elif whence == 2: + pos = pos + self.chunksize + if pos < 0 or pos > self.chunksize: + raise RuntimeError + self.file.seek(self.offset + pos, 0) + self.size_read = pos + + def tell(self): + if self.closed: + raise ValueError("I/O operation on closed file") + return self.size_read + + def read(self, size=-1): + """Read at most size bytes from the chunk. + If size is omitted or negative, read until the end + of the chunk. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if self.size_read >= self.chunksize: + return b'' + if size < 0: + size = self.chunksize - self.size_read + if size > self.chunksize - self.size_read: + size = self.chunksize - self.size_read + data = self.file.read(size) + self.size_read = self.size_read + len(data) + if self.size_read == self.chunksize and \ + self.align and \ + (self.chunksize & 1): + dummy = self.file.read(1) + self.size_read = self.size_read + len(dummy) + return data + + def skip(self): + """Skip the rest of the chunk. + If you are not interested in the contents of the chunk, + this method should be called so that the file points to + the start of the next chunk. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if self.seekable: + try: + n = self.chunksize - self.size_read + # maybe fix alignment + if self.align and (self.chunksize & 1): + n = n + 1 + self.file.seek(n, 1) + self.size_read = self.size_read + n + return + except OSError: + pass + while self.size_read < self.chunksize: + n = min(8192, self.chunksize - self.size_read) + dummy = self.read(n) + if not dummy: + raise EOFError diff --git a/squashfs-root/usr/lib/python3.12/cmd.py b/squashfs-root/usr/lib/python3.12/cmd.py new file mode 100644 index 0000000..88ee7d3 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/cmd.py @@ -0,0 +1,401 @@ +"""A generic class to build line-oriented command interpreters. + +Interpreters constructed with this class obey the following conventions: + +1. End of file on input is processed as the command 'EOF'. +2. A command is parsed out of each line by collecting the prefix composed + of characters in the identchars member. +3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method + is passed a single argument consisting of the remainder of the line. +4. Typing an empty line repeats the last command. (Actually, it calls the + method `emptyline', which may be overridden in a subclass.) +5. There is a predefined `help' method. Given an argument `topic', it + calls the command `help_topic'. With no arguments, it lists all topics + with defined help_ functions, broken into up to three topics; documented + commands, miscellaneous help topics, and undocumented commands. +6. The command '?' is a synonym for `help'. The command '!' is a synonym + for `shell', if a do_shell method exists. +7. If completion is enabled, completing commands will be done automatically, + and completing of commands args is done by calling complete_foo() with + arguments text, line, begidx, endidx. text is string we are matching + against, all returned matches must begin with it. line is the current + input line (lstripped), begidx and endidx are the beginning and end + indexes of the text being matched, which could be used to provide + different completion depending upon which position the argument is in. + +The `default' method may be overridden to intercept commands for which there +is no do_ method. + +The `completedefault' method may be overridden to intercept completions for +commands that have no complete_ method. + +The data member `self.ruler' sets the character used to draw separator lines +in the help messages. If empty, no ruler line is drawn. It defaults to "=". + +If the value of `self.intro' is nonempty when the cmdloop method is called, +it is printed out on interpreter startup. This value may be overridden +via an optional argument to the cmdloop() method. + +The data members `self.doc_header', `self.misc_header', and +`self.undoc_header' set the headers used for the help function's +listings of documented functions, miscellaneous topics, and undocumented +functions respectively. +""" + +import string, sys + +__all__ = ["Cmd"] + +PROMPT = '(Cmd) ' +IDENTCHARS = string.ascii_letters + string.digits + '_' + +class Cmd: + """A simple framework for writing line-oriented command interpreters. + + These are often useful for test harnesses, administrative tools, and + prototypes that will later be wrapped in a more sophisticated interface. + + A Cmd instance or subclass instance is a line-oriented interpreter + framework. There is no good reason to instantiate Cmd itself; rather, + it's useful as a superclass of an interpreter class you define yourself + in order to inherit Cmd's methods and encapsulate action methods. + + """ + prompt = PROMPT + identchars = IDENTCHARS + ruler = '=' + lastcmd = '' + intro = None + doc_leader = "" + doc_header = "Documented commands (type help ):" + misc_header = "Miscellaneous help topics:" + undoc_header = "Undocumented commands:" + nohelp = "*** No help on %s" + use_rawinput = 1 + + def __init__(self, completekey='tab', stdin=None, stdout=None): + """Instantiate a line-oriented interpreter framework. + + The optional argument 'completekey' is the readline name of a + completion key; it defaults to the Tab key. If completekey is + not None and the readline module is available, command completion + is done automatically. The optional arguments stdin and stdout + specify alternate input and output file objects; if not specified, + sys.stdin and sys.stdout are used. + + """ + if stdin is not None: + self.stdin = stdin + else: + self.stdin = sys.stdin + if stdout is not None: + self.stdout = stdout + else: + self.stdout = sys.stdout + self.cmdqueue = [] + self.completekey = completekey + + def cmdloop(self, intro=None): + """Repeatedly issue a prompt, accept input, parse an initial prefix + off the received input, and dispatch to action methods, passing them + the remainder of the line as argument. + + """ + + self.preloop() + if self.use_rawinput and self.completekey: + try: + import readline + self.old_completer = readline.get_completer() + readline.set_completer(self.complete) + readline.parse_and_bind(self.completekey+": complete") + except ImportError: + pass + try: + if intro is not None: + self.intro = intro + if self.intro: + self.stdout.write(str(self.intro)+"\n") + stop = None + while not stop: + if self.cmdqueue: + line = self.cmdqueue.pop(0) + else: + if self.use_rawinput: + try: + line = input(self.prompt) + except EOFError: + line = 'EOF' + else: + self.stdout.write(self.prompt) + self.stdout.flush() + line = self.stdin.readline() + if not len(line): + line = 'EOF' + else: + line = line.rstrip('\r\n') + line = self.precmd(line) + stop = self.onecmd(line) + stop = self.postcmd(stop, line) + self.postloop() + finally: + if self.use_rawinput and self.completekey: + try: + import readline + readline.set_completer(self.old_completer) + except ImportError: + pass + + + def precmd(self, line): + """Hook method executed just before the command line is + interpreted, but after the input prompt is generated and issued. + + """ + return line + + def postcmd(self, stop, line): + """Hook method executed just after a command dispatch is finished.""" + return stop + + def preloop(self): + """Hook method executed once when the cmdloop() method is called.""" + pass + + def postloop(self): + """Hook method executed once when the cmdloop() method is about to + return. + + """ + pass + + def parseline(self, line): + """Parse the line into a command name and a string containing + the arguments. Returns a tuple containing (command, args, line). + 'command' and 'args' may be None if the line couldn't be parsed. + """ + line = line.strip() + if not line: + return None, None, line + elif line[0] == '?': + line = 'help ' + line[1:] + elif line[0] == '!': + if hasattr(self, 'do_shell'): + line = 'shell ' + line[1:] + else: + return None, None, line + i, n = 0, len(line) + while i < n and line[i] in self.identchars: i = i+1 + cmd, arg = line[:i], line[i:].strip() + return cmd, arg, line + + def onecmd(self, line): + """Interpret the argument as though it had been typed in response + to the prompt. + + This may be overridden, but should not normally need to be; + see the precmd() and postcmd() methods for useful execution hooks. + The return value is a flag indicating whether interpretation of + commands by the interpreter should stop. + + """ + cmd, arg, line = self.parseline(line) + if not line: + return self.emptyline() + if cmd is None: + return self.default(line) + self.lastcmd = line + if line == 'EOF' : + self.lastcmd = '' + if cmd == '': + return self.default(line) + else: + try: + func = getattr(self, 'do_' + cmd) + except AttributeError: + return self.default(line) + return func(arg) + + def emptyline(self): + """Called when an empty line is entered in response to the prompt. + + If this method is not overridden, it repeats the last nonempty + command entered. + + """ + if self.lastcmd: + return self.onecmd(self.lastcmd) + + def default(self, line): + """Called on an input line when the command prefix is not recognized. + + If this method is not overridden, it prints an error message and + returns. + + """ + self.stdout.write('*** Unknown syntax: %s\n'%line) + + def completedefault(self, *ignored): + """Method called to complete an input line when no command-specific + complete_*() method is available. + + By default, it returns an empty list. + + """ + return [] + + def completenames(self, text, *ignored): + dotext = 'do_'+text + return [a[3:] for a in self.get_names() if a.startswith(dotext)] + + def complete(self, text, state): + """Return the next possible completion for 'text'. + + If a command has not been entered, then complete against command list. + Otherwise try to call complete_ to get list of completions. + """ + if state == 0: + import readline + origline = readline.get_line_buffer() + line = origline.lstrip() + stripped = len(origline) - len(line) + begidx = readline.get_begidx() - stripped + endidx = readline.get_endidx() - stripped + if begidx>0: + cmd, args, foo = self.parseline(line) + if cmd == '': + compfunc = self.completedefault + else: + try: + compfunc = getattr(self, 'complete_' + cmd) + except AttributeError: + compfunc = self.completedefault + else: + compfunc = self.completenames + self.completion_matches = compfunc(text, line, begidx, endidx) + try: + return self.completion_matches[state] + except IndexError: + return None + + def get_names(self): + # This method used to pull in base class attributes + # at a time dir() didn't do it yet. + return dir(self.__class__) + + def complete_help(self, *args): + commands = set(self.completenames(*args)) + topics = set(a[5:] for a in self.get_names() + if a.startswith('help_' + args[0])) + return list(commands | topics) + + def do_help(self, arg): + 'List available commands with "help" or detailed help with "help cmd".' + if arg: + # XXX check arg syntax + try: + func = getattr(self, 'help_' + arg) + except AttributeError: + try: + doc=getattr(self, 'do_' + arg).__doc__ + if doc: + self.stdout.write("%s\n"%str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n"%str(self.nohelp % (arg,))) + return + func() + else: + names = self.get_names() + cmds_doc = [] + cmds_undoc = [] + topics = set() + for name in names: + if name[:5] == 'help_': + topics.add(name[5:]) + names.sort() + # There can be duplicates if routines overridden + prevname = '' + for name in names: + if name[:3] == 'do_': + if name == prevname: + continue + prevname = name + cmd=name[3:] + if cmd in topics: + cmds_doc.append(cmd) + topics.remove(cmd) + elif getattr(self, name).__doc__: + cmds_doc.append(cmd) + else: + cmds_undoc.append(cmd) + self.stdout.write("%s\n"%str(self.doc_leader)) + self.print_topics(self.doc_header, cmds_doc, 15,80) + self.print_topics(self.misc_header, sorted(topics),15,80) + self.print_topics(self.undoc_header, cmds_undoc, 15,80) + + def print_topics(self, header, cmds, cmdlen, maxcol): + if cmds: + self.stdout.write("%s\n"%str(header)) + if self.ruler: + self.stdout.write("%s\n"%str(self.ruler * len(header))) + self.columnize(cmds, maxcol-1) + self.stdout.write("\n") + + def columnize(self, list, displaywidth=80): + """Display a list of strings as a compact set of columns. + + Each column is only as wide as necessary. + Columns are separated by two spaces (one was not legible enough). + """ + if not list: + self.stdout.write("\n") + return + + nonstrings = [i for i in range(len(list)) + if not isinstance(list[i], str)] + if nonstrings: + raise TypeError("list[i] not a string for i in %s" + % ", ".join(map(str, nonstrings))) + size = len(list) + if size == 1: + self.stdout.write('%s\n'%str(list[0])) + return + # Try every row count from 1 upwards + for nrows in range(1, len(list)): + ncols = (size+nrows-1) // nrows + colwidths = [] + totwidth = -2 + for col in range(ncols): + colwidth = 0 + for row in range(nrows): + i = row + nrows*col + if i >= size: + break + x = list[i] + colwidth = max(colwidth, len(x)) + colwidths.append(colwidth) + totwidth += colwidth + 2 + if totwidth > displaywidth: + break + if totwidth <= displaywidth: + break + else: + nrows = len(list) + ncols = 1 + colwidths = [0] + for row in range(nrows): + texts = [] + for col in range(ncols): + i = row + nrows*col + if i >= size: + x = "" + else: + x = list[i] + texts.append(x) + while texts and not texts[-1]: + del texts[-1] + for col in range(len(texts)): + texts[col] = texts[col].ljust(colwidths[col]) + self.stdout.write("%s\n"%str(" ".join(texts))) diff --git a/squashfs-root/usr/lib/python3.12/code.py b/squashfs-root/usr/lib/python3.12/code.py new file mode 100644 index 0000000..2bd5fa3 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/code.py @@ -0,0 +1,317 @@ +"""Utilities needed to emulate Python's interactive interpreter. + +""" + +# Inspired by similar code by Jeff Epler and Fredrik Lundh. + + +import sys +import traceback +from codeop import CommandCompiler, compile_command + +__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", + "compile_command"] + +class InteractiveInterpreter: + """Base class for InteractiveConsole. + + This class deals with parsing and interpreter state (the user's + namespace); it doesn't deal with input buffering or prompting or + input file naming (the filename is always passed in explicitly). + + """ + + def __init__(self, locals=None): + """Constructor. + + The optional 'locals' argument specifies the dictionary in + which code will be executed; it defaults to a newly created + dictionary with key "__name__" set to "__console__" and key + "__doc__" set to None. + + """ + if locals is None: + locals = {"__name__": "__console__", "__doc__": None} + self.locals = locals + self.compile = CommandCompiler() + + def runsource(self, source, filename="", symbol="single"): + """Compile and run some source in the interpreter. + + Arguments are as for compile_command(). + + One of several things can happen: + + 1) The input is incorrect; compile_command() raised an + exception (SyntaxError or OverflowError). A syntax traceback + will be printed by calling the showsyntaxerror() method. + + 2) The input is incomplete, and more input is required; + compile_command() returned None. Nothing happens. + + 3) The input is complete; compile_command() returned a code + object. The code is executed by calling self.runcode() (which + also handles run-time exceptions, except for SystemExit). + + The return value is True in case 2, False in the other cases (unless + an exception is raised). The return value can be used to + decide whether to use sys.ps1 or sys.ps2 to prompt the next + line. + + """ + try: + code = self.compile(source, filename, symbol) + except (OverflowError, SyntaxError, ValueError): + # Case 1 + self.showsyntaxerror(filename) + return False + + if code is None: + # Case 2 + return True + + # Case 3 + self.runcode(code) + return False + + def runcode(self, code): + """Execute a code object. + + When an exception occurs, self.showtraceback() is called to + display a traceback. All exceptions are caught except + SystemExit, which is reraised. + + A note about KeyboardInterrupt: this exception may occur + elsewhere in this code, and may not always be caught. The + caller should be prepared to deal with it. + + """ + try: + exec(code, self.locals) + except SystemExit: + raise + except: + self.showtraceback() + + def showsyntaxerror(self, filename=None): + """Display the syntax error that just occurred. + + This doesn't display a stack trace because there isn't one. + + If a filename is given, it is stuffed in the exception instead + of what was there before (because Python's parser always uses + "" when reading from a string). + + The output is written by self.write(), below. + + """ + type, value, tb = sys.exc_info() + sys.last_exc = value + sys.last_type = type + sys.last_value = value + sys.last_traceback = tb + if filename and type is SyntaxError: + # Work hard to stuff the correct filename in the exception + try: + msg, (dummy_filename, lineno, offset, line) = value.args + except ValueError: + # Not the format we expect; leave it alone + pass + else: + # Stuff in the right filename + value = SyntaxError(msg, (filename, lineno, offset, line)) + sys.last_exc = sys.last_value = value + if sys.excepthook is sys.__excepthook__: + lines = traceback.format_exception_only(type, value) + self.write(''.join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(type, value, tb) + + def showtraceback(self): + """Display the exception that just occurred. + + We remove the first stack item because it is our own code. + + The output is written by self.write(), below. + + """ + sys.last_type, sys.last_value, last_tb = ei = sys.exc_info() + sys.last_traceback = last_tb + sys.last_exc = ei[1] + try: + lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next) + if sys.excepthook is sys.__excepthook__: + self.write(''.join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(ei[0], ei[1], last_tb) + finally: + last_tb = ei = None + + def write(self, data): + """Write a string. + + The base implementation writes to sys.stderr; a subclass may + replace this with a different implementation. + + """ + sys.stderr.write(data) + + +class InteractiveConsole(InteractiveInterpreter): + """Closely emulate the behavior of the interactive Python interpreter. + + This class builds on InteractiveInterpreter and adds prompting + using the familiar sys.ps1 and sys.ps2, and input buffering. + + """ + + def __init__(self, locals=None, filename=""): + """Constructor. + + The optional locals argument will be passed to the + InteractiveInterpreter base class. + + The optional filename argument should specify the (file)name + of the input stream; it will show up in tracebacks. + + """ + InteractiveInterpreter.__init__(self, locals) + self.filename = filename + self.resetbuffer() + + def resetbuffer(self): + """Reset the input buffer.""" + self.buffer = [] + + def interact(self, banner=None, exitmsg=None): + """Closely emulate the interactive Python console. + + The optional banner argument specifies the banner to print + before the first interaction; by default it prints a banner + similar to the one printed by the real Python interpreter, + followed by the current class name in parentheses (so as not + to confuse this with the real interpreter -- since it's so + close!). + + The optional exitmsg argument specifies the exit message + printed when exiting. Pass the empty string to suppress + printing an exit message. If exitmsg is not given or None, + a default message is printed. + + """ + try: + sys.ps1 + except AttributeError: + sys.ps1 = ">>> " + try: + sys.ps2 + except AttributeError: + sys.ps2 = "... " + cprt = 'Type "help", "copyright", "credits" or "license" for more information.' + if banner is None: + self.write("Python %s on %s\n%s\n(%s)\n" % + (sys.version, sys.platform, cprt, + self.__class__.__name__)) + elif banner: + self.write("%s\n" % str(banner)) + more = 0 + while 1: + try: + if more: + prompt = sys.ps2 + else: + prompt = sys.ps1 + try: + line = self.raw_input(prompt) + except EOFError: + self.write("\n") + break + else: + more = self.push(line) + except KeyboardInterrupt: + self.write("\nKeyboardInterrupt\n") + self.resetbuffer() + more = 0 + if exitmsg is None: + self.write('now exiting %s...\n' % self.__class__.__name__) + elif exitmsg != '': + self.write('%s\n' % exitmsg) + + def push(self, line): + """Push a line to the interpreter. + + The line should not have a trailing newline; it may have + internal newlines. The line is appended to a buffer and the + interpreter's runsource() method is called with the + concatenated contents of the buffer as source. If this + indicates that the command was executed or invalid, the buffer + is reset; otherwise, the command is incomplete, and the buffer + is left as it was after the line was appended. The return + value is 1 if more input is required, 0 if the line was dealt + with in some way (this is the same as runsource()). + + """ + self.buffer.append(line) + source = "\n".join(self.buffer) + more = self.runsource(source, self.filename) + if not more: + self.resetbuffer() + return more + + def raw_input(self, prompt=""): + """Write a prompt and read a line. + + The returned line does not include the trailing newline. + When the user enters the EOF key sequence, EOFError is raised. + + The base implementation uses the built-in function + input(); a subclass may replace this with a different + implementation. + + """ + return input(prompt) + + + +def interact(banner=None, readfunc=None, local=None, exitmsg=None): + """Closely emulate the interactive Python interpreter. + + This is a backwards compatible interface to the InteractiveConsole + class. When readfunc is not specified, it attempts to import the + readline module to enable GNU readline if it is available. + + Arguments (all optional, all default to None): + + banner -- passed to InteractiveConsole.interact() + readfunc -- if not None, replaces InteractiveConsole.raw_input() + local -- passed to InteractiveInterpreter.__init__() + exitmsg -- passed to InteractiveConsole.interact() + + """ + console = InteractiveConsole(local) + if readfunc is not None: + console.raw_input = readfunc + else: + try: + import readline + except ImportError: + pass + console.interact(banner, exitmsg) + + +if __name__ == "__main__": + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument('-q', action='store_true', + help="don't print version and copyright messages") + args = parser.parse_args() + if args.q or sys.flags.quiet: + banner = '' + else: + banner = None + interact(banner) diff --git a/squashfs-root/usr/lib/python3.12/codecs.py b/squashfs-root/usr/lib/python3.12/codecs.py new file mode 100644 index 0000000..82f2398 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/codecs.py @@ -0,0 +1,1129 @@ +""" codecs -- Python Codec Registry, API and helpers. + + +Written by Marc-Andre Lemburg (mal@lemburg.com). + +(c) Copyright CNRI, All Rights Reserved. NO WARRANTY. + +""" + +import builtins +import sys + +### Registry and builtin stateless codec functions + +try: + from _codecs import * +except ImportError as why: + raise SystemError('Failed to load the builtin codecs: %s' % why) + +__all__ = ["register", "lookup", "open", "EncodedFile", "BOM", "BOM_BE", + "BOM_LE", "BOM32_BE", "BOM32_LE", "BOM64_BE", "BOM64_LE", + "BOM_UTF8", "BOM_UTF16", "BOM_UTF16_LE", "BOM_UTF16_BE", + "BOM_UTF32", "BOM_UTF32_LE", "BOM_UTF32_BE", + "CodecInfo", "Codec", "IncrementalEncoder", "IncrementalDecoder", + "StreamReader", "StreamWriter", + "StreamReaderWriter", "StreamRecoder", + "getencoder", "getdecoder", "getincrementalencoder", + "getincrementaldecoder", "getreader", "getwriter", + "encode", "decode", "iterencode", "iterdecode", + "strict_errors", "ignore_errors", "replace_errors", + "xmlcharrefreplace_errors", + "backslashreplace_errors", "namereplace_errors", + "register_error", "lookup_error"] + +### Constants + +# +# Byte Order Mark (BOM = ZERO WIDTH NO-BREAK SPACE = U+FEFF) +# and its possible byte string values +# for UTF8/UTF16/UTF32 output and little/big endian machines +# + +# UTF-8 +BOM_UTF8 = b'\xef\xbb\xbf' + +# UTF-16, little endian +BOM_LE = BOM_UTF16_LE = b'\xff\xfe' + +# UTF-16, big endian +BOM_BE = BOM_UTF16_BE = b'\xfe\xff' + +# UTF-32, little endian +BOM_UTF32_LE = b'\xff\xfe\x00\x00' + +# UTF-32, big endian +BOM_UTF32_BE = b'\x00\x00\xfe\xff' + +if sys.byteorder == 'little': + + # UTF-16, native endianness + BOM = BOM_UTF16 = BOM_UTF16_LE + + # UTF-32, native endianness + BOM_UTF32 = BOM_UTF32_LE + +else: + + # UTF-16, native endianness + BOM = BOM_UTF16 = BOM_UTF16_BE + + # UTF-32, native endianness + BOM_UTF32 = BOM_UTF32_BE + +# Old broken names (don't use in new code) +BOM32_LE = BOM_UTF16_LE +BOM32_BE = BOM_UTF16_BE +BOM64_LE = BOM_UTF32_LE +BOM64_BE = BOM_UTF32_BE + + +### Codec base classes (defining the API) + +class CodecInfo(tuple): + """Codec details when looking up the codec registry""" + + # Private API to allow Python 3.4 to denylist the known non-Unicode + # codecs in the standard library. A more general mechanism to + # reliably distinguish test encodings from other codecs will hopefully + # be defined for Python 3.5 + # + # See http://bugs.python.org/issue19619 + _is_text_encoding = True # Assume codecs are text encodings by default + + def __new__(cls, encode, decode, streamreader=None, streamwriter=None, + incrementalencoder=None, incrementaldecoder=None, name=None, + *, _is_text_encoding=None): + self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) + self.name = name + self.encode = encode + self.decode = decode + self.incrementalencoder = incrementalencoder + self.incrementaldecoder = incrementaldecoder + self.streamwriter = streamwriter + self.streamreader = streamreader + if _is_text_encoding is not None: + self._is_text_encoding = _is_text_encoding + return self + + def __repr__(self): + return "<%s.%s object for encoding %s at %#x>" % \ + (self.__class__.__module__, self.__class__.__qualname__, + self.name, id(self)) + +class Codec: + + """ Defines the interface for stateless encoders/decoders. + + The .encode()/.decode() methods may use different error + handling schemes by providing the errors argument. These + string values are predefined: + + 'strict' - raise a ValueError error (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace' - replace with a suitable replacement character; + Python will use the official U+FFFD REPLACEMENT + CHARACTER for the builtin Unicode codecs on + decoding and '?' on encoding. + 'surrogateescape' - replace with private code points U+DCnn. + 'xmlcharrefreplace' - Replace with the appropriate XML + character reference (only for encoding). + 'backslashreplace' - Replace with backslashed escape sequences. + 'namereplace' - Replace with \\N{...} escape sequences + (only for encoding). + + The set of allowed values can be extended via register_error. + + """ + def encode(self, input, errors='strict'): + + """ Encodes the object input and returns a tuple (output + object, length consumed). + + errors defines the error handling to apply. It defaults to + 'strict' handling. + + The method may not store state in the Codec instance. Use + StreamWriter for codecs which have to keep state in order to + make encoding efficient. + + The encoder must be able to handle zero length input and + return an empty object of the output object type in this + situation. + + """ + raise NotImplementedError + + def decode(self, input, errors='strict'): + + """ Decodes the object input and returns a tuple (output + object, length consumed). + + input must be an object which provides the bf_getreadbuf + buffer slot. Python strings, buffer objects and memory + mapped files are examples of objects providing this slot. + + errors defines the error handling to apply. It defaults to + 'strict' handling. + + The method may not store state in the Codec instance. Use + StreamReader for codecs which have to keep state in order to + make decoding efficient. + + The decoder must be able to handle zero length input and + return an empty object of the output object type in this + situation. + + """ + raise NotImplementedError + +class IncrementalEncoder(object): + """ + An IncrementalEncoder encodes an input in multiple steps. The input can + be passed piece by piece to the encode() method. The IncrementalEncoder + remembers the state of the encoding process between calls to encode(). + """ + def __init__(self, errors='strict'): + """ + Creates an IncrementalEncoder instance. + + The IncrementalEncoder may use different error handling schemes by + providing the errors keyword argument. See the module docstring + for a list of possible values. + """ + self.errors = errors + self.buffer = "" + + def encode(self, input, final=False): + """ + Encodes input and returns the resulting object. + """ + raise NotImplementedError + + def reset(self): + """ + Resets the encoder to the initial state. + """ + + def getstate(self): + """ + Return the current state of the encoder. + """ + return 0 + + def setstate(self, state): + """ + Set the current state of the encoder. state must have been + returned by getstate(). + """ + +class BufferedIncrementalEncoder(IncrementalEncoder): + """ + This subclass of IncrementalEncoder can be used as the baseclass for an + incremental encoder if the encoder must keep some of the output in a + buffer between calls to encode(). + """ + def __init__(self, errors='strict'): + IncrementalEncoder.__init__(self, errors) + # unencoded input that is kept between calls to encode() + self.buffer = "" + + def _buffer_encode(self, input, errors, final): + # Overwrite this method in subclasses: It must encode input + # and return an (output, length consumed) tuple + raise NotImplementedError + + def encode(self, input, final=False): + # encode input (taking the buffer into account) + data = self.buffer + input + (result, consumed) = self._buffer_encode(data, self.errors, final) + # keep unencoded input until the next call + self.buffer = data[consumed:] + return result + + def reset(self): + IncrementalEncoder.reset(self) + self.buffer = "" + + def getstate(self): + return self.buffer or 0 + + def setstate(self, state): + self.buffer = state or "" + +class IncrementalDecoder(object): + """ + An IncrementalDecoder decodes an input in multiple steps. The input can + be passed piece by piece to the decode() method. The IncrementalDecoder + remembers the state of the decoding process between calls to decode(). + """ + def __init__(self, errors='strict'): + """ + Create an IncrementalDecoder instance. + + The IncrementalDecoder may use different error handling schemes by + providing the errors keyword argument. See the module docstring + for a list of possible values. + """ + self.errors = errors + + def decode(self, input, final=False): + """ + Decode input and returns the resulting object. + """ + raise NotImplementedError + + def reset(self): + """ + Reset the decoder to the initial state. + """ + + def getstate(self): + """ + Return the current state of the decoder. + + This must be a (buffered_input, additional_state_info) tuple. + buffered_input must be a bytes object containing bytes that + were passed to decode() that have not yet been converted. + additional_state_info must be a non-negative integer + representing the state of the decoder WITHOUT yet having + processed the contents of buffered_input. In the initial state + and after reset(), getstate() must return (b"", 0). + """ + return (b"", 0) + + def setstate(self, state): + """ + Set the current state of the decoder. + + state must have been returned by getstate(). The effect of + setstate((b"", 0)) must be equivalent to reset(). + """ + +class BufferedIncrementalDecoder(IncrementalDecoder): + """ + This subclass of IncrementalDecoder can be used as the baseclass for an + incremental decoder if the decoder must be able to handle incomplete + byte sequences. + """ + def __init__(self, errors='strict'): + IncrementalDecoder.__init__(self, errors) + # undecoded input that is kept between calls to decode() + self.buffer = b"" + + def _buffer_decode(self, input, errors, final): + # Overwrite this method in subclasses: It must decode input + # and return an (output, length consumed) tuple + raise NotImplementedError + + def decode(self, input, final=False): + # decode input (taking the buffer into account) + data = self.buffer + input + (result, consumed) = self._buffer_decode(data, self.errors, final) + # keep undecoded input until the next call + self.buffer = data[consumed:] + return result + + def reset(self): + IncrementalDecoder.reset(self) + self.buffer = b"" + + def getstate(self): + # additional state info is always 0 + return (self.buffer, 0) + + def setstate(self, state): + # ignore additional state info + self.buffer = state[0] + +# +# The StreamWriter and StreamReader class provide generic working +# interfaces which can be used to implement new encoding submodules +# very easily. See encodings/utf_8.py for an example on how this is +# done. +# + +class StreamWriter(Codec): + + def __init__(self, stream, errors='strict'): + + """ Creates a StreamWriter instance. + + stream must be a file-like object open for writing. + + The StreamWriter may use different error handling + schemes by providing the errors keyword argument. These + parameters are predefined: + + 'strict' - raise a ValueError (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace'- replace with a suitable replacement character + 'xmlcharrefreplace' - Replace with the appropriate XML + character reference. + 'backslashreplace' - Replace with backslashed escape + sequences. + 'namereplace' - Replace with \\N{...} escape sequences. + + The set of allowed parameter values can be extended via + register_error. + """ + self.stream = stream + self.errors = errors + + def write(self, object): + + """ Writes the object's contents encoded to self.stream. + """ + data, consumed = self.encode(object, self.errors) + self.stream.write(data) + + def writelines(self, list): + + """ Writes the concatenated list of strings to the stream + using .write(). + """ + self.write(''.join(list)) + + def reset(self): + + """ Resets the codec buffers used for keeping internal state. + + Calling this method should ensure that the data on the + output is put into a clean state, that allows appending + of new fresh data without having to rescan the whole + stream to recover state. + + """ + pass + + def seek(self, offset, whence=0): + self.stream.seek(offset, whence) + if whence == 0 and offset == 0: + self.reset() + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### + +class StreamReader(Codec): + + charbuffertype = str + + def __init__(self, stream, errors='strict'): + + """ Creates a StreamReader instance. + + stream must be a file-like object open for reading. + + The StreamReader may use different error handling + schemes by providing the errors keyword argument. These + parameters are predefined: + + 'strict' - raise a ValueError (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace'- replace with a suitable replacement character + 'backslashreplace' - Replace with backslashed escape sequences; + + The set of allowed parameter values can be extended via + register_error. + """ + self.stream = stream + self.errors = errors + self.bytebuffer = b"" + self._empty_charbuffer = self.charbuffertype() + self.charbuffer = self._empty_charbuffer + self.linebuffer = None + + def decode(self, input, errors='strict'): + raise NotImplementedError + + def read(self, size=-1, chars=-1, firstline=False): + + """ Decodes data from the stream self.stream and returns the + resulting object. + + chars indicates the number of decoded code points or bytes to + return. read() will never return more data than requested, + but it might return less, if there is not enough available. + + size indicates the approximate maximum number of decoded + bytes or code points to read for decoding. The decoder + can modify this setting as appropriate. The default value + -1 indicates to read and decode as much as possible. size + is intended to prevent having to decode huge files in one + step. + + If firstline is true, and a UnicodeDecodeError happens + after the first line terminator in the input only the first line + will be returned, the rest of the input will be kept until the + next call to read(). + + The method should use a greedy read strategy, meaning that + it should read as much data as is allowed within the + definition of the encoding and the given size, e.g. if + optional encoding endings or state markers are available + on the stream, these should be read too. + """ + # If we have lines cached, first merge them back into characters + if self.linebuffer: + self.charbuffer = self._empty_charbuffer.join(self.linebuffer) + self.linebuffer = None + + if chars < 0: + # For compatibility with other read() methods that take a + # single argument + chars = size + + # read until we get the required number of characters (if available) + while True: + # can the request be satisfied from the character buffer? + if chars >= 0: + if len(self.charbuffer) >= chars: + break + # we need more data + if size < 0: + newdata = self.stream.read() + else: + newdata = self.stream.read(size) + # decode bytes (those remaining from the last call included) + data = self.bytebuffer + newdata + if not data: + break + try: + newchars, decodedbytes = self.decode(data, self.errors) + except UnicodeDecodeError as exc: + if firstline: + newchars, decodedbytes = \ + self.decode(data[:exc.start], self.errors) + lines = newchars.splitlines(keepends=True) + if len(lines)<=1: + raise + else: + raise + # keep undecoded bytes until the next call + self.bytebuffer = data[decodedbytes:] + # put new characters in the character buffer + self.charbuffer += newchars + # there was no data available + if not newdata: + break + if chars < 0: + # Return everything we've got + result = self.charbuffer + self.charbuffer = self._empty_charbuffer + else: + # Return the first chars characters + result = self.charbuffer[:chars] + self.charbuffer = self.charbuffer[chars:] + return result + + def readline(self, size=None, keepends=True): + + """ Read one line from the input stream and return the + decoded data. + + size, if given, is passed as size argument to the + read() method. + + """ + # If we have lines cached from an earlier read, return + # them unconditionally + if self.linebuffer: + line = self.linebuffer[0] + del self.linebuffer[0] + if len(self.linebuffer) == 1: + # revert to charbuffer mode; we might need more data + # next time + self.charbuffer = self.linebuffer[0] + self.linebuffer = None + if not keepends: + line = line.splitlines(keepends=False)[0] + return line + + readsize = size or 72 + line = self._empty_charbuffer + # If size is given, we call read() only once + while True: + data = self.read(readsize, firstline=True) + if data: + # If we're at a "\r" read one extra character (which might + # be a "\n") to get a proper line ending. If the stream is + # temporarily exhausted we return the wrong line ending. + if (isinstance(data, str) and data.endswith("\r")) or \ + (isinstance(data, bytes) and data.endswith(b"\r")): + data += self.read(size=1, chars=1) + + line += data + lines = line.splitlines(keepends=True) + if lines: + if len(lines) > 1: + # More than one line result; the first line is a full line + # to return + line = lines[0] + del lines[0] + if len(lines) > 1: + # cache the remaining lines + lines[-1] += self.charbuffer + self.linebuffer = lines + self.charbuffer = None + else: + # only one remaining line, put it back into charbuffer + self.charbuffer = lines[0] + self.charbuffer + if not keepends: + line = line.splitlines(keepends=False)[0] + break + line0withend = lines[0] + line0withoutend = lines[0].splitlines(keepends=False)[0] + if line0withend != line0withoutend: # We really have a line end + # Put the rest back together and keep it until the next call + self.charbuffer = self._empty_charbuffer.join(lines[1:]) + \ + self.charbuffer + if keepends: + line = line0withend + else: + line = line0withoutend + break + # we didn't get anything or this was our only try + if not data or size is not None: + if line and not keepends: + line = line.splitlines(keepends=False)[0] + break + if readsize < 8000: + readsize *= 2 + return line + + def readlines(self, sizehint=None, keepends=True): + + """ Read all lines available on the input stream + and return them as a list. + + Line breaks are implemented using the codec's decoder + method and are included in the list entries. + + sizehint, if given, is ignored since there is no efficient + way to finding the true end-of-line. + + """ + data = self.read() + return data.splitlines(keepends) + + def reset(self): + + """ Resets the codec buffers used for keeping internal state. + + Note that no stream repositioning should take place. + This method is primarily intended to be able to recover + from decoding errors. + + """ + self.bytebuffer = b"" + self.charbuffer = self._empty_charbuffer + self.linebuffer = None + + def seek(self, offset, whence=0): + """ Set the input stream's current position. + + Resets the codec buffers used for keeping state. + """ + self.stream.seek(offset, whence) + self.reset() + + def __next__(self): + + """ Return the next decoded line from the input stream.""" + line = self.readline() + if line: + return line + raise StopIteration + + def __iter__(self): + return self + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### + +class StreamReaderWriter: + + """ StreamReaderWriter instances allow wrapping streams which + work in both read and write modes. + + The design is such that one can use the factory functions + returned by the codec.lookup() function to construct the + instance. + + """ + # Optional attributes set by the file wrappers below + encoding = 'unknown' + + def __init__(self, stream, Reader, Writer, errors='strict'): + + """ Creates a StreamReaderWriter instance. + + stream must be a Stream-like object. + + Reader, Writer must be factory functions or classes + providing the StreamReader, StreamWriter interface resp. + + Error handling is done in the same way as defined for the + StreamWriter/Readers. + + """ + self.stream = stream + self.reader = Reader(stream, errors) + self.writer = Writer(stream, errors) + self.errors = errors + + def read(self, size=-1): + + return self.reader.read(size) + + def readline(self, size=None): + + return self.reader.readline(size) + + def readlines(self, sizehint=None): + + return self.reader.readlines(sizehint) + + def __next__(self): + + """ Return the next decoded line from the input stream.""" + return next(self.reader) + + def __iter__(self): + return self + + def write(self, data): + + return self.writer.write(data) + + def writelines(self, list): + + return self.writer.writelines(list) + + def reset(self): + + self.reader.reset() + self.writer.reset() + + def seek(self, offset, whence=0): + self.stream.seek(offset, whence) + self.reader.reset() + if whence == 0 and offset == 0: + self.writer.reset() + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + # these are needed to make "with StreamReaderWriter(...)" work properly + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### + +class StreamRecoder: + + """ StreamRecoder instances translate data from one encoding to another. + + They use the complete set of APIs returned by the + codecs.lookup() function to implement their task. + + Data written to the StreamRecoder is first decoded into an + intermediate format (depending on the "decode" codec) and then + written to the underlying stream using an instance of the provided + Writer class. + + In the other direction, data is read from the underlying stream using + a Reader instance and then encoded and returned to the caller. + + """ + # Optional attributes set by the file wrappers below + data_encoding = 'unknown' + file_encoding = 'unknown' + + def __init__(self, stream, encode, decode, Reader, Writer, + errors='strict'): + + """ Creates a StreamRecoder instance which implements a two-way + conversion: encode and decode work on the frontend (the + data visible to .read() and .write()) while Reader and Writer + work on the backend (the data in stream). + + You can use these objects to do transparent + transcodings from e.g. latin-1 to utf-8 and back. + + stream must be a file-like object. + + encode and decode must adhere to the Codec interface; Reader and + Writer must be factory functions or classes providing the + StreamReader and StreamWriter interfaces resp. + + Error handling is done in the same way as defined for the + StreamWriter/Readers. + + """ + self.stream = stream + self.encode = encode + self.decode = decode + self.reader = Reader(stream, errors) + self.writer = Writer(stream, errors) + self.errors = errors + + def read(self, size=-1): + + data = self.reader.read(size) + data, bytesencoded = self.encode(data, self.errors) + return data + + def readline(self, size=None): + + if size is None: + data = self.reader.readline() + else: + data = self.reader.readline(size) + data, bytesencoded = self.encode(data, self.errors) + return data + + def readlines(self, sizehint=None): + + data = self.reader.read() + data, bytesencoded = self.encode(data, self.errors) + return data.splitlines(keepends=True) + + def __next__(self): + + """ Return the next decoded line from the input stream.""" + data = next(self.reader) + data, bytesencoded = self.encode(data, self.errors) + return data + + def __iter__(self): + return self + + def write(self, data): + + data, bytesdecoded = self.decode(data, self.errors) + return self.writer.write(data) + + def writelines(self, list): + + data = b''.join(list) + data, bytesdecoded = self.decode(data, self.errors) + return self.writer.write(data) + + def reset(self): + + self.reader.reset() + self.writer.reset() + + def seek(self, offset, whence=0): + # Seeks must be propagated to both the readers and writers + # as they might need to reset their internal buffers. + self.reader.seek(offset, whence) + self.writer.seek(offset, whence) + + def __getattr__(self, name, + getattr=getattr): + + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + + def __reduce_ex__(self, proto): + raise TypeError("can't serialize %s" % self.__class__.__name__) + +### Shortcuts + +def open(filename, mode='r', encoding=None, errors='strict', buffering=-1): + + """ Open an encoded file using the given mode and return + a wrapped version providing transparent encoding/decoding. + + Note: The wrapped version will only accept the object format + defined by the codecs, i.e. Unicode objects for most builtin + codecs. Output is also codec dependent and will usually be + Unicode as well. + + If encoding is not None, then the + underlying encoded files are always opened in binary mode. + The default file mode is 'r', meaning to open the file in read mode. + + encoding specifies the encoding which is to be used for the + file. + + errors may be given to define the error handling. It defaults + to 'strict' which causes ValueErrors to be raised in case an + encoding error occurs. + + buffering has the same meaning as for the builtin open() API. + It defaults to -1 which means that the default buffer size will + be used. + + The returned wrapped file object provides an extra attribute + .encoding which allows querying the used encoding. This + attribute is only available if an encoding was specified as + parameter. + + """ + if encoding is not None and \ + 'b' not in mode: + # Force opening of the file in binary mode + mode = mode + 'b' + file = builtins.open(filename, mode, buffering) + if encoding is None: + return file + + try: + info = lookup(encoding) + srw = StreamReaderWriter(file, info.streamreader, info.streamwriter, errors) + # Add attributes to simplify introspection + srw.encoding = encoding + return srw + except: + file.close() + raise + +def EncodedFile(file, data_encoding, file_encoding=None, errors='strict'): + + """ Return a wrapped version of file which provides transparent + encoding translation. + + Data written to the wrapped file is decoded according + to the given data_encoding and then encoded to the underlying + file using file_encoding. The intermediate data type + will usually be Unicode but depends on the specified codecs. + + Bytes read from the file are decoded using file_encoding and then + passed back to the caller encoded using data_encoding. + + If file_encoding is not given, it defaults to data_encoding. + + errors may be given to define the error handling. It defaults + to 'strict' which causes ValueErrors to be raised in case an + encoding error occurs. + + The returned wrapped file object provides two extra attributes + .data_encoding and .file_encoding which reflect the given + parameters of the same name. The attributes can be used for + introspection by Python programs. + + """ + if file_encoding is None: + file_encoding = data_encoding + data_info = lookup(data_encoding) + file_info = lookup(file_encoding) + sr = StreamRecoder(file, data_info.encode, data_info.decode, + file_info.streamreader, file_info.streamwriter, errors) + # Add attributes to simplify introspection + sr.data_encoding = data_encoding + sr.file_encoding = file_encoding + return sr + +### Helpers for codec lookup + +def getencoder(encoding): + + """ Lookup up the codec for the given encoding and return + its encoder function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).encode + +def getdecoder(encoding): + + """ Lookup up the codec for the given encoding and return + its decoder function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).decode + +def getincrementalencoder(encoding): + + """ Lookup up the codec for the given encoding and return + its IncrementalEncoder class or factory function. + + Raises a LookupError in case the encoding cannot be found + or the codecs doesn't provide an incremental encoder. + + """ + encoder = lookup(encoding).incrementalencoder + if encoder is None: + raise LookupError(encoding) + return encoder + +def getincrementaldecoder(encoding): + + """ Lookup up the codec for the given encoding and return + its IncrementalDecoder class or factory function. + + Raises a LookupError in case the encoding cannot be found + or the codecs doesn't provide an incremental decoder. + + """ + decoder = lookup(encoding).incrementaldecoder + if decoder is None: + raise LookupError(encoding) + return decoder + +def getreader(encoding): + + """ Lookup up the codec for the given encoding and return + its StreamReader class or factory function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).streamreader + +def getwriter(encoding): + + """ Lookup up the codec for the given encoding and return + its StreamWriter class or factory function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).streamwriter + +def iterencode(iterator, encoding, errors='strict', **kwargs): + """ + Encoding iterator. + + Encodes the input strings from the iterator using an IncrementalEncoder. + + errors and kwargs are passed through to the IncrementalEncoder + constructor. + """ + encoder = getincrementalencoder(encoding)(errors, **kwargs) + for input in iterator: + output = encoder.encode(input) + if output: + yield output + output = encoder.encode("", True) + if output: + yield output + +def iterdecode(iterator, encoding, errors='strict', **kwargs): + """ + Decoding iterator. + + Decodes the input strings from the iterator using an IncrementalDecoder. + + errors and kwargs are passed through to the IncrementalDecoder + constructor. + """ + decoder = getincrementaldecoder(encoding)(errors, **kwargs) + for input in iterator: + output = decoder.decode(input) + if output: + yield output + output = decoder.decode(b"", True) + if output: + yield output + +### Helpers for charmap-based codecs + +def make_identity_dict(rng): + + """ make_identity_dict(rng) -> dict + + Return a dictionary where elements of the rng sequence are + mapped to themselves. + + """ + return {i:i for i in rng} + +def make_encoding_map(decoding_map): + + """ Creates an encoding map from a decoding map. + + If a target mapping in the decoding map occurs multiple + times, then that target is mapped to None (undefined mapping), + causing an exception when encountered by the charmap codec + during translation. + + One example where this happens is cp875.py which decodes + multiple character to \\u001a. + + """ + m = {} + for k,v in decoding_map.items(): + if not v in m: + m[v] = k + else: + m[v] = None + return m + +### error handlers + +try: + strict_errors = lookup_error("strict") + ignore_errors = lookup_error("ignore") + replace_errors = lookup_error("replace") + xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace") + backslashreplace_errors = lookup_error("backslashreplace") + namereplace_errors = lookup_error("namereplace") +except LookupError: + # In --disable-unicode builds, these error handler are missing + strict_errors = None + ignore_errors = None + replace_errors = None + xmlcharrefreplace_errors = None + backslashreplace_errors = None + namereplace_errors = None + +# Tell modulefinder that using codecs probably needs the encodings +# package +_false = 0 +if _false: + import encodings diff --git a/squashfs-root/usr/lib/python3.12/codeop.py b/squashfs-root/usr/lib/python3.12/codeop.py new file mode 100644 index 0000000..4dd0965 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/codeop.py @@ -0,0 +1,161 @@ +r"""Utilities to compile possibly incomplete Python source code. + +This module provides two interfaces, broadly similar to the builtin +function compile(), which take program text, a filename and a 'mode' +and: + +- Return code object if the command is complete and valid +- Return None if the command is incomplete +- Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + +The two interfaces are: + +compile_command(source, filename, symbol): + + Compiles a single command in the manner described above. + +CommandCompiler(): + + Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force. + +The module also provides another class: + +Compile(): + + Instances of this class act like the built-in function compile, + but with 'memory' in the sense described above. +""" + +import __future__ +import warnings + +_features = [getattr(__future__, fname) + for fname in __future__.all_feature_names] + +__all__ = ["compile_command", "Compile", "CommandCompiler"] + +# The following flags match the values from Include/cpython/compile.h +# Caveat emptor: These flags are undocumented on purpose and depending +# on their effect outside the standard library is **unsupported**. +PyCF_DONT_IMPLY_DEDENT = 0x200 +PyCF_ALLOW_INCOMPLETE_INPUT = 0x4000 + +def _maybe_compile(compiler, source, filename, symbol): + # Check for source consisting of only blank lines and comments. + for line in source.split("\n"): + line = line.strip() + if line and line[0] != '#': + break # Leave it alone. + else: + if symbol != "eval": + source = "pass" # Replace it with a 'pass' statement + + # Disable compiler warnings when checking for incomplete input. + with warnings.catch_warnings(): + warnings.simplefilter("ignore", (SyntaxWarning, DeprecationWarning)) + try: + compiler(source, filename, symbol) + except SyntaxError: # Let other compile() errors propagate. + try: + compiler(source + "\n", filename, symbol) + return None + except SyntaxError as e: + if "incomplete input" in str(e): + return None + # fallthrough + + return compiler(source, filename, symbol, incomplete_input=False) + +def _is_syntax_error(err1, err2): + rep1 = repr(err1) + rep2 = repr(err2) + if "was never closed" in rep1 and "was never closed" in rep2: + return False + if rep1 == rep2: + return True + return False + +def _compile(source, filename, symbol, incomplete_input=True): + flags = 0 + if incomplete_input: + flags |= PyCF_ALLOW_INCOMPLETE_INPUT + flags |= PyCF_DONT_IMPLY_DEDENT + return compile(source, filename, symbol, flags) + + +def compile_command(source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; default + "" + symbol -- optional grammar start symbol; "single" (default), "exec" + or "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(_compile, source, filename, symbol) + +class Compile: + """Instances of this class behave much like the built-in compile + function, but if one is used to compile text containing a future + statement, it "remembers" and compiles all subsequent program texts + with the statement in force.""" + def __init__(self): + self.flags = PyCF_DONT_IMPLY_DEDENT | PyCF_ALLOW_INCOMPLETE_INPUT + + def __call__(self, source, filename, symbol, **kwargs): + flags = self.flags + if kwargs.get('incomplete_input', True) is False: + flags &= ~PyCF_DONT_IMPLY_DEDENT + flags &= ~PyCF_ALLOW_INCOMPLETE_INPUT + codeob = compile(source, filename, symbol, flags, True) + for feature in _features: + if codeob.co_flags & feature.compiler_flag: + self.flags |= feature.compiler_flag + return codeob + +class CommandCompiler: + """Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force.""" + + def __init__(self,): + self.compiler = Compile() + + def __call__(self, source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; + default "" + symbol -- optional grammar start symbol; "single" (default) or + "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(self.compiler, source, filename, symbol) diff --git a/squashfs-root/usr/lib/python3.12/collections/__init__.py b/squashfs-root/usr/lib/python3.12/collections/__init__.py new file mode 100644 index 0000000..5f000b5 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/collections/__init__.py @@ -0,0 +1,1592 @@ +'''This module implements specialized container datatypes providing +alternatives to Python's general purpose built-in containers, dict, +list, set, and tuple. + +* namedtuple factory function for creating tuple subclasses with named fields +* deque list-like container with fast appends and pops on either end +* ChainMap dict-like class for creating a single view of multiple mappings +* Counter dict subclass for counting hashable objects +* OrderedDict dict subclass that remembers the order entries were added +* defaultdict dict subclass that calls a factory function to supply missing values +* UserDict wrapper around dictionary objects for easier dict subclassing +* UserList wrapper around list objects for easier list subclassing +* UserString wrapper around string objects for easier string subclassing + +''' + +__all__ = [ + 'ChainMap', + 'Counter', + 'OrderedDict', + 'UserDict', + 'UserList', + 'UserString', + 'defaultdict', + 'deque', + 'namedtuple', +] + +import _collections_abc +import sys as _sys + +from itertools import chain as _chain +from itertools import repeat as _repeat +from itertools import starmap as _starmap +from keyword import iskeyword as _iskeyword +from operator import eq as _eq +from operator import itemgetter as _itemgetter +from reprlib import recursive_repr as _recursive_repr +from _weakref import proxy as _proxy + +try: + from _collections import deque +except ImportError: + pass +else: + _collections_abc.MutableSequence.register(deque) + +try: + from _collections import _deque_iterator +except ImportError: + pass + +try: + from _collections import defaultdict +except ImportError: + pass + + +################################################################################ +### OrderedDict +################################################################################ + +class _OrderedDictKeysView(_collections_abc.KeysView): + + def __reversed__(self): + yield from reversed(self._mapping) + +class _OrderedDictItemsView(_collections_abc.ItemsView): + + def __reversed__(self): + for key in reversed(self._mapping): + yield (key, self._mapping[key]) + +class _OrderedDictValuesView(_collections_abc.ValuesView): + + def __reversed__(self): + for key in reversed(self._mapping): + yield self._mapping[key] + +class _Link(object): + __slots__ = 'prev', 'next', 'key', '__weakref__' + +class OrderedDict(dict): + 'Dictionary that remembers insertion order' + # An inherited dict maps keys to values. + # The inherited dict provides __getitem__, __len__, __contains__, and get. + # The remaining methods are order-aware. + # Big-O running times for all methods are the same as regular dictionaries. + + # The internal self.__map dict maps keys to links in a doubly linked list. + # The circular doubly linked list starts and ends with a sentinel element. + # The sentinel element never gets deleted (this simplifies the algorithm). + # The sentinel is in self.__hardroot with a weakref proxy in self.__root. + # The prev links are weakref proxies (to prevent circular references). + # Individual links are kept alive by the hard reference in self.__map. + # Those hard references disappear when a key is deleted from an OrderedDict. + + def __new__(cls, /, *args, **kwds): + "Create the ordered dict object and set up the underlying structures." + self = dict.__new__(cls) + self.__hardroot = _Link() + self.__root = root = _proxy(self.__hardroot) + root.prev = root.next = root + self.__map = {} + return self + + def __init__(self, other=(), /, **kwds): + '''Initialize an ordered dictionary. The signature is the same as + regular dictionaries. Keyword argument order is preserved. + ''' + self.__update(other, **kwds) + + def __setitem__(self, key, value, + dict_setitem=dict.__setitem__, proxy=_proxy, Link=_Link): + 'od.__setitem__(i, y) <==> od[i]=y' + # Setting a new item creates a new link at the end of the linked list, + # and the inherited dictionary is updated with the new key/value pair. + if key not in self: + self.__map[key] = link = Link() + root = self.__root + last = root.prev + link.prev, link.next, link.key = last, root, key + last.next = link + root.prev = proxy(link) + dict_setitem(self, key, value) + + def __delitem__(self, key, dict_delitem=dict.__delitem__): + 'od.__delitem__(y) <==> del od[y]' + # Deleting an existing item uses self.__map to find the link which gets + # removed by updating the links in the predecessor and successor nodes. + dict_delitem(self, key) + link = self.__map.pop(key) + link_prev = link.prev + link_next = link.next + link_prev.next = link_next + link_next.prev = link_prev + link.prev = None + link.next = None + + def __iter__(self): + 'od.__iter__() <==> iter(od)' + # Traverse the linked list in order. + root = self.__root + curr = root.next + while curr is not root: + yield curr.key + curr = curr.next + + def __reversed__(self): + 'od.__reversed__() <==> reversed(od)' + # Traverse the linked list in reverse order. + root = self.__root + curr = root.prev + while curr is not root: + yield curr.key + curr = curr.prev + + def clear(self): + 'od.clear() -> None. Remove all items from od.' + root = self.__root + root.prev = root.next = root + self.__map.clear() + dict.clear(self) + + def popitem(self, last=True): + '''Remove and return a (key, value) pair from the dictionary. + + Pairs are returned in LIFO order if last is true or FIFO order if false. + ''' + if not self: + raise KeyError('dictionary is empty') + root = self.__root + if last: + link = root.prev + link_prev = link.prev + link_prev.next = root + root.prev = link_prev + else: + link = root.next + link_next = link.next + root.next = link_next + link_next.prev = root + key = link.key + del self.__map[key] + value = dict.pop(self, key) + return key, value + + def move_to_end(self, key, last=True): + '''Move an existing element to the end (or beginning if last is false). + + Raise KeyError if the element does not exist. + ''' + link = self.__map[key] + link_prev = link.prev + link_next = link.next + soft_link = link_next.prev + link_prev.next = link_next + link_next.prev = link_prev + root = self.__root + if last: + last = root.prev + link.prev = last + link.next = root + root.prev = soft_link + last.next = link + else: + first = root.next + link.prev = root + link.next = first + first.prev = soft_link + root.next = link + + def __sizeof__(self): + sizeof = _sys.getsizeof + n = len(self) + 1 # number of links including root + size = sizeof(self.__dict__) # instance dictionary + size += sizeof(self.__map) * 2 # internal dict and inherited dict + size += sizeof(self.__hardroot) * n # link objects + size += sizeof(self.__root) * n # proxy objects + return size + + update = __update = _collections_abc.MutableMapping.update + + def keys(self): + "D.keys() -> a set-like object providing a view on D's keys" + return _OrderedDictKeysView(self) + + def items(self): + "D.items() -> a set-like object providing a view on D's items" + return _OrderedDictItemsView(self) + + def values(self): + "D.values() -> an object providing a view on D's values" + return _OrderedDictValuesView(self) + + __ne__ = _collections_abc.MutableMapping.__ne__ + + __marker = object() + + def pop(self, key, default=__marker): + '''od.pop(k[,d]) -> v, remove specified key and return the corresponding + value. If key is not found, d is returned if given, otherwise KeyError + is raised. + + ''' + marker = self.__marker + result = dict.pop(self, key, marker) + if result is not marker: + # The same as in __delitem__(). + link = self.__map.pop(key) + link_prev = link.prev + link_next = link.next + link_prev.next = link_next + link_next.prev = link_prev + link.prev = None + link.next = None + return result + if default is marker: + raise KeyError(key) + return default + + def setdefault(self, key, default=None): + '''Insert key with a value of default if key is not in the dictionary. + + Return the value for key if key is in the dictionary, else default. + ''' + if key in self: + return self[key] + self[key] = default + return default + + @_recursive_repr() + def __repr__(self): + 'od.__repr__() <==> repr(od)' + if not self: + return '%s()' % (self.__class__.__name__,) + return '%s(%r)' % (self.__class__.__name__, dict(self.items())) + + def __reduce__(self): + 'Return state information for pickling' + state = self.__getstate__() + if state: + if isinstance(state, tuple): + state, slots = state + else: + slots = {} + state = state.copy() + slots = slots.copy() + for k in vars(OrderedDict()): + state.pop(k, None) + slots.pop(k, None) + if slots: + state = state, slots + else: + state = state or None + return self.__class__, (), state, None, iter(self.items()) + + def copy(self): + 'od.copy() -> a shallow copy of od' + return self.__class__(self) + + @classmethod + def fromkeys(cls, iterable, value=None): + '''Create a new ordered dictionary with keys from iterable and values set to value. + ''' + self = cls() + for key in iterable: + self[key] = value + return self + + def __eq__(self, other): + '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive + while comparison to a regular mapping is order-insensitive. + + ''' + if isinstance(other, OrderedDict): + return dict.__eq__(self, other) and all(map(_eq, self, other)) + return dict.__eq__(self, other) + + def __ior__(self, other): + self.update(other) + return self + + def __or__(self, other): + if not isinstance(other, dict): + return NotImplemented + new = self.__class__(self) + new.update(other) + return new + + def __ror__(self, other): + if not isinstance(other, dict): + return NotImplemented + new = self.__class__(other) + new.update(self) + return new + + +try: + from _collections import OrderedDict +except ImportError: + # Leave the pure Python version in place. + pass + + +################################################################################ +### namedtuple +################################################################################ + +try: + from _collections import _tuplegetter +except ImportError: + _tuplegetter = lambda index, doc: property(_itemgetter(index), doc=doc) + +def namedtuple(typename, field_names, *, rename=False, defaults=None, module=None): + """Returns a new subclass of tuple with named fields. + + >>> Point = namedtuple('Point', ['x', 'y']) + >>> Point.__doc__ # docstring for the new class + 'Point(x, y)' + >>> p = Point(11, y=22) # instantiate with positional args or keywords + >>> p[0] + p[1] # indexable like a plain tuple + 33 + >>> x, y = p # unpack like a regular tuple + >>> x, y + (11, 22) + >>> p.x + p.y # fields also accessible by name + 33 + >>> d = p._asdict() # convert to a dictionary + >>> d['x'] + 11 + >>> Point(**d) # convert from a dictionary + Point(x=11, y=22) + >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields + Point(x=100, y=22) + + """ + + # Validate the field names. At the user's option, either generate an error + # message or automatically replace the field name with a valid name. + if isinstance(field_names, str): + field_names = field_names.replace(',', ' ').split() + field_names = list(map(str, field_names)) + typename = _sys.intern(str(typename)) + + if rename: + seen = set() + for index, name in enumerate(field_names): + if (not name.isidentifier() + or _iskeyword(name) + or name.startswith('_') + or name in seen): + field_names[index] = f'_{index}' + seen.add(name) + + for name in [typename] + field_names: + if type(name) is not str: + raise TypeError('Type names and field names must be strings') + if not name.isidentifier(): + raise ValueError('Type names and field names must be valid ' + f'identifiers: {name!r}') + if _iskeyword(name): + raise ValueError('Type names and field names cannot be a ' + f'keyword: {name!r}') + + seen = set() + for name in field_names: + if name.startswith('_') and not rename: + raise ValueError('Field names cannot start with an underscore: ' + f'{name!r}') + if name in seen: + raise ValueError(f'Encountered duplicate field name: {name!r}') + seen.add(name) + + field_defaults = {} + if defaults is not None: + defaults = tuple(defaults) + if len(defaults) > len(field_names): + raise TypeError('Got more default values than field names') + field_defaults = dict(reversed(list(zip(reversed(field_names), + reversed(defaults))))) + + # Variables used in the methods and docstrings + field_names = tuple(map(_sys.intern, field_names)) + num_fields = len(field_names) + arg_list = ', '.join(field_names) + if num_fields == 1: + arg_list += ',' + repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' + tuple_new = tuple.__new__ + _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip + + # Create all the named tuple methods to be added to the class namespace + + namespace = { + '_tuple_new': tuple_new, + '__builtins__': {}, + '__name__': f'namedtuple_{typename}', + } + code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' + __new__ = eval(code, namespace) + __new__.__name__ = '__new__' + __new__.__doc__ = f'Create new instance of {typename}({arg_list})' + if defaults is not None: + __new__.__defaults__ = defaults + + @classmethod + def _make(cls, iterable): + result = tuple_new(cls, iterable) + if _len(result) != num_fields: + raise TypeError(f'Expected {num_fields} arguments, got {len(result)}') + return result + + _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' + 'or iterable') + + def _replace(self, /, **kwds): + result = self._make(_map(kwds.pop, field_names, self)) + if kwds: + raise ValueError(f'Got unexpected field names: {list(kwds)!r}') + return result + + _replace.__doc__ = (f'Return a new {typename} object replacing specified ' + 'fields with new values') + + def __repr__(self): + 'Return a nicely formatted representation string' + return self.__class__.__name__ + repr_fmt % self + + def _asdict(self): + 'Return a new dict which maps field names to their values.' + return _dict(_zip(self._fields, self)) + + def __getnewargs__(self): + 'Return self as a plain tuple. Used by copy and pickle.' + return _tuple(self) + + # Modify function metadata to help with introspection and debugging + for method in ( + __new__, + _make.__func__, + _replace, + __repr__, + _asdict, + __getnewargs__, + ): + method.__qualname__ = f'{typename}.{method.__name__}' + + # Build-up the class namespace dictionary + # and use type() to build the result class + class_namespace = { + '__doc__': f'{typename}({arg_list})', + '__slots__': (), + '_fields': field_names, + '_field_defaults': field_defaults, + '__new__': __new__, + '_make': _make, + '_replace': _replace, + '__repr__': __repr__, + '_asdict': _asdict, + '__getnewargs__': __getnewargs__, + '__match_args__': field_names, + } + for index, name in enumerate(field_names): + doc = _sys.intern(f'Alias for field number {index}') + class_namespace[name] = _tuplegetter(index, doc) + + result = type(typename, (tuple,), class_namespace) + + # For pickling to work, the __module__ variable needs to be set to the frame + # where the named tuple is created. Bypass this step in environments where + # sys._getframe is not defined (Jython for example) or sys._getframe is not + # defined for arguments greater than 0 (IronPython), or where the user has + # specified a particular module. + if module is None: + try: + module = _sys._getframemodulename(1) or '__main__' + except AttributeError: + try: + module = _sys._getframe(1).f_globals.get('__name__', '__main__') + except (AttributeError, ValueError): + pass + if module is not None: + result.__module__ = module + + return result + + +######################################################################## +### Counter +######################################################################## + +def _count_elements(mapping, iterable): + 'Tally elements from the iterable.' + mapping_get = mapping.get + for elem in iterable: + mapping[elem] = mapping_get(elem, 0) + 1 + +try: # Load C helper function if available + from _collections import _count_elements +except ImportError: + pass + +class Counter(dict): + '''Dict subclass for counting hashable items. Sometimes called a bag + or multiset. Elements are stored as dictionary keys and their counts + are stored as dictionary values. + + >>> c = Counter('abcdeabcdabcaba') # count elements from a string + + >>> c.most_common(3) # three most common elements + [('a', 5), ('b', 4), ('c', 3)] + >>> sorted(c) # list all unique elements + ['a', 'b', 'c', 'd', 'e'] + >>> ''.join(sorted(c.elements())) # list elements with repetitions + 'aaaaabbbbcccdde' + >>> sum(c.values()) # total of all counts + 15 + + >>> c['a'] # count of letter 'a' + 5 + >>> for elem in 'shazam': # update counts from an iterable + ... c[elem] += 1 # by adding 1 to each element's count + >>> c['a'] # now there are seven 'a' + 7 + >>> del c['b'] # remove all 'b' + >>> c['b'] # now there are zero 'b' + 0 + + >>> d = Counter('simsalabim') # make another counter + >>> c.update(d) # add in the second counter + >>> c['a'] # now there are nine 'a' + 9 + + >>> c.clear() # empty the counter + >>> c + Counter() + + Note: If a count is set to zero or reduced to zero, it will remain + in the counter until the entry is deleted or the counter is cleared: + + >>> c = Counter('aaabbc') + >>> c['b'] -= 2 # reduce the count of 'b' by two + >>> c.most_common() # 'b' is still in, but its count is zero + [('a', 3), ('c', 1), ('b', 0)] + + ''' + # References: + # http://en.wikipedia.org/wiki/Multiset + # http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html + # http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm + # http://code.activestate.com/recipes/259174/ + # Knuth, TAOCP Vol. II section 4.6.3 + + def __init__(self, iterable=None, /, **kwds): + '''Create a new, empty Counter object. And if given, count elements + from an input iterable. Or, initialize the count from another mapping + of elements to their counts. + + >>> c = Counter() # a new, empty counter + >>> c = Counter('gallahad') # a new counter from an iterable + >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping + >>> c = Counter(a=4, b=2) # a new counter from keyword args + + ''' + super().__init__() + self.update(iterable, **kwds) + + def __missing__(self, key): + 'The count of elements not in the Counter is zero.' + # Needed so that self[missing_item] does not raise KeyError + return 0 + + def total(self): + 'Sum of the counts' + return sum(self.values()) + + def most_common(self, n=None): + '''List the n most common elements and their counts from the most + common to the least. If n is None, then list all element counts. + + >>> Counter('abracadabra').most_common(3) + [('a', 5), ('b', 2), ('r', 2)] + + ''' + # Emulate Bag.sortedByCount from Smalltalk + if n is None: + return sorted(self.items(), key=_itemgetter(1), reverse=True) + + # Lazy import to speedup Python startup time + import heapq + return heapq.nlargest(n, self.items(), key=_itemgetter(1)) + + def elements(self): + '''Iterator over elements repeating each as many times as its count. + + >>> c = Counter('ABCABC') + >>> sorted(c.elements()) + ['A', 'A', 'B', 'B', 'C', 'C'] + + Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 + + >>> import math + >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) + >>> math.prod(prime_factors.elements()) + 1836 + + Note, if an element's count has been set to zero or is a negative + number, elements() will ignore it. + + ''' + # Emulate Bag.do from Smalltalk and Multiset.begin from C++. + return _chain.from_iterable(_starmap(_repeat, self.items())) + + # Override dict methods where necessary + + @classmethod + def fromkeys(cls, iterable, v=None): + # There is no equivalent method for counters because the semantics + # would be ambiguous in cases such as Counter.fromkeys('aaabbc', v=2). + # Initializing counters to zero values isn't necessary because zero + # is already the default value for counter lookups. Initializing + # to one is easily accomplished with Counter(set(iterable)). For + # more exotic cases, create a dictionary first using a dictionary + # comprehension or dict.fromkeys(). + raise NotImplementedError( + 'Counter.fromkeys() is undefined. Use Counter(iterable) instead.') + + def update(self, iterable=None, /, **kwds): + '''Like dict.update() but add counts instead of replacing them. + + Source can be an iterable, a dictionary, or another Counter instance. + + >>> c = Counter('which') + >>> c.update('witch') # add elements from another iterable + >>> d = Counter('watch') + >>> c.update(d) # add elements from another counter + >>> c['h'] # four 'h' in which, witch, and watch + 4 + + ''' + # The regular dict.update() operation makes no sense here because the + # replace behavior results in some of the original untouched counts + # being mixed-in with all of the other counts for a mismash that + # doesn't have a straight-forward interpretation in most counting + # contexts. Instead, we implement straight-addition. Both the inputs + # and outputs are allowed to contain zero and negative counts. + + if iterable is not None: + if isinstance(iterable, _collections_abc.Mapping): + if self: + self_get = self.get + for elem, count in iterable.items(): + self[elem] = count + self_get(elem, 0) + else: + # fast path when counter is empty + super().update(iterable) + else: + _count_elements(self, iterable) + if kwds: + self.update(kwds) + + def subtract(self, iterable=None, /, **kwds): + '''Like dict.update() but subtracts counts instead of replacing them. + Counts can be reduced below zero. Both the inputs and outputs are + allowed to contain zero and negative counts. + + Source can be an iterable, a dictionary, or another Counter instance. + + >>> c = Counter('which') + >>> c.subtract('witch') # subtract elements from another iterable + >>> c.subtract(Counter('watch')) # subtract elements from another counter + >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch + 0 + >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch + -1 + + ''' + if iterable is not None: + self_get = self.get + if isinstance(iterable, _collections_abc.Mapping): + for elem, count in iterable.items(): + self[elem] = self_get(elem, 0) - count + else: + for elem in iterable: + self[elem] = self_get(elem, 0) - 1 + if kwds: + self.subtract(kwds) + + def copy(self): + 'Return a shallow copy.' + return self.__class__(self) + + def __reduce__(self): + return self.__class__, (dict(self),) + + def __delitem__(self, elem): + 'Like dict.__delitem__() but does not raise KeyError for missing values.' + if elem in self: + super().__delitem__(elem) + + def __repr__(self): + if not self: + return f'{self.__class__.__name__}()' + try: + # dict() preserves the ordering returned by most_common() + d = dict(self.most_common()) + except TypeError: + # handle case where values are not orderable + d = dict(self) + return f'{self.__class__.__name__}({d!r})' + + # Multiset-style mathematical operations discussed in: + # Knuth TAOCP Volume II section 4.6.3 exercise 19 + # and at http://en.wikipedia.org/wiki/Multiset + # + # Outputs guaranteed to only include positive counts. + # + # To strip negative and zero counts, add-in an empty counter: + # c += Counter() + # + # Results are ordered according to when an element is first + # encountered in the left operand and then by the order + # encountered in the right operand. + # + # When the multiplicities are all zero or one, multiset operations + # are guaranteed to be equivalent to the corresponding operations + # for regular sets. + # Given counter multisets such as: + # cp = Counter(a=1, b=0, c=1) + # cq = Counter(c=1, d=0, e=1) + # The corresponding regular sets would be: + # sp = {'a', 'c'} + # sq = {'c', 'e'} + # All of the following relations would hold: + # set(cp + cq) == sp | sq + # set(cp - cq) == sp - sq + # set(cp | cq) == sp | sq + # set(cp & cq) == sp & sq + # (cp == cq) == (sp == sq) + # (cp != cq) == (sp != sq) + # (cp <= cq) == (sp <= sq) + # (cp < cq) == (sp < sq) + # (cp >= cq) == (sp >= sq) + # (cp > cq) == (sp > sq) + + def __eq__(self, other): + 'True if all counts agree. Missing counts are treated as zero.' + if not isinstance(other, Counter): + return NotImplemented + return all(self[e] == other[e] for c in (self, other) for e in c) + + def __ne__(self, other): + 'True if any counts disagree. Missing counts are treated as zero.' + if not isinstance(other, Counter): + return NotImplemented + return not self == other + + def __le__(self, other): + 'True if all counts in self are a subset of those in other.' + if not isinstance(other, Counter): + return NotImplemented + return all(self[e] <= other[e] for c in (self, other) for e in c) + + def __lt__(self, other): + 'True if all counts in self are a proper subset of those in other.' + if not isinstance(other, Counter): + return NotImplemented + return self <= other and self != other + + def __ge__(self, other): + 'True if all counts in self are a superset of those in other.' + if not isinstance(other, Counter): + return NotImplemented + return all(self[e] >= other[e] for c in (self, other) for e in c) + + def __gt__(self, other): + 'True if all counts in self are a proper superset of those in other.' + if not isinstance(other, Counter): + return NotImplemented + return self >= other and self != other + + def __add__(self, other): + '''Add counts from two counters. + + >>> Counter('abbb') + Counter('bcc') + Counter({'b': 4, 'c': 2, 'a': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + newcount = count + other[elem] + if newcount > 0: + result[elem] = newcount + for elem, count in other.items(): + if elem not in self and count > 0: + result[elem] = count + return result + + def __sub__(self, other): + ''' Subtract count, but keep only results with positive counts. + + >>> Counter('abbbc') - Counter('bccd') + Counter({'b': 2, 'a': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + newcount = count - other[elem] + if newcount > 0: + result[elem] = newcount + for elem, count in other.items(): + if elem not in self and count < 0: + result[elem] = 0 - count + return result + + def __or__(self, other): + '''Union is the maximum of value in either of the input counters. + + >>> Counter('abbb') | Counter('bcc') + Counter({'b': 3, 'c': 2, 'a': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + other_count = other[elem] + newcount = other_count if count < other_count else count + if newcount > 0: + result[elem] = newcount + for elem, count in other.items(): + if elem not in self and count > 0: + result[elem] = count + return result + + def __and__(self, other): + ''' Intersection is the minimum of corresponding counts. + + >>> Counter('abbb') & Counter('bcc') + Counter({'b': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + other_count = other[elem] + newcount = count if count < other_count else other_count + if newcount > 0: + result[elem] = newcount + return result + + def __pos__(self): + 'Adds an empty counter, effectively stripping negative and zero counts' + result = Counter() + for elem, count in self.items(): + if count > 0: + result[elem] = count + return result + + def __neg__(self): + '''Subtracts from an empty counter. Strips positive and zero counts, + and flips the sign on negative counts. + + ''' + result = Counter() + for elem, count in self.items(): + if count < 0: + result[elem] = 0 - count + return result + + def _keep_positive(self): + '''Internal method to strip elements with a negative or zero count''' + nonpositive = [elem for elem, count in self.items() if not count > 0] + for elem in nonpositive: + del self[elem] + return self + + def __iadd__(self, other): + '''Inplace add from another counter, keeping only positive counts. + + >>> c = Counter('abbb') + >>> c += Counter('bcc') + >>> c + Counter({'b': 4, 'c': 2, 'a': 1}) + + ''' + for elem, count in other.items(): + self[elem] += count + return self._keep_positive() + + def __isub__(self, other): + '''Inplace subtract counter, but keep only results with positive counts. + + >>> c = Counter('abbbc') + >>> c -= Counter('bccd') + >>> c + Counter({'b': 2, 'a': 1}) + + ''' + for elem, count in other.items(): + self[elem] -= count + return self._keep_positive() + + def __ior__(self, other): + '''Inplace union is the maximum of value from either counter. + + >>> c = Counter('abbb') + >>> c |= Counter('bcc') + >>> c + Counter({'b': 3, 'c': 2, 'a': 1}) + + ''' + for elem, other_count in other.items(): + count = self[elem] + if other_count > count: + self[elem] = other_count + return self._keep_positive() + + def __iand__(self, other): + '''Inplace intersection is the minimum of corresponding counts. + + >>> c = Counter('abbb') + >>> c &= Counter('bcc') + >>> c + Counter({'b': 1}) + + ''' + for elem, count in self.items(): + other_count = other[elem] + if other_count < count: + self[elem] = other_count + return self._keep_positive() + + +######################################################################## +### ChainMap +######################################################################## + +class ChainMap(_collections_abc.MutableMapping): + ''' A ChainMap groups multiple dicts (or other mappings) together + to create a single, updateable view. + + The underlying mappings are stored in a list. That list is public and can + be accessed or updated using the *maps* attribute. There is no other + state. + + Lookups search the underlying mappings successively until a key is found. + In contrast, writes, updates, and deletions only operate on the first + mapping. + + ''' + + def __init__(self, *maps): + '''Initialize a ChainMap by setting *maps* to the given mappings. + If no mappings are provided, a single empty dictionary is used. + + ''' + self.maps = list(maps) or [{}] # always at least one map + + def __missing__(self, key): + raise KeyError(key) + + def __getitem__(self, key): + for mapping in self.maps: + try: + return mapping[key] # can't use 'key in mapping' with defaultdict + except KeyError: + pass + return self.__missing__(key) # support subclasses that define __missing__ + + def get(self, key, default=None): + return self[key] if key in self else default + + def __len__(self): + return len(set().union(*self.maps)) # reuses stored hash values if possible + + def __iter__(self): + d = {} + for mapping in map(dict.fromkeys, reversed(self.maps)): + d |= mapping # reuses stored hash values if possible + return iter(d) + + def __contains__(self, key): + return any(key in m for m in self.maps) + + def __bool__(self): + return any(self.maps) + + @_recursive_repr() + def __repr__(self): + return f'{self.__class__.__name__}({", ".join(map(repr, self.maps))})' + + @classmethod + def fromkeys(cls, iterable, *args): + 'Create a ChainMap with a single dict created from the iterable.' + return cls(dict.fromkeys(iterable, *args)) + + def copy(self): + 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]' + return self.__class__(self.maps[0].copy(), *self.maps[1:]) + + __copy__ = copy + + def new_child(self, m=None, **kwargs): # like Django's Context.push() + '''New ChainMap with a new map followed by all previous maps. + If no map is provided, an empty dict is used. + Keyword arguments update the map or new empty dict. + ''' + if m is None: + m = kwargs + elif kwargs: + m.update(kwargs) + return self.__class__(m, *self.maps) + + @property + def parents(self): # like Django's Context.pop() + 'New ChainMap from maps[1:].' + return self.__class__(*self.maps[1:]) + + def __setitem__(self, key, value): + self.maps[0][key] = value + + def __delitem__(self, key): + try: + del self.maps[0][key] + except KeyError: + raise KeyError(f'Key not found in the first mapping: {key!r}') + + def popitem(self): + 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' + try: + return self.maps[0].popitem() + except KeyError: + raise KeyError('No keys found in the first mapping.') + + def pop(self, key, *args): + 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].' + try: + return self.maps[0].pop(key, *args) + except KeyError: + raise KeyError(f'Key not found in the first mapping: {key!r}') + + def clear(self): + 'Clear maps[0], leaving maps[1:] intact.' + self.maps[0].clear() + + def __ior__(self, other): + self.maps[0].update(other) + return self + + def __or__(self, other): + if not isinstance(other, _collections_abc.Mapping): + return NotImplemented + m = self.copy() + m.maps[0].update(other) + return m + + def __ror__(self, other): + if not isinstance(other, _collections_abc.Mapping): + return NotImplemented + m = dict(other) + for child in reversed(self.maps): + m.update(child) + return self.__class__(m) + + +################################################################################ +### UserDict +################################################################################ + +class UserDict(_collections_abc.MutableMapping): + + # Start by filling-out the abstract methods + def __init__(self, dict=None, /, **kwargs): + self.data = {} + if dict is not None: + self.update(dict) + if kwargs: + self.update(kwargs) + + def __len__(self): + return len(self.data) + + def __getitem__(self, key): + if key in self.data: + return self.data[key] + if hasattr(self.__class__, "__missing__"): + return self.__class__.__missing__(self, key) + raise KeyError(key) + + def __setitem__(self, key, item): + self.data[key] = item + + def __delitem__(self, key): + del self.data[key] + + def __iter__(self): + return iter(self.data) + + # Modify __contains__ and get() to work like dict + # does when __missing__ is present. + def __contains__(self, key): + return key in self.data + + def get(self, key, default=None): + if key in self: + return self[key] + return default + + + # Now, add the methods in dicts but not in MutableMapping + def __repr__(self): + return repr(self.data) + + def __or__(self, other): + if isinstance(other, UserDict): + return self.__class__(self.data | other.data) + if isinstance(other, dict): + return self.__class__(self.data | other) + return NotImplemented + + def __ror__(self, other): + if isinstance(other, UserDict): + return self.__class__(other.data | self.data) + if isinstance(other, dict): + return self.__class__(other | self.data) + return NotImplemented + + def __ior__(self, other): + if isinstance(other, UserDict): + self.data |= other.data + else: + self.data |= other + return self + + def __copy__(self): + inst = self.__class__.__new__(self.__class__) + inst.__dict__.update(self.__dict__) + # Create a copy and avoid triggering descriptors + inst.__dict__["data"] = self.__dict__["data"].copy() + return inst + + def copy(self): + if self.__class__ is UserDict: + return UserDict(self.data.copy()) + import copy + data = self.data + try: + self.data = {} + c = copy.copy(self) + finally: + self.data = data + c.update(self) + return c + + @classmethod + def fromkeys(cls, iterable, value=None): + d = cls() + for key in iterable: + d[key] = value + return d + + +################################################################################ +### UserList +################################################################################ + +class UserList(_collections_abc.MutableSequence): + """A more or less complete user-defined wrapper around list objects.""" + + def __init__(self, initlist=None): + self.data = [] + if initlist is not None: + # XXX should this accept an arbitrary sequence? + if type(initlist) == type(self.data): + self.data[:] = initlist + elif isinstance(initlist, UserList): + self.data[:] = initlist.data[:] + else: + self.data = list(initlist) + + def __repr__(self): + return repr(self.data) + + def __lt__(self, other): + return self.data < self.__cast(other) + + def __le__(self, other): + return self.data <= self.__cast(other) + + def __eq__(self, other): + return self.data == self.__cast(other) + + def __gt__(self, other): + return self.data > self.__cast(other) + + def __ge__(self, other): + return self.data >= self.__cast(other) + + def __cast(self, other): + return other.data if isinstance(other, UserList) else other + + def __contains__(self, item): + return item in self.data + + def __len__(self): + return len(self.data) + + def __getitem__(self, i): + if isinstance(i, slice): + return self.__class__(self.data[i]) + else: + return self.data[i] + + def __setitem__(self, i, item): + self.data[i] = item + + def __delitem__(self, i): + del self.data[i] + + def __add__(self, other): + if isinstance(other, UserList): + return self.__class__(self.data + other.data) + elif isinstance(other, type(self.data)): + return self.__class__(self.data + other) + return self.__class__(self.data + list(other)) + + def __radd__(self, other): + if isinstance(other, UserList): + return self.__class__(other.data + self.data) + elif isinstance(other, type(self.data)): + return self.__class__(other + self.data) + return self.__class__(list(other) + self.data) + + def __iadd__(self, other): + if isinstance(other, UserList): + self.data += other.data + elif isinstance(other, type(self.data)): + self.data += other + else: + self.data += list(other) + return self + + def __mul__(self, n): + return self.__class__(self.data * n) + + __rmul__ = __mul__ + + def __imul__(self, n): + self.data *= n + return self + + def __copy__(self): + inst = self.__class__.__new__(self.__class__) + inst.__dict__.update(self.__dict__) + # Create a copy and avoid triggering descriptors + inst.__dict__["data"] = self.__dict__["data"][:] + return inst + + def append(self, item): + self.data.append(item) + + def insert(self, i, item): + self.data.insert(i, item) + + def pop(self, i=-1): + return self.data.pop(i) + + def remove(self, item): + self.data.remove(item) + + def clear(self): + self.data.clear() + + def copy(self): + return self.__class__(self) + + def count(self, item): + return self.data.count(item) + + def index(self, item, *args): + return self.data.index(item, *args) + + def reverse(self): + self.data.reverse() + + def sort(self, /, *args, **kwds): + self.data.sort(*args, **kwds) + + def extend(self, other): + if isinstance(other, UserList): + self.data.extend(other.data) + else: + self.data.extend(other) + + +################################################################################ +### UserString +################################################################################ + +class UserString(_collections_abc.Sequence): + + def __init__(self, seq): + if isinstance(seq, str): + self.data = seq + elif isinstance(seq, UserString): + self.data = seq.data[:] + else: + self.data = str(seq) + + def __str__(self): + return str(self.data) + + def __repr__(self): + return repr(self.data) + + def __int__(self): + return int(self.data) + + def __float__(self): + return float(self.data) + + def __complex__(self): + return complex(self.data) + + def __hash__(self): + return hash(self.data) + + def __getnewargs__(self): + return (self.data[:],) + + def __eq__(self, string): + if isinstance(string, UserString): + return self.data == string.data + return self.data == string + + def __lt__(self, string): + if isinstance(string, UserString): + return self.data < string.data + return self.data < string + + def __le__(self, string): + if isinstance(string, UserString): + return self.data <= string.data + return self.data <= string + + def __gt__(self, string): + if isinstance(string, UserString): + return self.data > string.data + return self.data > string + + def __ge__(self, string): + if isinstance(string, UserString): + return self.data >= string.data + return self.data >= string + + def __contains__(self, char): + if isinstance(char, UserString): + char = char.data + return char in self.data + + def __len__(self): + return len(self.data) + + def __getitem__(self, index): + return self.__class__(self.data[index]) + + def __add__(self, other): + if isinstance(other, UserString): + return self.__class__(self.data + other.data) + elif isinstance(other, str): + return self.__class__(self.data + other) + return self.__class__(self.data + str(other)) + + def __radd__(self, other): + if isinstance(other, str): + return self.__class__(other + self.data) + return self.__class__(str(other) + self.data) + + def __mul__(self, n): + return self.__class__(self.data * n) + + __rmul__ = __mul__ + + def __mod__(self, args): + return self.__class__(self.data % args) + + def __rmod__(self, template): + return self.__class__(str(template) % self) + + # the following methods are defined in alphabetical order: + def capitalize(self): + return self.__class__(self.data.capitalize()) + + def casefold(self): + return self.__class__(self.data.casefold()) + + def center(self, width, *args): + return self.__class__(self.data.center(width, *args)) + + def count(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data + return self.data.count(sub, start, end) + + def removeprefix(self, prefix, /): + if isinstance(prefix, UserString): + prefix = prefix.data + return self.__class__(self.data.removeprefix(prefix)) + + def removesuffix(self, suffix, /): + if isinstance(suffix, UserString): + suffix = suffix.data + return self.__class__(self.data.removesuffix(suffix)) + + def encode(self, encoding='utf-8', errors='strict'): + encoding = 'utf-8' if encoding is None else encoding + errors = 'strict' if errors is None else errors + return self.data.encode(encoding, errors) + + def endswith(self, suffix, start=0, end=_sys.maxsize): + return self.data.endswith(suffix, start, end) + + def expandtabs(self, tabsize=8): + return self.__class__(self.data.expandtabs(tabsize)) + + def find(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data + return self.data.find(sub, start, end) + + def format(self, /, *args, **kwds): + return self.data.format(*args, **kwds) + + def format_map(self, mapping): + return self.data.format_map(mapping) + + def index(self, sub, start=0, end=_sys.maxsize): + return self.data.index(sub, start, end) + + def isalpha(self): + return self.data.isalpha() + + def isalnum(self): + return self.data.isalnum() + + def isascii(self): + return self.data.isascii() + + def isdecimal(self): + return self.data.isdecimal() + + def isdigit(self): + return self.data.isdigit() + + def isidentifier(self): + return self.data.isidentifier() + + def islower(self): + return self.data.islower() + + def isnumeric(self): + return self.data.isnumeric() + + def isprintable(self): + return self.data.isprintable() + + def isspace(self): + return self.data.isspace() + + def istitle(self): + return self.data.istitle() + + def isupper(self): + return self.data.isupper() + + def join(self, seq): + return self.data.join(seq) + + def ljust(self, width, *args): + return self.__class__(self.data.ljust(width, *args)) + + def lower(self): + return self.__class__(self.data.lower()) + + def lstrip(self, chars=None): + return self.__class__(self.data.lstrip(chars)) + + maketrans = str.maketrans + + def partition(self, sep): + return self.data.partition(sep) + + def replace(self, old, new, maxsplit=-1): + if isinstance(old, UserString): + old = old.data + if isinstance(new, UserString): + new = new.data + return self.__class__(self.data.replace(old, new, maxsplit)) + + def rfind(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data + return self.data.rfind(sub, start, end) + + def rindex(self, sub, start=0, end=_sys.maxsize): + return self.data.rindex(sub, start, end) + + def rjust(self, width, *args): + return self.__class__(self.data.rjust(width, *args)) + + def rpartition(self, sep): + return self.data.rpartition(sep) + + def rstrip(self, chars=None): + return self.__class__(self.data.rstrip(chars)) + + def split(self, sep=None, maxsplit=-1): + return self.data.split(sep, maxsplit) + + def rsplit(self, sep=None, maxsplit=-1): + return self.data.rsplit(sep, maxsplit) + + def splitlines(self, keepends=False): + return self.data.splitlines(keepends) + + def startswith(self, prefix, start=0, end=_sys.maxsize): + return self.data.startswith(prefix, start, end) + + def strip(self, chars=None): + return self.__class__(self.data.strip(chars)) + + def swapcase(self): + return self.__class__(self.data.swapcase()) + + def title(self): + return self.__class__(self.data.title()) + + def translate(self, *args): + return self.__class__(self.data.translate(*args)) + + def upper(self): + return self.__class__(self.data.upper()) + + def zfill(self, width): + return self.__class__(self.data.zfill(width)) diff --git a/squashfs-root/usr/lib/python3.12/collections/abc.py b/squashfs-root/usr/lib/python3.12/collections/abc.py new file mode 100644 index 0000000..86ca8b8 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/collections/abc.py @@ -0,0 +1,3 @@ +from _collections_abc import * +from _collections_abc import __all__ +from _collections_abc import _CallableGenericAlias diff --git a/squashfs-root/usr/lib/python3.12/colorsys.py b/squashfs-root/usr/lib/python3.12/colorsys.py new file mode 100644 index 0000000..bc897bd --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/colorsys.py @@ -0,0 +1,166 @@ +"""Conversion functions between RGB and other color systems. + +This modules provides two functions for each color system ABC: + + rgb_to_abc(r, g, b) --> a, b, c + abc_to_rgb(a, b, c) --> r, g, b + +All inputs and outputs are triples of floats in the range [0.0...1.0] +(with the exception of I and Q, which covers a slightly larger range). +Inputs outside the valid range may cause exceptions or invalid outputs. + +Supported color systems: +RGB: Red, Green, Blue components +YIQ: Luminance, Chrominance (used by composite video signals) +HLS: Hue, Luminance, Saturation +HSV: Hue, Saturation, Value +""" + +# References: +# http://en.wikipedia.org/wiki/YIQ +# http://en.wikipedia.org/wiki/HLS_color_space +# http://en.wikipedia.org/wiki/HSV_color_space + +__all__ = ["rgb_to_yiq","yiq_to_rgb","rgb_to_hls","hls_to_rgb", + "rgb_to_hsv","hsv_to_rgb"] + +# Some floating point constants + +ONE_THIRD = 1.0/3.0 +ONE_SIXTH = 1.0/6.0 +TWO_THIRD = 2.0/3.0 + +# YIQ: used by composite video signals (linear combinations of RGB) +# Y: perceived grey level (0.0 == black, 1.0 == white) +# I, Q: color components +# +# There are a great many versions of the constants used in these formulae. +# The ones in this library uses constants from the FCC version of NTSC. + +def rgb_to_yiq(r, g, b): + y = 0.30*r + 0.59*g + 0.11*b + i = 0.74*(r-y) - 0.27*(b-y) + q = 0.48*(r-y) + 0.41*(b-y) + return (y, i, q) + +def yiq_to_rgb(y, i, q): + # r = y + (0.27*q + 0.41*i) / (0.74*0.41 + 0.27*0.48) + # b = y + (0.74*q - 0.48*i) / (0.74*0.41 + 0.27*0.48) + # g = y - (0.30*(r-y) + 0.11*(b-y)) / 0.59 + + r = y + 0.9468822170900693*i + 0.6235565819861433*q + g = y - 0.27478764629897834*i - 0.6356910791873801*q + b = y - 1.1085450346420322*i + 1.7090069284064666*q + + if r < 0.0: + r = 0.0 + if g < 0.0: + g = 0.0 + if b < 0.0: + b = 0.0 + if r > 1.0: + r = 1.0 + if g > 1.0: + g = 1.0 + if b > 1.0: + b = 1.0 + return (r, g, b) + + +# HLS: Hue, Luminance, Saturation +# H: position in the spectrum +# L: color lightness +# S: color saturation + +def rgb_to_hls(r, g, b): + maxc = max(r, g, b) + minc = min(r, g, b) + sumc = (maxc+minc) + rangec = (maxc-minc) + l = sumc/2.0 + if minc == maxc: + return 0.0, l, 0.0 + if l <= 0.5: + s = rangec / sumc + else: + s = rangec / (2.0-maxc-minc) # Not always 2.0-sumc: gh-106498. + rc = (maxc-r) / rangec + gc = (maxc-g) / rangec + bc = (maxc-b) / rangec + if r == maxc: + h = bc-gc + elif g == maxc: + h = 2.0+rc-bc + else: + h = 4.0+gc-rc + h = (h/6.0) % 1.0 + return h, l, s + +def hls_to_rgb(h, l, s): + if s == 0.0: + return l, l, l + if l <= 0.5: + m2 = l * (1.0+s) + else: + m2 = l+s-(l*s) + m1 = 2.0*l - m2 + return (_v(m1, m2, h+ONE_THIRD), _v(m1, m2, h), _v(m1, m2, h-ONE_THIRD)) + +def _v(m1, m2, hue): + hue = hue % 1.0 + if hue < ONE_SIXTH: + return m1 + (m2-m1)*hue*6.0 + if hue < 0.5: + return m2 + if hue < TWO_THIRD: + return m1 + (m2-m1)*(TWO_THIRD-hue)*6.0 + return m1 + + +# HSV: Hue, Saturation, Value +# H: position in the spectrum +# S: color saturation ("purity") +# V: color brightness + +def rgb_to_hsv(r, g, b): + maxc = max(r, g, b) + minc = min(r, g, b) + rangec = (maxc-minc) + v = maxc + if minc == maxc: + return 0.0, 0.0, v + s = rangec / maxc + rc = (maxc-r) / rangec + gc = (maxc-g) / rangec + bc = (maxc-b) / rangec + if r == maxc: + h = bc-gc + elif g == maxc: + h = 2.0+rc-bc + else: + h = 4.0+gc-rc + h = (h/6.0) % 1.0 + return h, s, v + +def hsv_to_rgb(h, s, v): + if s == 0.0: + return v, v, v + i = int(h*6.0) # XXX assume int() truncates! + f = (h*6.0) - i + p = v*(1.0 - s) + q = v*(1.0 - s*f) + t = v*(1.0 - s*(1.0-f)) + i = i%6 + if i == 0: + return v, t, p + if i == 1: + return q, v, p + if i == 2: + return p, v, t + if i == 3: + return p, q, v + if i == 4: + return t, p, v + if i == 5: + return v, p, q + # Cannot get here diff --git a/squashfs-root/usr/lib/python3.12/compileall.py b/squashfs-root/usr/lib/python3.12/compileall.py new file mode 100644 index 0000000..c0eb53f --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/compileall.py @@ -0,0 +1,472 @@ +"""Module/script to byte-compile all .py files to .pyc files. + +When called as a script with arguments, this compiles the directories +given as arguments recursively; the -l option prevents it from +recursing into directories. + +Without arguments, it compiles all modules on sys.path, without +recursing into subdirectories. (Even though it should do so for +packages -- for now, you'll have to deal with packages separately.) + +See module py_compile for details of the actual byte-compilation. +""" +import os +import sys +import importlib.util +import py_compile +import struct +import filecmp + +from functools import partial +from pathlib import Path + +__all__ = ["compile_dir","compile_file","compile_path"] + +def _walk_dir(dir, maxlevels, quiet=0): + if quiet < 2 and isinstance(dir, os.PathLike): + dir = os.fspath(dir) + if not quiet: + print('Listing {!r}...'.format(dir)) + try: + names = os.listdir(dir) + except OSError: + if quiet < 2: + print("Can't list {!r}".format(dir)) + names = [] + names.sort() + for name in names: + if name == '__pycache__': + continue + fullname = os.path.join(dir, name) + if not os.path.isdir(fullname): + yield fullname + elif (maxlevels > 0 and name != os.curdir and name != os.pardir and + os.path.isdir(fullname) and not os.path.islink(fullname)): + yield from _walk_dir(fullname, maxlevels=maxlevels - 1, + quiet=quiet) + +def compile_dir(dir, maxlevels=None, ddir=None, force=False, + rx=None, quiet=0, legacy=False, optimize=-1, workers=1, + invalidation_mode=None, *, stripdir=None, + prependdir=None, limit_sl_dest=None, hardlink_dupes=False): + """Byte-compile all modules in the given directory tree. + + Arguments (only dir is required): + + dir: the directory to byte-compile + maxlevels: maximum recursion level (default `sys.getrecursionlimit()`) + ddir: the directory that will be prepended to the path to the + file as it is compiled into each byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: int or list of optimization levels or -1 for level of + the interpreter. Multiple levels leads to multiple compiled + files each with one optimization level. + workers: maximum number of parallel workers + invalidation_mode: how the up-to-dateness of the pyc will be checked + stripdir: part of path to left-strip from source file path + prependdir: path to prepend to beginning of original file path, applied + after stripdir + limit_sl_dest: ignore symlinks if they are pointing outside of + the defined path + hardlink_dupes: hardlink duplicated pyc files + """ + ProcessPoolExecutor = None + if ddir is not None and (stripdir is not None or prependdir is not None): + raise ValueError(("Destination dir (ddir) cannot be used " + "in combination with stripdir or prependdir")) + if ddir is not None: + stripdir = dir + prependdir = ddir + ddir = None + if workers < 0: + raise ValueError('workers must be greater or equal to 0') + if workers != 1: + # Check if this is a system where ProcessPoolExecutor can function. + from concurrent.futures.process import _check_system_limits + try: + _check_system_limits() + except NotImplementedError: + workers = 1 + else: + from concurrent.futures import ProcessPoolExecutor + if maxlevels is None: + maxlevels = sys.getrecursionlimit() + files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels) + success = True + if workers != 1 and ProcessPoolExecutor is not None: + try: + import multiprocessing + if multiprocessing.get_start_method() == 'fork': + mp_context = multiprocessing.get_context('forkserver') + else: + mp_context = None + except ImportError: + mp_context = None + # If workers == 0, let ProcessPoolExecutor choose + workers = workers or None + with ProcessPoolExecutor(max_workers=workers, + mp_context=mp_context) as executor: + results = executor.map(partial(compile_file, + ddir=ddir, force=force, + rx=rx, quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode, + stripdir=stripdir, + prependdir=prependdir, + limit_sl_dest=limit_sl_dest, + hardlink_dupes=hardlink_dupes), + files) + success = min(results, default=True) + else: + for file in files: + if not compile_file(file, ddir, force, rx, quiet, + legacy, optimize, invalidation_mode, + stripdir=stripdir, prependdir=prependdir, + limit_sl_dest=limit_sl_dest, + hardlink_dupes=hardlink_dupes): + success = False + return success + +def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, + legacy=False, optimize=-1, + invalidation_mode=None, *, stripdir=None, prependdir=None, + limit_sl_dest=None, hardlink_dupes=False): + """Byte-compile one file. + + Arguments (only fullname is required): + + fullname: the file to byte-compile + ddir: if given, the directory name compiled in to the + byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: int or list of optimization levels or -1 for level of + the interpreter. Multiple levels leads to multiple compiled + files each with one optimization level. + invalidation_mode: how the up-to-dateness of the pyc will be checked + stripdir: part of path to left-strip from source file path + prependdir: path to prepend to beginning of original file path, applied + after stripdir + limit_sl_dest: ignore symlinks if they are pointing outside of + the defined path. + hardlink_dupes: hardlink duplicated pyc files + """ + + if ddir is not None and (stripdir is not None or prependdir is not None): + raise ValueError(("Destination dir (ddir) cannot be used " + "in combination with stripdir or prependdir")) + + success = True + fullname = os.fspath(fullname) + stripdir = os.fspath(stripdir) if stripdir is not None else None + name = os.path.basename(fullname) + + dfile = None + + if ddir is not None: + dfile = os.path.join(ddir, name) + + if stripdir is not None: + fullname_parts = fullname.split(os.path.sep) + stripdir_parts = stripdir.split(os.path.sep) + ddir_parts = list(fullname_parts) + + for spart, opart in zip(stripdir_parts, fullname_parts): + if spart == opart: + ddir_parts.remove(spart) + + dfile = os.path.join(*ddir_parts) + + if prependdir is not None: + if dfile is None: + dfile = os.path.join(prependdir, fullname) + else: + dfile = os.path.join(prependdir, dfile) + + if isinstance(optimize, int): + optimize = [optimize] + + # Use set() to remove duplicates. + # Use sorted() to create pyc files in a deterministic order. + optimize = sorted(set(optimize)) + + if hardlink_dupes and len(optimize) < 2: + raise ValueError("Hardlinking of duplicated bytecode makes sense " + "only for more than one optimization level") + + if rx is not None: + mo = rx.search(fullname) + if mo: + return success + + if limit_sl_dest is not None and os.path.islink(fullname): + if Path(limit_sl_dest).resolve() not in Path(fullname).resolve().parents: + return success + + opt_cfiles = {} + + if os.path.isfile(fullname): + for opt_level in optimize: + if legacy: + opt_cfiles[opt_level] = fullname + 'c' + else: + if opt_level >= 0: + opt = opt_level if opt_level >= 1 else '' + cfile = (importlib.util.cache_from_source( + fullname, optimization=opt)) + opt_cfiles[opt_level] = cfile + else: + cfile = importlib.util.cache_from_source(fullname) + opt_cfiles[opt_level] = cfile + + head, tail = name[:-3], name[-3:] + if tail == '.py': + if not force: + try: + mtime = int(os.stat(fullname).st_mtime) + expect = struct.pack('<4sLL', importlib.util.MAGIC_NUMBER, + 0, mtime & 0xFFFF_FFFF) + for cfile in opt_cfiles.values(): + with open(cfile, 'rb') as chandle: + actual = chandle.read(12) + if expect != actual: + break + else: + return success + except OSError: + pass + if not quiet: + print('Compiling {!r}...'.format(fullname)) + try: + for index, opt_level in enumerate(optimize): + cfile = opt_cfiles[opt_level] + ok = py_compile.compile(fullname, cfile, dfile, True, + optimize=opt_level, + invalidation_mode=invalidation_mode) + if index > 0 and hardlink_dupes: + previous_cfile = opt_cfiles[optimize[index - 1]] + if filecmp.cmp(cfile, previous_cfile, shallow=False): + os.unlink(cfile) + os.link(previous_cfile, cfile) + except py_compile.PyCompileError as err: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + # escape non-printable characters in msg + encoding = sys.stdout.encoding or sys.getdefaultencoding() + msg = err.msg.encode(encoding, errors='backslashreplace').decode(encoding) + print(msg) + except (SyntaxError, UnicodeError, OSError) as e: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + print(e.__class__.__name__ + ':', e) + else: + if ok == 0: + success = False + return success + +def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0, + legacy=False, optimize=-1, + invalidation_mode=None): + """Byte-compile all module on sys.path. + + Arguments (all optional): + + skip_curdir: if true, skip current directory (default True) + maxlevels: max recursion level (default 0) + force: as for compile_dir() (default False) + quiet: as for compile_dir() (default 0) + legacy: as for compile_dir() (default False) + optimize: as for compile_dir() (default -1) + invalidation_mode: as for compiler_dir() + """ + success = True + for dir in sys.path: + if (not dir or dir == os.curdir) and skip_curdir: + if quiet < 2: + print('Skipping current directory') + else: + success = success and compile_dir( + dir, + maxlevels, + None, + force, + quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode, + ) + return success + + +def main(): + """Script main program.""" + import argparse + + parser = argparse.ArgumentParser( + description='Utilities to support installing Python libraries.') + parser.add_argument('-l', action='store_const', const=0, + default=None, dest='maxlevels', + help="don't recurse into subdirectories") + parser.add_argument('-r', type=int, dest='recursion', + help=('control the maximum recursion level. ' + 'if `-l` and `-r` options are specified, ' + 'then `-r` takes precedence.')) + parser.add_argument('-f', action='store_true', dest='force', + help='force rebuild even if timestamps are up to date') + parser.add_argument('-q', action='count', dest='quiet', default=0, + help='output only error messages; -qq will suppress ' + 'the error messages as well.') + parser.add_argument('-b', action='store_true', dest='legacy', + help='use legacy (pre-PEP3147) compiled file locations') + parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None, + help=('directory to prepend to file paths for use in ' + 'compile-time tracebacks and in runtime ' + 'tracebacks in cases where the source file is ' + 'unavailable')) + parser.add_argument('-s', metavar='STRIPDIR', dest='stripdir', + default=None, + help=('part of path to left-strip from path ' + 'to source file - for example buildroot. ' + '`-d` and `-s` options cannot be ' + 'specified together.')) + parser.add_argument('-p', metavar='PREPENDDIR', dest='prependdir', + default=None, + help=('path to add as prefix to path ' + 'to source file - for example / to make ' + 'it absolute when some part is removed ' + 'by `-s` option. ' + '`-d` and `-p` options cannot be ' + 'specified together.')) + parser.add_argument('-x', metavar='REGEXP', dest='rx', default=None, + help=('skip files matching the regular expression; ' + 'the regexp is searched for in the full path ' + 'of each file considered for compilation')) + parser.add_argument('-i', metavar='FILE', dest='flist', + help=('add all the files and directories listed in ' + 'FILE to the list considered for compilation; ' + 'if "-", names are read from stdin')) + parser.add_argument('compile_dest', metavar='FILE|DIR', nargs='*', + help=('zero or more file and directory names ' + 'to compile; if no arguments given, defaults ' + 'to the equivalent of -l sys.path')) + parser.add_argument('-j', '--workers', default=1, + type=int, help='Run compileall concurrently') + invalidation_modes = [mode.name.lower().replace('_', '-') + for mode in py_compile.PycInvalidationMode] + parser.add_argument('--invalidation-mode', + choices=sorted(invalidation_modes), + help=('set .pyc invalidation mode; defaults to ' + '"checked-hash" if the SOURCE_DATE_EPOCH ' + 'environment variable is set, and ' + '"timestamp" otherwise.')) + parser.add_argument('-o', action='append', type=int, dest='opt_levels', + help=('Optimization levels to run compilation with. ' + 'Default is -1 which uses the optimization level ' + 'of the Python interpreter itself (see -O).')) + parser.add_argument('-e', metavar='DIR', dest='limit_sl_dest', + help='Ignore symlinks pointing outsite of the DIR') + parser.add_argument('--hardlink-dupes', action='store_true', + dest='hardlink_dupes', + help='Hardlink duplicated pyc files') + + args = parser.parse_args() + compile_dests = args.compile_dest + + if args.rx: + import re + args.rx = re.compile(args.rx) + + if args.limit_sl_dest == "": + args.limit_sl_dest = None + + if args.recursion is not None: + maxlevels = args.recursion + else: + maxlevels = args.maxlevels + + if args.opt_levels is None: + args.opt_levels = [-1] + + if len(args.opt_levels) == 1 and args.hardlink_dupes: + parser.error(("Hardlinking of duplicated bytecode makes sense " + "only for more than one optimization level.")) + + if args.ddir is not None and ( + args.stripdir is not None or args.prependdir is not None + ): + parser.error("-d cannot be used in combination with -s or -p") + + # if flist is provided then load it + if args.flist: + try: + with (sys.stdin if args.flist=='-' else + open(args.flist, encoding="utf-8")) as f: + for line in f: + compile_dests.append(line.strip()) + except OSError: + if args.quiet < 2: + print("Error reading file list {}".format(args.flist)) + return False + + if args.invalidation_mode: + ivl_mode = args.invalidation_mode.replace('-', '_').upper() + invalidation_mode = py_compile.PycInvalidationMode[ivl_mode] + else: + invalidation_mode = None + + success = True + try: + if compile_dests: + for dest in compile_dests: + if os.path.isfile(dest): + if not compile_file(dest, args.ddir, args.force, args.rx, + args.quiet, args.legacy, + invalidation_mode=invalidation_mode, + stripdir=args.stripdir, + prependdir=args.prependdir, + optimize=args.opt_levels, + limit_sl_dest=args.limit_sl_dest, + hardlink_dupes=args.hardlink_dupes): + success = False + else: + if not compile_dir(dest, maxlevels, args.ddir, + args.force, args.rx, args.quiet, + args.legacy, workers=args.workers, + invalidation_mode=invalidation_mode, + stripdir=args.stripdir, + prependdir=args.prependdir, + optimize=args.opt_levels, + limit_sl_dest=args.limit_sl_dest, + hardlink_dupes=args.hardlink_dupes): + success = False + return success + else: + return compile_path(legacy=args.legacy, force=args.force, + quiet=args.quiet, + invalidation_mode=invalidation_mode) + except KeyboardInterrupt: + if args.quiet < 2: + print("\n[interrupted]") + return False + return True + + +if __name__ == '__main__': + exit_status = int(not main()) + sys.exit(exit_status) diff --git a/squashfs-root/usr/lib/python3.12/concurrent/__init__.py b/squashfs-root/usr/lib/python3.12/concurrent/__init__.py new file mode 100644 index 0000000..196d378 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/concurrent/__init__.py @@ -0,0 +1 @@ +# This directory is a Python package. diff --git a/squashfs-root/usr/lib/python3.12/concurrent/futures/__init__.py b/squashfs-root/usr/lib/python3.12/concurrent/futures/__init__.py new file mode 100644 index 0000000..292e886 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/concurrent/futures/__init__.py @@ -0,0 +1,53 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Execute computations asynchronously using threads or processes.""" + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +from concurrent.futures._base import (FIRST_COMPLETED, + FIRST_EXCEPTION, + ALL_COMPLETED, + CancelledError, + TimeoutError, + InvalidStateError, + BrokenExecutor, + Future, + Executor, + wait, + as_completed) + +__all__ = ( + 'FIRST_COMPLETED', + 'FIRST_EXCEPTION', + 'ALL_COMPLETED', + 'CancelledError', + 'TimeoutError', + 'BrokenExecutor', + 'Future', + 'Executor', + 'wait', + 'as_completed', + 'ProcessPoolExecutor', + 'ThreadPoolExecutor', +) + + +def __dir__(): + return __all__ + ('__author__', '__doc__') + + +def __getattr__(name): + global ProcessPoolExecutor, ThreadPoolExecutor + + if name == 'ProcessPoolExecutor': + from .process import ProcessPoolExecutor as pe + ProcessPoolExecutor = pe + return pe + + if name == 'ThreadPoolExecutor': + from .thread import ThreadPoolExecutor as te + ThreadPoolExecutor = te + return te + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/squashfs-root/usr/lib/python3.12/concurrent/futures/_base.py b/squashfs-root/usr/lib/python3.12/concurrent/futures/_base.py new file mode 100644 index 0000000..6742a07 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/concurrent/futures/_base.py @@ -0,0 +1,654 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +import collections +import logging +import threading +import time +import types + +FIRST_COMPLETED = 'FIRST_COMPLETED' +FIRST_EXCEPTION = 'FIRST_EXCEPTION' +ALL_COMPLETED = 'ALL_COMPLETED' +_AS_COMPLETED = '_AS_COMPLETED' + +# Possible future states (for internal use by the futures package). +PENDING = 'PENDING' +RUNNING = 'RUNNING' +# The future was cancelled by the user... +CANCELLED = 'CANCELLED' +# ...and _Waiter.add_cancelled() was called by a worker. +CANCELLED_AND_NOTIFIED = 'CANCELLED_AND_NOTIFIED' +FINISHED = 'FINISHED' + +_FUTURE_STATES = [ + PENDING, + RUNNING, + CANCELLED, + CANCELLED_AND_NOTIFIED, + FINISHED +] + +_STATE_TO_DESCRIPTION_MAP = { + PENDING: "pending", + RUNNING: "running", + CANCELLED: "cancelled", + CANCELLED_AND_NOTIFIED: "cancelled", + FINISHED: "finished" +} + +# Logger for internal use by the futures package. +LOGGER = logging.getLogger("concurrent.futures") + +class Error(Exception): + """Base class for all future-related exceptions.""" + pass + +class CancelledError(Error): + """The Future was cancelled.""" + pass + +TimeoutError = TimeoutError # make local alias for the standard exception + +class InvalidStateError(Error): + """The operation is not allowed in this state.""" + pass + +class _Waiter(object): + """Provides the event that wait() and as_completed() block on.""" + def __init__(self): + self.event = threading.Event() + self.finished_futures = [] + + def add_result(self, future): + self.finished_futures.append(future) + + def add_exception(self, future): + self.finished_futures.append(future) + + def add_cancelled(self, future): + self.finished_futures.append(future) + +class _AsCompletedWaiter(_Waiter): + """Used by as_completed().""" + + def __init__(self): + super(_AsCompletedWaiter, self).__init__() + self.lock = threading.Lock() + + def add_result(self, future): + with self.lock: + super(_AsCompletedWaiter, self).add_result(future) + self.event.set() + + def add_exception(self, future): + with self.lock: + super(_AsCompletedWaiter, self).add_exception(future) + self.event.set() + + def add_cancelled(self, future): + with self.lock: + super(_AsCompletedWaiter, self).add_cancelled(future) + self.event.set() + +class _FirstCompletedWaiter(_Waiter): + """Used by wait(return_when=FIRST_COMPLETED).""" + + def add_result(self, future): + super().add_result(future) + self.event.set() + + def add_exception(self, future): + super().add_exception(future) + self.event.set() + + def add_cancelled(self, future): + super().add_cancelled(future) + self.event.set() + +class _AllCompletedWaiter(_Waiter): + """Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED).""" + + def __init__(self, num_pending_calls, stop_on_exception): + self.num_pending_calls = num_pending_calls + self.stop_on_exception = stop_on_exception + self.lock = threading.Lock() + super().__init__() + + def _decrement_pending_calls(self): + with self.lock: + self.num_pending_calls -= 1 + if not self.num_pending_calls: + self.event.set() + + def add_result(self, future): + super().add_result(future) + self._decrement_pending_calls() + + def add_exception(self, future): + super().add_exception(future) + if self.stop_on_exception: + self.event.set() + else: + self._decrement_pending_calls() + + def add_cancelled(self, future): + super().add_cancelled(future) + self._decrement_pending_calls() + +class _AcquireFutures(object): + """A context manager that does an ordered acquire of Future conditions.""" + + def __init__(self, futures): + self.futures = sorted(futures, key=id) + + def __enter__(self): + for future in self.futures: + future._condition.acquire() + + def __exit__(self, *args): + for future in self.futures: + future._condition.release() + +def _create_and_install_waiters(fs, return_when): + if return_when == _AS_COMPLETED: + waiter = _AsCompletedWaiter() + elif return_when == FIRST_COMPLETED: + waiter = _FirstCompletedWaiter() + else: + pending_count = sum( + f._state not in [CANCELLED_AND_NOTIFIED, FINISHED] for f in fs) + + if return_when == FIRST_EXCEPTION: + waiter = _AllCompletedWaiter(pending_count, stop_on_exception=True) + elif return_when == ALL_COMPLETED: + waiter = _AllCompletedWaiter(pending_count, stop_on_exception=False) + else: + raise ValueError("Invalid return condition: %r" % return_when) + + for f in fs: + f._waiters.append(waiter) + + return waiter + + +def _yield_finished_futures(fs, waiter, ref_collect): + """ + Iterate on the list *fs*, yielding finished futures one by one in + reverse order. + Before yielding a future, *waiter* is removed from its waiters + and the future is removed from each set in the collection of sets + *ref_collect*. + + The aim of this function is to avoid keeping stale references after + the future is yielded and before the iterator resumes. + """ + while fs: + f = fs[-1] + for futures_set in ref_collect: + futures_set.remove(f) + with f._condition: + f._waiters.remove(waiter) + del f + # Careful not to keep a reference to the popped value + yield fs.pop() + + +def as_completed(fs, timeout=None): + """An iterator over the given futures that yields each as it completes. + + Args: + fs: The sequence of Futures (possibly created by different Executors) to + iterate over. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + + Returns: + An iterator that yields the given Futures as they complete (finished or + cancelled). If any given Futures are duplicated, they will be returned + once. + + Raises: + TimeoutError: If the entire result iterator could not be generated + before the given timeout. + """ + if timeout is not None: + end_time = timeout + time.monotonic() + + fs = set(fs) + total_futures = len(fs) + with _AcquireFutures(fs): + finished = set( + f for f in fs + if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]) + pending = fs - finished + waiter = _create_and_install_waiters(fs, _AS_COMPLETED) + finished = list(finished) + try: + yield from _yield_finished_futures(finished, waiter, + ref_collect=(fs,)) + + while pending: + if timeout is None: + wait_timeout = None + else: + wait_timeout = end_time - time.monotonic() + if wait_timeout < 0: + raise TimeoutError( + '%d (of %d) futures unfinished' % ( + len(pending), total_futures)) + + waiter.event.wait(wait_timeout) + + with waiter.lock: + finished = waiter.finished_futures + waiter.finished_futures = [] + waiter.event.clear() + + # reverse to keep finishing order + finished.reverse() + yield from _yield_finished_futures(finished, waiter, + ref_collect=(fs, pending)) + + finally: + # Remove waiter from unfinished futures + for f in fs: + with f._condition: + f._waiters.remove(waiter) + +DoneAndNotDoneFutures = collections.namedtuple( + 'DoneAndNotDoneFutures', 'done not_done') +def wait(fs, timeout=None, return_when=ALL_COMPLETED): + """Wait for the futures in the given sequence to complete. + + Args: + fs: The sequence of Futures (possibly created by different Executors) to + wait upon. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + return_when: Indicates when this function should return. The options + are: + + FIRST_COMPLETED - Return when any future finishes or is + cancelled. + FIRST_EXCEPTION - Return when any future finishes by raising an + exception. If no future raises an exception + then it is equivalent to ALL_COMPLETED. + ALL_COMPLETED - Return when all futures finish or are cancelled. + + Returns: + A named 2-tuple of sets. The first set, named 'done', contains the + futures that completed (is finished or cancelled) before the wait + completed. The second set, named 'not_done', contains uncompleted + futures. Duplicate futures given to *fs* are removed and will be + returned only once. + """ + fs = set(fs) + with _AcquireFutures(fs): + done = {f for f in fs + if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]} + not_done = fs - done + if (return_when == FIRST_COMPLETED) and done: + return DoneAndNotDoneFutures(done, not_done) + elif (return_when == FIRST_EXCEPTION) and done: + if any(f for f in done + if not f.cancelled() and f.exception() is not None): + return DoneAndNotDoneFutures(done, not_done) + + if len(done) == len(fs): + return DoneAndNotDoneFutures(done, not_done) + + waiter = _create_and_install_waiters(fs, return_when) + + waiter.event.wait(timeout) + for f in fs: + with f._condition: + f._waiters.remove(waiter) + + done.update(waiter.finished_futures) + return DoneAndNotDoneFutures(done, fs - done) + + +def _result_or_cancel(fut, timeout=None): + try: + try: + return fut.result(timeout) + finally: + fut.cancel() + finally: + # Break a reference cycle with the exception in self._exception + del fut + + +class Future(object): + """Represents the result of an asynchronous computation.""" + + def __init__(self): + """Initializes the future. Should not be called by clients.""" + self._condition = threading.Condition() + self._state = PENDING + self._result = None + self._exception = None + self._waiters = [] + self._done_callbacks = [] + + def _invoke_callbacks(self): + for callback in self._done_callbacks: + try: + callback(self) + except Exception: + LOGGER.exception('exception calling callback for %r', self) + + def __repr__(self): + with self._condition: + if self._state == FINISHED: + if self._exception: + return '<%s at %#x state=%s raised %s>' % ( + self.__class__.__name__, + id(self), + _STATE_TO_DESCRIPTION_MAP[self._state], + self._exception.__class__.__name__) + else: + return '<%s at %#x state=%s returned %s>' % ( + self.__class__.__name__, + id(self), + _STATE_TO_DESCRIPTION_MAP[self._state], + self._result.__class__.__name__) + return '<%s at %#x state=%s>' % ( + self.__class__.__name__, + id(self), + _STATE_TO_DESCRIPTION_MAP[self._state]) + + def cancel(self): + """Cancel the future if possible. + + Returns True if the future was cancelled, False otherwise. A future + cannot be cancelled if it is running or has already completed. + """ + with self._condition: + if self._state in [RUNNING, FINISHED]: + return False + + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + return True + + self._state = CANCELLED + self._condition.notify_all() + + self._invoke_callbacks() + return True + + def cancelled(self): + """Return True if the future was cancelled.""" + with self._condition: + return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED] + + def running(self): + """Return True if the future is currently executing.""" + with self._condition: + return self._state == RUNNING + + def done(self): + """Return True if the future was cancelled or finished executing.""" + with self._condition: + return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED] + + def __get_result(self): + if self._exception: + try: + raise self._exception + finally: + # Break a reference cycle with the exception in self._exception + self = None + else: + return self._result + + def add_done_callback(self, fn): + """Attaches a callable that will be called when the future finishes. + + Args: + fn: A callable that will be called with this future as its only + argument when the future completes or is cancelled. The callable + will always be called by a thread in the same process in which + it was added. If the future has already completed or been + cancelled then the callable will be called immediately. These + callables are called in the order that they were added. + """ + with self._condition: + if self._state not in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]: + self._done_callbacks.append(fn) + return + try: + fn(self) + except Exception: + LOGGER.exception('exception calling callback for %r', self) + + def result(self, timeout=None): + """Return the result of the call that the future represents. + + Args: + timeout: The number of seconds to wait for the result if the future + isn't done. If None, then there is no limit on the wait time. + + Returns: + The result of the call that the future represents. + + Raises: + CancelledError: If the future was cancelled. + TimeoutError: If the future didn't finish executing before the given + timeout. + Exception: If the call raised then that exception will be raised. + """ + try: + with self._condition: + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self.__get_result() + + self._condition.wait(timeout) + + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self.__get_result() + else: + raise TimeoutError() + finally: + # Break a reference cycle with the exception in self._exception + self = None + + def exception(self, timeout=None): + """Return the exception raised by the call that the future represents. + + Args: + timeout: The number of seconds to wait for the exception if the + future isn't done. If None, then there is no limit on the wait + time. + + Returns: + The exception raised by the call that the future represents or None + if the call completed without raising. + + Raises: + CancelledError: If the future was cancelled. + TimeoutError: If the future didn't finish executing before the given + timeout. + """ + + with self._condition: + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self._exception + + self._condition.wait(timeout) + + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self._exception + else: + raise TimeoutError() + + # The following methods should only be used by Executors and in tests. + def set_running_or_notify_cancel(self): + """Mark the future as running or process any cancel notifications. + + Should only be used by Executor implementations and unit tests. + + If the future has been cancelled (cancel() was called and returned + True) then any threads waiting on the future completing (though calls + to as_completed() or wait()) are notified and False is returned. + + If the future was not cancelled then it is put in the running state + (future calls to running() will return True) and True is returned. + + This method should be called by Executor implementations before + executing the work associated with this future. If this method returns + False then the work should not be executed. + + Returns: + False if the Future was cancelled, True otherwise. + + Raises: + RuntimeError: if this method was already called or if set_result() + or set_exception() was called. + """ + with self._condition: + if self._state == CANCELLED: + self._state = CANCELLED_AND_NOTIFIED + for waiter in self._waiters: + waiter.add_cancelled(self) + # self._condition.notify_all() is not necessary because + # self.cancel() triggers a notification. + return False + elif self._state == PENDING: + self._state = RUNNING + return True + else: + LOGGER.critical('Future %s in unexpected state: %s', + id(self), + self._state) + raise RuntimeError('Future in unexpected state') + + def set_result(self, result): + """Sets the return value of work associated with the future. + + Should only be used by Executor implementations and unit tests. + """ + with self._condition: + if self._state in {CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED}: + raise InvalidStateError('{}: {!r}'.format(self._state, self)) + self._result = result + self._state = FINISHED + for waiter in self._waiters: + waiter.add_result(self) + self._condition.notify_all() + self._invoke_callbacks() + + def set_exception(self, exception): + """Sets the result of the future as being the given exception. + + Should only be used by Executor implementations and unit tests. + """ + with self._condition: + if self._state in {CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED}: + raise InvalidStateError('{}: {!r}'.format(self._state, self)) + self._exception = exception + self._state = FINISHED + for waiter in self._waiters: + waiter.add_exception(self) + self._condition.notify_all() + self._invoke_callbacks() + + __class_getitem__ = classmethod(types.GenericAlias) + +class Executor(object): + """This is an abstract base class for concrete asynchronous executors.""" + + def submit(self, fn, /, *args, **kwargs): + """Submits a callable to be executed with the given arguments. + + Schedules the callable to be executed as fn(*args, **kwargs) and returns + a Future instance representing the execution of the callable. + + Returns: + A Future representing the given call. + """ + raise NotImplementedError() + + def map(self, fn, *iterables, timeout=None, chunksize=1): + """Returns an iterator equivalent to map(fn, iter). + + Args: + fn: A callable that will take as many arguments as there are + passed iterables. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + chunksize: The size of the chunks the iterable will be broken into + before being passed to a child process. This argument is only + used by ProcessPoolExecutor; it is ignored by + ThreadPoolExecutor. + + Returns: + An iterator equivalent to: map(func, *iterables) but the calls may + be evaluated out-of-order. + + Raises: + TimeoutError: If the entire result iterator could not be generated + before the given timeout. + Exception: If fn(*args) raises for any values. + """ + if timeout is not None: + end_time = timeout + time.monotonic() + + fs = [self.submit(fn, *args) for args in zip(*iterables)] + + # Yield must be hidden in closure so that the futures are submitted + # before the first iterator value is required. + def result_iterator(): + try: + # reverse to keep finishing order + fs.reverse() + while fs: + # Careful not to keep a reference to the popped future + if timeout is None: + yield _result_or_cancel(fs.pop()) + else: + yield _result_or_cancel(fs.pop(), end_time - time.monotonic()) + finally: + for future in fs: + future.cancel() + return result_iterator() + + def shutdown(self, wait=True, *, cancel_futures=False): + """Clean-up the resources associated with the Executor. + + It is safe to call this method several times. Otherwise, no other + methods can be called after this one. + + Args: + wait: If True then shutdown will not return until all running + futures have finished executing and the resources used by the + executor have been reclaimed. + cancel_futures: If True then shutdown will cancel all pending + futures. Futures that are completed or running will not be + cancelled. + """ + pass + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.shutdown(wait=True) + return False + + +class BrokenExecutor(RuntimeError): + """ + Raised when a executor has become non-functional after a severe failure. + """ diff --git a/squashfs-root/usr/lib/python3.12/concurrent/futures/process.py b/squashfs-root/usr/lib/python3.12/concurrent/futures/process.py new file mode 100644 index 0000000..0e45288 --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/concurrent/futures/process.py @@ -0,0 +1,884 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Implements ProcessPoolExecutor. + +The following diagram and text describe the data-flow through the system: + +|======================= In-process =====================|== Out-of-process ==| + ++----------+ +----------+ +--------+ +-----------+ +---------+ +| | => | Work Ids | | | | Call Q | | Process | +| | +----------+ | | +-----------+ | Pool | +| | | ... | | | | ... | +---------+ +| | | 6 | => | | => | 5, call() | => | | +| | | 7 | | | | ... | | | +| Process | | ... | | Local | +-----------+ | Process | +| Pool | +----------+ | Worker | | #1..n | +| Executor | | Thread | | | +| | +----------- + | | +-----------+ | | +| | <=> | Work Items | <=> | | <= | Result Q | <= | | +| | +------------+ | | +-----------+ | | +| | | 6: call() | | | | ... | | | +| | | future | | | | 4, result | | | +| | | ... | | | | 3, except | | | ++----------+ +------------+ +--------+ +-----------+ +---------+ + +Executor.submit() called: +- creates a uniquely numbered _WorkItem and adds it to the "Work Items" dict +- adds the id of the _WorkItem to the "Work Ids" queue + +Local worker thread: +- reads work ids from the "Work Ids" queue and looks up the corresponding + WorkItem from the "Work Items" dict: if the work item has been cancelled then + it is simply removed from the dict, otherwise it is repackaged as a + _CallItem and put in the "Call Q". New _CallItems are put in the "Call Q" + until "Call Q" is full. NOTE: the size of the "Call Q" is kept small because + calls placed in the "Call Q" can no longer be cancelled with Future.cancel(). +- reads _ResultItems from "Result Q", updates the future stored in the + "Work Items" dict and deletes the dict entry + +Process #1..n: +- reads _CallItems from "Call Q", executes the calls, and puts the resulting + _ResultItems in "Result Q" +""" + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +import os +from concurrent.futures import _base +import queue +import multiprocessing as mp +# This import is required to load the multiprocessing.connection submodule +# so that it can be accessed later as `mp.connection` +import multiprocessing.connection +from multiprocessing.queues import Queue +import threading +import weakref +from functools import partial +import itertools +import sys +from traceback import format_exception + + +_threads_wakeups = weakref.WeakKeyDictionary() +_global_shutdown = False + + +class _ThreadWakeup: + def __init__(self): + self._closed = False + self._reader, self._writer = mp.Pipe(duplex=False) + + def close(self): + # Please note that we do not take the shutdown lock when + # calling clear() (to avoid deadlocking) so this method can + # only be called safely from the same thread as all calls to + # clear() even if you hold the shutdown lock. Otherwise we + # might try to read from the closed pipe. + if not self._closed: + self._closed = True + self._writer.close() + self._reader.close() + + def wakeup(self): + if not self._closed: + self._writer.send_bytes(b"") + + def clear(self): + if not self._closed: + while self._reader.poll(): + self._reader.recv_bytes() + + +def _python_exit(): + global _global_shutdown + _global_shutdown = True + items = list(_threads_wakeups.items()) + for _, thread_wakeup in items: + # call not protected by ProcessPoolExecutor._shutdown_lock + thread_wakeup.wakeup() + for t, _ in items: + t.join() + +# Register for `_python_exit()` to be called just before joining all +# non-daemon threads. This is used instead of `atexit.register()` for +# compatibility with subinterpreters, which no longer support daemon threads. +# See bpo-39812 for context. +threading._register_atexit(_python_exit) + +# Controls how many more calls than processes will be queued in the call queue. +# A smaller number will mean that processes spend more time idle waiting for +# work while a larger number will make Future.cancel() succeed less frequently +# (Futures in the call queue cannot be cancelled). +EXTRA_QUEUED_CALLS = 1 + + +# On Windows, WaitForMultipleObjects is used to wait for processes to finish. +# It can wait on, at most, 63 objects. There is an overhead of two objects: +# - the result queue reader +# - the thread wakeup reader +_MAX_WINDOWS_WORKERS = 63 - 2 + +# Hack to embed stringification of remote traceback in local traceback + +class _RemoteTraceback(Exception): + def __init__(self, tb): + self.tb = tb + def __str__(self): + return self.tb + +class _ExceptionWithTraceback: + def __init__(self, exc, tb): + tb = ''.join(format_exception(type(exc), exc, tb)) + self.exc = exc + # Traceback object needs to be garbage-collected as its frames + # contain references to all the objects in the exception scope + self.exc.__traceback__ = None + self.tb = '\n"""\n%s"""' % tb + def __reduce__(self): + return _rebuild_exc, (self.exc, self.tb) + +def _rebuild_exc(exc, tb): + exc.__cause__ = _RemoteTraceback(tb) + return exc + +class _WorkItem(object): + def __init__(self, future, fn, args, kwargs): + self.future = future + self.fn = fn + self.args = args + self.kwargs = kwargs + +class _ResultItem(object): + def __init__(self, work_id, exception=None, result=None, exit_pid=None): + self.work_id = work_id + self.exception = exception + self.result = result + self.exit_pid = exit_pid + +class _CallItem(object): + def __init__(self, work_id, fn, args, kwargs): + self.work_id = work_id + self.fn = fn + self.args = args + self.kwargs = kwargs + + +class _SafeQueue(Queue): + """Safe Queue set exception to the future object linked to a job""" + def __init__(self, max_size=0, *, ctx, pending_work_items, shutdown_lock, + thread_wakeup): + self.pending_work_items = pending_work_items + self.shutdown_lock = shutdown_lock + self.thread_wakeup = thread_wakeup + super().__init__(max_size, ctx=ctx) + + def _on_queue_feeder_error(self, e, obj): + if isinstance(obj, _CallItem): + tb = format_exception(type(e), e, e.__traceback__) + e.__cause__ = _RemoteTraceback('\n"""\n{}"""'.format(''.join(tb))) + work_item = self.pending_work_items.pop(obj.work_id, None) + with self.shutdown_lock: + self.thread_wakeup.wakeup() + # work_item can be None if another process terminated. In this + # case, the executor_manager_thread fails all work_items + # with BrokenProcessPool + if work_item is not None: + work_item.future.set_exception(e) + else: + super()._on_queue_feeder_error(e, obj) + + +def _get_chunks(*iterables, chunksize): + """ Iterates over zip()ed iterables in chunks. """ + it = zip(*iterables) + while True: + chunk = tuple(itertools.islice(it, chunksize)) + if not chunk: + return + yield chunk + + +def _process_chunk(fn, chunk): + """ Processes a chunk of an iterable passed to map. + + Runs the function passed to map() on a chunk of the + iterable passed to map. + + This function is run in a separate process. + + """ + return [fn(*args) for args in chunk] + + +def _sendback_result(result_queue, work_id, result=None, exception=None, + exit_pid=None): + """Safely send back the given result or exception""" + try: + result_queue.put(_ResultItem(work_id, result=result, + exception=exception, exit_pid=exit_pid)) + except BaseException as e: + exc = _ExceptionWithTraceback(e, e.__traceback__) + result_queue.put(_ResultItem(work_id, exception=exc, + exit_pid=exit_pid)) + + +def _process_worker(call_queue, result_queue, initializer, initargs, max_tasks=None): + """Evaluates calls from call_queue and places the results in result_queue. + + This worker is run in a separate process. + + Args: + call_queue: A ctx.Queue of _CallItems that will be read and + evaluated by the worker. + result_queue: A ctx.Queue of _ResultItems that will written + to by the worker. + initializer: A callable initializer, or None + initargs: A tuple of args for the initializer + """ + if initializer is not None: + try: + initializer(*initargs) + except BaseException: + _base.LOGGER.critical('Exception in initializer:', exc_info=True) + # The parent will notice that the process stopped and + # mark the pool broken + return + num_tasks = 0 + exit_pid = None + while True: + call_item = call_queue.get(block=True) + if call_item is None: + # Wake up queue management thread + result_queue.put(os.getpid()) + return + + if max_tasks is not None: + num_tasks += 1 + if num_tasks >= max_tasks: + exit_pid = os.getpid() + + try: + r = call_item.fn(*call_item.args, **call_item.kwargs) + except BaseException as e: + exc = _ExceptionWithTraceback(e, e.__traceback__) + _sendback_result(result_queue, call_item.work_id, exception=exc, + exit_pid=exit_pid) + else: + _sendback_result(result_queue, call_item.work_id, result=r, + exit_pid=exit_pid) + del r + + # Liberate the resource as soon as possible, to avoid holding onto + # open files or shared memory that is not needed anymore + del call_item + + if exit_pid is not None: + return + + +class _ExecutorManagerThread(threading.Thread): + """Manages the communication between this process and the worker processes. + + The manager is run in a local thread. + + Args: + executor: A reference to the ProcessPoolExecutor that owns + this thread. A weakref will be own by the manager as well as + references to internal objects used to introspect the state of + the executor. + """ + + def __init__(self, executor): + # Store references to necessary internals of the executor. + + # A _ThreadWakeup to allow waking up the queue_manager_thread from the + # main Thread and avoid deadlocks caused by permanently locked queues. + self.thread_wakeup = executor._executor_manager_thread_wakeup + self.shutdown_lock = executor._shutdown_lock + + # A weakref.ref to the ProcessPoolExecutor that owns this thread. Used + # to determine if the ProcessPoolExecutor has been garbage collected + # and that the manager can exit. + # When the executor gets garbage collected, the weakref callback + # will wake up the queue management thread so that it can terminate + # if there is no pending work item. + def weakref_cb(_, + thread_wakeup=self.thread_wakeup, + shutdown_lock=self.shutdown_lock): + mp.util.debug('Executor collected: triggering callback for' + ' QueueManager wakeup') + with shutdown_lock: + thread_wakeup.wakeup() + + self.executor_reference = weakref.ref(executor, weakref_cb) + + # A list of the ctx.Process instances used as workers. + self.processes = executor._processes + + # A ctx.Queue that will be filled with _CallItems derived from + # _WorkItems for processing by the process workers. + self.call_queue = executor._call_queue + + # A ctx.SimpleQueue of _ResultItems generated by the process workers. + self.result_queue = executor._result_queue + + # A queue.Queue of work ids e.g. Queue([5, 6, ...]). + self.work_ids_queue = executor._work_ids + + # Maximum number of tasks a worker process can execute before + # exiting safely + self.max_tasks_per_child = executor._max_tasks_per_child + + # A dict mapping work ids to _WorkItems e.g. + # {5: <_WorkItem...>, 6: <_WorkItem...>, ...} + self.pending_work_items = executor._pending_work_items + + super().__init__() + + def run(self): + # Main loop for the executor manager thread. + + while True: + # gh-109047: During Python finalization, self.call_queue.put() + # creation of a thread can fail with RuntimeError. + try: + self.add_call_item_to_queue() + except BaseException as exc: + cause = format_exception(exc) + self.terminate_broken(cause) + return + + result_item, is_broken, cause = self.wait_result_broken_or_wakeup() + + if is_broken: + self.terminate_broken(cause) + return + if result_item is not None: + self.process_result_item(result_item) + + process_exited = result_item.exit_pid is not None + if process_exited: + p = self.processes.pop(result_item.exit_pid) + p.join() + + # Delete reference to result_item to avoid keeping references + # while waiting on new results. + del result_item + + if executor := self.executor_reference(): + if process_exited: + with self.shutdown_lock: + executor._adjust_process_count() + else: + executor._idle_worker_semaphore.release() + del executor + + if self.is_shutting_down(): + self.flag_executor_shutting_down() + + # When only canceled futures remain in pending_work_items, our + # next call to wait_result_broken_or_wakeup would hang forever. + # This makes sure we have some running futures or none at all. + self.add_call_item_to_queue() + + # Since no new work items can be added, it is safe to shutdown + # this thread if there are no pending work items. + if not self.pending_work_items: + self.join_executor_internals() + return + + def add_call_item_to_queue(self): + # Fills call_queue with _WorkItems from pending_work_items. + # This function never blocks. + while True: + if self.call_queue.full(): + return + try: + work_id = self.work_ids_queue.get(block=False) + except queue.Empty: + return + else: + work_item = self.pending_work_items[work_id] + + if work_item.future.set_running_or_notify_cancel(): + self.call_queue.put(_CallItem(work_id, + work_item.fn, + work_item.args, + work_item.kwargs), + block=True) + else: + del self.pending_work_items[work_id] + continue + + def wait_result_broken_or_wakeup(self): + # Wait for a result to be ready in the result_queue while checking + # that all worker processes are still running, or for a wake up + # signal send. The wake up signals come either from new tasks being + # submitted, from the executor being shutdown/gc-ed, or from the + # shutdown of the python interpreter. + result_reader = self.result_queue._reader + assert not self.thread_wakeup._closed + wakeup_reader = self.thread_wakeup._reader + readers = [result_reader, wakeup_reader] + worker_sentinels = [p.sentinel for p in list(self.processes.values())] + ready = mp.connection.wait(readers + worker_sentinels) + + cause = None + is_broken = True + result_item = None + if result_reader in ready: + try: + result_item = result_reader.recv() + is_broken = False + except BaseException as exc: + cause = format_exception(exc) + + elif wakeup_reader in ready: + is_broken = False + + # No need to hold the _shutdown_lock here because: + # 1. we're the only thread to use the wakeup reader + # 2. we're also the only thread to call thread_wakeup.close() + # 3. we want to avoid a possible deadlock when both reader and writer + # would block (gh-105829) + self.thread_wakeup.clear() + + return result_item, is_broken, cause + + def process_result_item(self, result_item): + # Process the received a result_item. This can be either the PID of a + # worker that exited gracefully or a _ResultItem + + if isinstance(result_item, int): + # Clean shutdown of a worker using its PID + # (avoids marking the executor broken) + assert self.is_shutting_down() + p = self.processes.pop(result_item) + p.join() + if not self.processes: + self.join_executor_internals() + return + else: + # Received a _ResultItem so mark the future as completed. + work_item = self.pending_work_items.pop(result_item.work_id, None) + # work_item can be None if another process terminated (see above) + if work_item is not None: + if result_item.exception: + work_item.future.set_exception(result_item.exception) + else: + work_item.future.set_result(result_item.result) + + def is_shutting_down(self): + # Check whether we should start shutting down the executor. + executor = self.executor_reference() + # No more work items can be added if: + # - The interpreter is shutting down OR + # - The executor that owns this worker has been collected OR + # - The executor that owns this worker has been shutdown. + return (_global_shutdown or executor is None + or executor._shutdown_thread) + + def _terminate_broken(self, cause): + # Terminate the executor because it is in a broken state. The cause + # argument can be used to display more information on the error that + # lead the executor into becoming broken. + + # Mark the process pool broken so that submits fail right now. + executor = self.executor_reference() + if executor is not None: + executor._broken = ('A child process terminated ' + 'abruptly, the process pool is not ' + 'usable anymore') + executor._shutdown_thread = True + executor = None + + # All pending tasks are to be marked failed with the following + # BrokenProcessPool error + bpe = BrokenProcessPool("A process in the process pool was " + "terminated abruptly while the future was " + "running or pending.") + if cause is not None: + bpe.__cause__ = _RemoteTraceback( + f"\n'''\n{''.join(cause)}'''") + + # Mark pending tasks as failed. + for work_id, work_item in self.pending_work_items.items(): + try: + work_item.future.set_exception(bpe) + except _base.InvalidStateError: + # set_exception() fails if the future is cancelled: ignore it. + # Trying to check if the future is cancelled before calling + # set_exception() would leave a race condition if the future is + # cancelled between the check and set_exception(). + pass + # Delete references to object. See issue16284 + del work_item + self.pending_work_items.clear() + + # Terminate remaining workers forcibly: the queues or their + # locks may be in a dirty state and block forever. + for p in self.processes.values(): + p.terminate() + + self.call_queue._terminate_broken() + + # clean up resources + self._join_executor_internals(broken=True) + + def terminate_broken(self, cause): + with self.shutdown_lock: + self._terminate_broken(cause) + + def flag_executor_shutting_down(self): + # Flag the executor as shutting down and cancel remaining tasks if + # requested as early as possible if it is not gc-ed yet. + executor = self.executor_reference() + if executor is not None: + executor._shutdown_thread = True + # Cancel pending work items if requested. + if executor._cancel_pending_futures: + # Cancel all pending futures and update pending_work_items + # to only have futures that are currently running. + new_pending_work_items = {} + for work_id, work_item in self.pending_work_items.items(): + if not work_item.future.cancel(): + new_pending_work_items[work_id] = work_item + self.pending_work_items = new_pending_work_items + # Drain work_ids_queue since we no longer need to + # add items to the call queue. + while True: + try: + self.work_ids_queue.get_nowait() + except queue.Empty: + break + # Make sure we do this only once to not waste time looping + # on running processes over and over. + executor._cancel_pending_futures = False + + def shutdown_workers(self): + n_children_to_stop = self.get_n_children_alive() + n_sentinels_sent = 0 + # Send the right number of sentinels, to make sure all children are + # properly terminated. + while (n_sentinels_sent < n_children_to_stop + and self.get_n_children_alive() > 0): + for i in range(n_children_to_stop - n_sentinels_sent): + try: + self.call_queue.put_nowait(None) + n_sentinels_sent += 1 + except queue.Full: + break + + def join_executor_internals(self): + with self.shutdown_lock: + self._join_executor_internals() + + def _join_executor_internals(self, broken=False): + # If broken, call_queue was closed and so can no longer be used. + if not broken: + self.shutdown_workers() + + # Release the queue's resources as soon as possible. + self.call_queue.close() + self.call_queue.join_thread() + self.thread_wakeup.close() + + # If .join() is not called on the created processes then + # some ctx.Queue methods may deadlock on Mac OS X. + for p in self.processes.values(): + if broken: + p.terminate() + p.join() + + def get_n_children_alive(self): + # This is an upper bound on the number of children alive. + return sum(p.is_alive() for p in self.processes.values()) + + +_system_limits_checked = False +_system_limited = None + + +def _check_system_limits(): + global _system_limits_checked, _system_limited + if _system_limits_checked: + if _system_limited: + raise NotImplementedError(_system_limited) + _system_limits_checked = True + try: + import multiprocessing.synchronize + except ImportError: + _system_limited = ( + "This Python build lacks multiprocessing.synchronize, usually due " + "to named semaphores being unavailable on this platform." + ) + raise NotImplementedError(_system_limited) + try: + nsems_max = os.sysconf("SC_SEM_NSEMS_MAX") + except (AttributeError, ValueError): + # sysconf not available or setting not available + return + if nsems_max == -1: + # indetermined limit, assume that limit is determined + # by available memory only + return + if nsems_max >= 256: + # minimum number of semaphores available + # according to POSIX + return + _system_limited = ("system provides too few semaphores (%d" + " available, 256 necessary)" % nsems_max) + raise NotImplementedError(_system_limited) + + +def _chain_from_iterable_of_lists(iterable): + """ + Specialized implementation of itertools.chain.from_iterable. + Each item in *iterable* should be a list. This function is + careful not to keep references to yielded objects. + """ + for element in iterable: + element.reverse() + while element: + yield element.pop() + + +class BrokenProcessPool(_base.BrokenExecutor): + """ + Raised when a process in a ProcessPoolExecutor terminated abruptly + while a future was in the running state. + """ + + +class ProcessPoolExecutor(_base.Executor): + def __init__(self, max_workers=None, mp_context=None, + initializer=None, initargs=(), *, max_tasks_per_child=None): + """Initializes a new ProcessPoolExecutor instance. + + Args: + max_workers: The maximum number of processes that can be used to + execute the given calls. If None or not given then as many + worker processes will be created as the machine has processors. + mp_context: A multiprocessing context to launch the workers created + using the multiprocessing.get_context('start method') API. This + object should provide SimpleQueue, Queue and Process. + initializer: A callable used to initialize worker processes. + initargs: A tuple of arguments to pass to the initializer. + max_tasks_per_child: The maximum number of tasks a worker process + can complete before it will exit and be replaced with a fresh + worker process. The default of None means worker process will + live as long as the executor. Requires a non-'fork' mp_context + start method. When given, we default to using 'spawn' if no + mp_context is supplied. + """ + _check_system_limits() + + if max_workers is None: + self._max_workers = os.cpu_count() or 1 + if sys.platform == 'win32': + self._max_workers = min(_MAX_WINDOWS_WORKERS, + self._max_workers) + else: + if max_workers <= 0: + raise ValueError("max_workers must be greater than 0") + elif (sys.platform == 'win32' and + max_workers > _MAX_WINDOWS_WORKERS): + raise ValueError( + f"max_workers must be <= {_MAX_WINDOWS_WORKERS}") + + self._max_workers = max_workers + + if mp_context is None: + if max_tasks_per_child is not None: + mp_context = mp.get_context("spawn") + else: + mp_context = mp.get_context() + self._mp_context = mp_context + + # https://github.com/python/cpython/issues/90622 + self._safe_to_dynamically_spawn_children = ( + self._mp_context.get_start_method(allow_none=False) != "fork") + + if initializer is not None and not callable(initializer): + raise TypeError("initializer must be a callable") + self._initializer = initializer + self._initargs = initargs + + if max_tasks_per_child is not None: + if not isinstance(max_tasks_per_child, int): + raise TypeError("max_tasks_per_child must be an integer") + elif max_tasks_per_child <= 0: + raise ValueError("max_tasks_per_child must be >= 1") + if self._mp_context.get_start_method(allow_none=False) == "fork": + # https://github.com/python/cpython/issues/90622 + raise ValueError("max_tasks_per_child is incompatible with" + " the 'fork' multiprocessing start method;" + " supply a different mp_context.") + self._max_tasks_per_child = max_tasks_per_child + + # Management thread + self._executor_manager_thread = None + + # Map of pids to processes + self._processes = {} + + # Shutdown is a two-step process. + self._shutdown_thread = False + self._shutdown_lock = threading.Lock() + self._idle_worker_semaphore = threading.Semaphore(0) + self._broken = False + self._queue_count = 0 + self._pending_work_items = {} + self._cancel_pending_futures = False + + # _ThreadWakeup is a communication channel used to interrupt the wait + # of the main loop of executor_manager_thread from another thread (e.g. + # when calling executor.submit or executor.shutdown). We do not use the + # _result_queue to send wakeup signals to the executor_manager_thread + # as it could result in a deadlock if a worker process dies with the + # _result_queue write lock still acquired. + # + # _shutdown_lock must be locked to access _ThreadWakeup.close() and + # .wakeup(). Care must also be taken to not call clear or close from + # more than one thread since _ThreadWakeup.clear() is not protected by + # the _shutdown_lock + self._executor_manager_thread_wakeup = _ThreadWakeup() + + # Create communication channels for the executor + # Make the call queue slightly larger than the number of processes to + # prevent the worker processes from idling. But don't make it too big + # because futures in the call queue cannot be cancelled. + queue_size = self._max_workers + EXTRA_QUEUED_CALLS + self._call_queue = _SafeQueue( + max_size=queue_size, ctx=self._mp_context, + pending_work_items=self._pending_work_items, + shutdown_lock=self._shutdown_lock, + thread_wakeup=self._executor_manager_thread_wakeup) + # Killed worker processes can produce spurious "broken pipe" + # tracebacks in the queue's own worker thread. But we detect killed + # processes anyway, so silence the tracebacks. + self._call_queue._ignore_epipe = True + self._result_queue = mp_context.SimpleQueue() + self._work_ids = queue.Queue() + + def _start_executor_manager_thread(self): + if self._executor_manager_thread is None: + # Start the processes so that their sentinels are known. + if not self._safe_to_dynamically_spawn_children: # ie, using fork. + self._launch_processes() + self._executor_manager_thread = _ExecutorManagerThread(self) + self._executor_manager_thread.start() + _threads_wakeups[self._executor_manager_thread] = \ + self._executor_manager_thread_wakeup + + def _adjust_process_count(self): + # if there's an idle process, we don't need to spawn a new one. + if self._idle_worker_semaphore.acquire(blocking=False): + return + + process_count = len(self._processes) + if process_count < self._max_workers: + # Assertion disabled as this codepath is also used to replace a + # worker that unexpectedly dies, even when using the 'fork' start + # method. That means there is still a potential deadlock bug. If a + # 'fork' mp_context worker dies, we'll be forking a new one when + # we know a thread is running (self._executor_manager_thread). + #assert self._safe_to_dynamically_spawn_children or not self._executor_manager_thread, 'https://github.com/python/cpython/issues/90622' + self._spawn_process() + + def _launch_processes(self): + # https://github.com/python/cpython/issues/90622 + assert not self._executor_manager_thread, ( + 'Processes cannot be fork()ed after the thread has started, ' + 'deadlock in the child processes could result.') + for _ in range(len(self._processes), self._max_workers): + self._spawn_process() + + def _spawn_process(self): + p = self._mp_context.Process( + target=_process_worker, + args=(self._call_queue, + self._result_queue, + self._initializer, + self._initargs, + self._max_tasks_per_child)) + p.start() + self._processes[p.pid] = p + + def submit(self, fn, /, *args, **kwargs): + with self._shutdown_lock: + if self._broken: + raise BrokenProcessPool(self._broken) + if self._shutdown_thread: + raise RuntimeError('cannot schedule new futures after shutdown') + if _global_shutdown: + raise RuntimeError('cannot schedule new futures after ' + 'interpreter shutdown') + + f = _base.Future() + w = _WorkItem(f, fn, args, kwargs) + + self._pending_work_items[self._queue_count] = w + self._work_ids.put(self._queue_count) + self._queue_count += 1 + # Wake up queue management thread + self._executor_manager_thread_wakeup.wakeup() + + if self._safe_to_dynamically_spawn_children: + self._adjust_process_count() + self._start_executor_manager_thread() + return f + submit.__doc__ = _base.Executor.submit.__doc__ + + def map(self, fn, *iterables, timeout=None, chunksize=1): + """Returns an iterator equivalent to map(fn, iter). + + Args: + fn: A callable that will take as many arguments as there are + passed iterables. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + chunksize: If greater than one, the iterables will be chopped into + chunks of size chunksize and submitted to the process pool. + If set to one, the items in the list will be sent one at a time. + + Returns: + An iterator equivalent to: map(func, *iterables) but the calls may + be evaluated out-of-order. + + Raises: + TimeoutError: If the entire result iterator could not be generated + before the given timeout. + Exception: If fn(*args) raises for any values. + """ + if chunksize < 1: + raise ValueError("chunksize must be >= 1.") + + results = super().map(partial(_process_chunk, fn), + _get_chunks(*iterables, chunksize=chunksize), + timeout=timeout) + return _chain_from_iterable_of_lists(results) + + def shutdown(self, wait=True, *, cancel_futures=False): + with self._shutdown_lock: + self._cancel_pending_futures = cancel_futures + self._shutdown_thread = True + if self._executor_manager_thread_wakeup is not None: + # Wake up queue management thread + self._executor_manager_thread_wakeup.wakeup() + + if self._executor_manager_thread is not None and wait: + self._executor_manager_thread.join() + # To reduce the risk of opening too many files, remove references to + # objects that use file descriptors. + self._executor_manager_thread = None + self._call_queue = None + if self._result_queue is not None and wait: + self._result_queue.close() + self._result_queue = None + self._processes = None + self._executor_manager_thread_wakeup = None + + shutdown.__doc__ = _base.Executor.shutdown.__doc__ diff --git a/squashfs-root/usr/lib/python3.12/concurrent/futures/thread.py b/squashfs-root/usr/lib/python3.12/concurrent/futures/thread.py new file mode 100644 index 0000000..3b3a36a --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/concurrent/futures/thread.py @@ -0,0 +1,239 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Implements ThreadPoolExecutor.""" + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +from concurrent.futures import _base +import itertools +import queue +import threading +import types +import weakref +import os + + +_threads_queues = weakref.WeakKeyDictionary() +_shutdown = False +# Lock that ensures that new workers are not created while the interpreter is +# shutting down. Must be held while mutating _threads_queues and _shutdown. +_global_shutdown_lock = threading.Lock() + +def _python_exit(): + global _shutdown + with _global_shutdown_lock: + _shutdown = True + items = list(_threads_queues.items()) + for t, q in items: + q.put(None) + for t, q in items: + t.join() + +# Register for `_python_exit()` to be called just before joining all +# non-daemon threads. This is used instead of `atexit.register()` for +# compatibility with subinterpreters, which no longer support daemon threads. +# See bpo-39812 for context. +threading._register_atexit(_python_exit) + +# At fork, reinitialize the `_global_shutdown_lock` lock in the child process +if hasattr(os, 'register_at_fork'): + os.register_at_fork(before=_global_shutdown_lock.acquire, + after_in_child=_global_shutdown_lock._at_fork_reinit, + after_in_parent=_global_shutdown_lock.release) + + +class _WorkItem: + def __init__(self, future, fn, args, kwargs): + self.future = future + self.fn = fn + self.args = args + self.kwargs = kwargs + + def run(self): + if not self.future.set_running_or_notify_cancel(): + return + + try: + result = self.fn(*self.args, **self.kwargs) + except BaseException as exc: + self.future.set_exception(exc) + # Break a reference cycle with the exception 'exc' + self = None + else: + self.future.set_result(result) + + __class_getitem__ = classmethod(types.GenericAlias) + + +def _worker(executor_reference, work_queue, initializer, initargs): + if initializer is not None: + try: + initializer(*initargs) + except BaseException: + _base.LOGGER.critical('Exception in initializer:', exc_info=True) + executor = executor_reference() + if executor is not None: + executor._initializer_failed() + return + try: + while True: + try: + work_item = work_queue.get_nowait() + except queue.Empty: + # attempt to increment idle count if queue is empty + executor = executor_reference() + if executor is not None: + executor._idle_semaphore.release() + del executor + work_item = work_queue.get(block=True) + + if work_item is not None: + work_item.run() + # Delete references to object. See GH-60488 + del work_item + continue + + executor = executor_reference() + # Exit if: + # - The interpreter is shutting down OR + # - The executor that owns the worker has been collected OR + # - The executor that owns the worker has been shutdown. + if _shutdown or executor is None or executor._shutdown: + # Flag the executor as shutting down as early as possible if it + # is not gc-ed yet. + if executor is not None: + executor._shutdown = True + # Notice other workers + work_queue.put(None) + return + del executor + except BaseException: + _base.LOGGER.critical('Exception in worker', exc_info=True) + + +class BrokenThreadPool(_base.BrokenExecutor): + """ + Raised when a worker thread in a ThreadPoolExecutor failed initializing. + """ + + +class ThreadPoolExecutor(_base.Executor): + + # Used to assign unique thread names when thread_name_prefix is not supplied. + _counter = itertools.count().__next__ + + def __init__(self, max_workers=None, thread_name_prefix='', + initializer=None, initargs=()): + """Initializes a new ThreadPoolExecutor instance. + + Args: + max_workers: The maximum number of threads that can be used to + execute the given calls. + thread_name_prefix: An optional name prefix to give our threads. + initializer: A callable used to initialize worker threads. + initargs: A tuple of arguments to pass to the initializer. + """ + if max_workers is None: + # ThreadPoolExecutor is often used to: + # * CPU bound task which releases GIL + # * I/O bound task (which releases GIL, of course) + # + # We use cpu_count + 4 for both types of tasks. + # But we limit it to 32 to avoid consuming surprisingly large resource + # on many core machine. + max_workers = min(32, (os.cpu_count() or 1) + 4) + if max_workers <= 0: + raise ValueError("max_workers must be greater than 0") + + if initializer is not None and not callable(initializer): + raise TypeError("initializer must be a callable") + + self._max_workers = max_workers + self._work_queue = queue.SimpleQueue() + self._idle_semaphore = threading.Semaphore(0) + self._threads = set() + self._broken = False + self._shutdown = False + self._shutdown_lock = threading.Lock() + self._thread_name_prefix = (thread_name_prefix or + ("ThreadPoolExecutor-%d" % self._counter())) + self._initializer = initializer + self._initargs = initargs + + def submit(self, fn, /, *args, **kwargs): + with self._shutdown_lock, _global_shutdown_lock: + if self._broken: + raise BrokenThreadPool(self._broken) + + if self._shutdown: + raise RuntimeError('cannot schedule new futures after shutdown') + if _shutdown: + raise RuntimeError('cannot schedule new futures after ' + 'interpreter shutdown') + + f = _base.Future() + w = _WorkItem(f, fn, args, kwargs) + + self._work_queue.put(w) + self._adjust_thread_count() + return f + submit.__doc__ = _base.Executor.submit.__doc__ + + def _adjust_thread_count(self): + # if idle threads are available, don't spin new threads + if self._idle_semaphore.acquire(timeout=0): + return + + # When the executor gets lost, the weakref callback will wake up + # the worker threads. + def weakref_cb(_, q=self._work_queue): + q.put(None) + + num_threads = len(self._threads) + if num_threads < self._max_workers: + thread_name = '%s_%d' % (self._thread_name_prefix or self, + num_threads) + t = threading.Thread(name=thread_name, target=_worker, + args=(weakref.ref(self, weakref_cb), + self._work_queue, + self._initializer, + self._initargs)) + t.start() + self._threads.add(t) + _threads_queues[t] = self._work_queue + + def _initializer_failed(self): + with self._shutdown_lock: + self._broken = ('A thread initializer failed, the thread pool ' + 'is not usable anymore') + # Drain work queue and mark pending futures failed + while True: + try: + work_item = self._work_queue.get_nowait() + except queue.Empty: + break + if work_item is not None: + work_item.future.set_exception(BrokenThreadPool(self._broken)) + + def shutdown(self, wait=True, *, cancel_futures=False): + with self._shutdown_lock: + self._shutdown = True + if cancel_futures: + # Drain all work items from the queue, and then cancel their + # associated futures. + while True: + try: + work_item = self._work_queue.get_nowait() + except queue.Empty: + break + if work_item is not None: + work_item.future.cancel() + + # Send a wake-up to prevent threads calling + # _work_queue.get(block=True) from permanently blocking. + self._work_queue.put(None) + if wait: + for t in self._threads: + t.join() + shutdown.__doc__ = _base.Executor.shutdown.__doc__ diff --git a/squashfs-root/usr/lib/python3.12/configparser.py b/squashfs-root/usr/lib/python3.12/configparser.py new file mode 100644 index 0000000..f96704e --- /dev/null +++ b/squashfs-root/usr/lib/python3.12/configparser.py @@ -0,0 +1,1333 @@ +"""Configuration file parser. + +A configuration file consists of sections, lead by a "[section]" header, +and followed by "name: value" entries, with continuations and such in +the style of RFC 822. + +Intrinsic defaults can be specified by passing them into the +ConfigParser constructor as a dictionary. + +class: + +ConfigParser -- responsible for parsing a list of + configuration files, and managing the parsed database. + + methods: + + __init__(defaults=None, dict_type=_default_dict, allow_no_value=False, + delimiters=('=', ':'), comment_prefixes=('#', ';'), + inline_comment_prefixes=None, strict=True, + empty_lines_in_values=True, default_section='DEFAULT', + interpolation=, converters=): + + Create the parser. When `defaults` is given, it is initialized into the + dictionary or intrinsic defaults. The keys must be strings, the values + must be appropriate for %()s string interpolation. + + When `dict_type` is given, it will be used to create the dictionary + objects for the list of sections, for the options within a section, and + for the default values. + + When `delimiters` is given, it will be used as the set of substrings + that divide keys from values. + + When `comment_prefixes` is given, it will be used as the set of + substrings that prefix comments in empty lines. Comments can be + indented. + + When `inline_comment_prefixes` is given, it will be used as the set of + substrings that prefix comments in non-empty lines. + + When `strict` is True, the parser won't allow for any section or option + duplicates while reading from a single source (file, string or + dictionary). Default is True. + + When `empty_lines_in_values` is False (default: True), each empty line + marks the end of an option. Otherwise, internal empty lines of + a multiline option are kept as part of the value. + + When `allow_no_value` is True (default: False), options without + values are accepted; the value presented for these is None. + + When `default_section` is given, the name of the special section is + named accordingly. By default it is called ``"DEFAULT"`` but this can + be customized to point to any other valid section name. Its current + value can be retrieved using the ``parser_instance.default_section`` + attribute and may be modified at runtime. + + When `interpolation` is given, it should be an Interpolation subclass + instance. It will be used as the handler for option value + pre-processing when using getters. RawConfigParser objects don't do + any sort of interpolation, whereas ConfigParser uses an instance of + BasicInterpolation. The library also provides a ``zc.buildout`` + inspired ExtendedInterpolation implementation. + + When `converters` is given, it should be a dictionary where each key + represents the name of a type converter and each value is a callable + implementing the conversion from string to the desired datatype. Every + converter gets its corresponding get*() method on the parser object and + section proxies. + + sections() + Return all the configuration section names, sans DEFAULT. + + has_section(section) + Return whether the given section exists. + + has_option(section, option) + Return whether the given option exists in the given section. + + options(section) + Return list of configuration options for the named section. + + read(filenames, encoding=None) + Read and parse the iterable of named configuration files, given by + name. A single filename is also allowed. Non-existing files + are ignored. Return list of successfully read files. + + read_file(f, filename=None) + Read and parse one configuration file, given as a file object. + The filename defaults to f.name; it is only used in error + messages (if f has no `name` attribute, the string `` is used). + + read_string(string) + Read configuration from a given string. + + read_dict(dictionary) + Read configuration from a dictionary. Keys are section names, + values are dictionaries with keys and values that should be present + in the section. If the used dictionary type preserves order, sections + and their keys will be added in order. Values are automatically + converted to strings. + + get(section, option, raw=False, vars=None, fallback=_UNSET) + Return a string value for the named option. All % interpolations are + expanded in the return values, based on the defaults passed into the + constructor and the DEFAULT section. Additional substitutions may be + provided using the `vars` argument, which must be a dictionary whose + contents override any pre-existing defaults. If `option` is a key in + `vars`, the value from `vars` is used. + + getint(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to an integer. + + getfloat(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to a float. + + getboolean(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to a boolean (currently case + insensitively defined as 0, false, no, off for False, and 1, true, + yes, on for True). Returns False or True. + + items(section=_UNSET, raw=False, vars=None) + If section is given, return a list of tuples with (name, value) for + each option in the section. Otherwise, return a list of tuples with + (section_name, section_proxy) for each section, including DEFAULTSECT. + + remove_section(section) + Remove the given file section and all its options. + + remove_option(section, option) + Remove the given option from the given section. + + set(section, option, value) + Set the given option. + + write(fp, space_around_delimiters=True) + Write the configuration state in .ini format. If + `space_around_delimiters` is True (the default), delimiters + between keys and values are surrounded by spaces. +""" + +from collections.abc import MutableMapping +from collections import ChainMap as _ChainMap +import functools +import io +import itertools +import os +import re +import sys +import warnings + +__all__ = ("NoSectionError", "DuplicateOptionError", "DuplicateSectionError", + "NoOptionError", "InterpolationError", "InterpolationDepthError", + "InterpolationMissingOptionError", "InterpolationSyntaxError", + "ParsingError", "MissingSectionHeaderError", + "ConfigParser", "RawConfigParser", + "Interpolation", "BasicInterpolation", "ExtendedInterpolation", + "LegacyInterpolation", "SectionProxy", "ConverterMapping", + "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH") + +_default_dict = dict +DEFAULTSECT = "DEFAULT" + +MAX_INTERPOLATION_DEPTH = 10 + + + +# exception classes +class Error(Exception): + """Base class for ConfigParser exceptions.""" + + def __init__(self, msg=''): + self.message = msg + Exception.__init__(self, msg) + + def __repr__(self): + return self.message + + __str__ = __repr__ + + +class NoSectionError(Error): + """Raised when no section matches a requested option.""" + + def __init__(self, section): + Error.__init__(self, 'No section: %r' % (section,)) + self.section = section + self.args = (section, ) + + +class DuplicateSectionError(Error): + """Raised when a section is repeated in an input source. + + Possible repetitions that raise this exception are: multiple creation + using the API or in strict parsers when a section is found more than once + in a single input file, string or dictionary. + """ + + def __init__(self, section, source=None, lineno=None): + msg = [repr(section), " already exists"] + if source is not None: + message = ["While reading from ", repr(source)] + if lineno is not None: + message.append(" [line {0:2d}]".format(lineno)) + message.append(": section ") + message.extend(msg) + msg = message + else: + msg.insert(0, "Section ") + Error.__init__(self, "".join(msg)) + self.section = section + self.source = source + self.lineno = lineno + self.args = (section, source, lineno) + + +class DuplicateOptionError(Error): + """Raised by strict parsers when an option is repeated in an input source. + + Current implementation raises this exception only when an option is found + more than once in a single file, string or dictionary. + """ + + def __init__(self, section, option, source=None, lineno=None): + msg = [repr(option), " in section ", repr(section), + " already exists"] + if source is not None: + message = ["While reading from ", repr(source)] + if lineno is not None: + message.append(" [line {0:2d}]".format(lineno)) + message.append(": option ") + message.extend(msg) + msg = message + else: + msg.insert(0, "Option ") + Error.__init__(self, "".join(msg)) + self.section = section + self.option = option + self.source = source + self.lineno = lineno + self.args = (section, option, source, lineno) + + +class NoOptionError(Error): + """A requested option was not found.""" + + def __init__(self, option, section): + Error.__init__(self, "No option %r in section: %r" % + (option, section)) + self.option = option + self.section = section + self.args = (option, section) + + +class InterpolationError(Error): + """Base class for interpolation-related exceptions.""" + + def __init__(self, option, section, msg): + Error.__init__(self, msg) + self.option = option + self.section = section + self.args = (option, section, msg) + + +class InterpolationMissingOptionError(InterpolationError): + """A string substitution required a setting which was not available.""" + + def __init__(self, option, section, rawval, reference): + msg = ("Bad value substitution: option {!r} in section {!r} contains " + "an interpolation key {!r} which is not a valid option name. " + "Raw value: {!r}".format(option, section, reference, rawval)) + InterpolationError.__init__(self, option, section, msg) + self.reference = reference + self.args = (option, section, rawval, reference) + + +class InterpolationSyntaxError(InterpolationError): + """Raised when the source text contains invalid syntax. + + Current implementation raises this exception when the source text into + which substitutions are made does not conform to the required syntax. + """ + + +class InterpolationDepthError(InterpolationError): + """Raised when substitutions are nested too deeply.""" + + def __init__(self, option, section, rawval): + msg = ("Recursion limit exceeded in value substitution: option {!r} " + "in section {!r} contains an interpolation key which " + "cannot be substituted in {} steps. Raw value: {!r}" + "".format(option, section, MAX_INTERPOLATION_DEPTH, + rawval)) + InterpolationError.__init__(self, option, section, msg) + self.args = (option, section, rawval) + + +class ParsingError(Error): + """Raised when a configuration file does not follow legal syntax.""" + + def __init__(self, source): + super().__init__(f'Source contains parsing errors: {source!r}') + self.source = source + self.errors = [] + self.args = (source, ) + + def append(self, lineno, line): + self.errors.append((lineno, line)) + self.message += '\n\t[line %2d]: %s' % (lineno, line) + + +class MissingSectionHeaderError(ParsingError): + """Raised when a key-value pair is found before any section header.""" + + def __init__(self, filename, lineno, line): + Error.__init__( + self, + 'File contains no section headers.\nfile: %r, line: %d\n%r' % + (filename, lineno, line)) + self.source = filename + self.lineno = lineno + self.line = line + self.args = (filename, lineno, line) + + +# Used in parser getters to indicate the default behaviour when a specific +# option is not found it to raise an exception. Created to enable `None` as +# a valid fallback value. +_UNSET = object() + + +class Interpolation: + """Dummy interpolation that passes the value through with no changes.""" + + def before_get(self, parser, section, option, value, defaults): + return value + + def before_set(self, parser, section, option, value): + return value + + def before_read(self, parser, section, option, value): + return value + + def before_write(self, parser, section, option, value): + return value + + +class BasicInterpolation(Interpolation): + """Interpolation as implemented in the classic ConfigParser. + + The option values can contain format strings which refer to other values in + the same section, or values in the special default section. + + For example: + + something: %(dir)s/whatever + + would resolve the "%(dir)s" to the value of dir. All reference + expansions are done late, on demand. If a user needs to use a bare % in + a configuration file, she can escape it by writing %%. Other % usage + is considered a user error and raises `InterpolationSyntaxError`.""" + + _KEYCRE = re.compile(r"%\(([^)]+)\)s") + + def before_get(self, parser, section, option, value, defaults): + L = [] + self._interpolate_some(parser, option, L, value, section, defaults, 1) + return ''.join(L) + + def before_set(self, parser, section, option, value): + tmp_value = value.replace('%%', '') # escaped percent signs + tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax + if '%' in tmp_value: + raise ValueError("invalid interpolation syntax in %r at " + "position %d" % (value, tmp_value.find('%'))) + return value + + def _interpolate_some(self, parser, option, accum, rest, section, map, + depth): + rawval = parser.get(section, option, raw=True, fallback=rest) + if depth > MAX_INTERPOLATION_DEPTH: + raise InterpolationDepthError(option, section, rawval) + while rest: + p = rest.find("%") + if p < 0: + accum.append(rest) + return + if p > 0: + accum.append(rest[:p]) + rest = rest[p:] + # p is no longer used + c = rest[1:2] + if c == "%": + accum.append("%") + rest = rest[2:] + elif c == "(": + m = self._KEYCRE.match(rest) + if m is None: + raise InterpolationSyntaxError(option, section, + "bad interpolation variable reference %r" % rest) + var = parser.optionxform(m.group(1)) + rest = rest[m.end():] + try: + v = map[var] + except KeyError: + raise InterpolationMissingOptionError( + option, section, rawval, var) from None + if "%" in v: + self._interpolate_some(parser, option, accum, v, + section, map, depth + 1) + else: + accum.append(v) + else: + raise InterpolationSyntaxError( + option, section, + "'%%' must be followed by '%%' or '(', " + "found: %r" % (rest,)) + + +class ExtendedInterpolation(Interpolation): + """Advanced variant of interpolation, supports the syntax used by + `zc.buildout`. Enables interpolation between sections.""" + + _KEYCRE = re.compile(r"\$\{([^}]+)\}") + + def before_get(self, parser, section, option, value, defaults): + L = [] + self._interpolate_some(parser, option, L, value, section, defaults, 1) + return ''.join(L) + + def before_set(self, parser, section, option, value): + tmp_value = value.replace('$$', '') # escaped dollar signs + tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax + if '$' in tmp_value: + raise ValueError("invalid interpolation syntax in %r at " + "position %d" % (value, tmp_value.find('$'))) + return value + + def _interpolate_some(self, parser, option, accum, rest, section, map, + depth): + rawval = parser.get(section, option, raw=True, fallback=rest) + if depth > MAX_INTERPOLATION_DEPTH: + raise InterpolationDepthError(option, section, rawval) + while rest: + p = rest.find("$") + if p < 0: + accum.append(rest) + return + if p > 0: + accum.append(rest[:p]) + rest = rest[p:] + # p is no longer used + c = rest[1:2] + if c == "$": + accum.append("$") + rest = rest[2:] + elif c == "{": + m = self._KEYCRE.match(rest) + if m is None: + raise InterpolationSyntaxError(option, section, + "bad interpolation variable reference %r" % rest) + path = m.group(1).split(':') + rest = rest[m.end():] + sect = section + opt = option + try: + if len(path) == 1: + opt = parser.optionxform(path[0]) + v = map[opt] + elif len(path) == 2: + sect = path[0] + opt = parser.optionxform(path[1]) + v = parser.get(sect, opt, raw=True) + else: + raise InterpolationSyntaxError( + option, section, + "More than one ':' found: %r" % (rest,)) + except (KeyError, NoSectionError, NoOptionError): + raise InterpolationMissingOptionError( + option, section, rawval, ":".join(path)) from None + if "$" in v: + self._interpolate_some(parser, opt, accum, v, sect, + dict(parser.items(sect, raw=True)), + depth + 1) + else: + accum.append(v) + else: + raise InterpolationSyntaxError( + option, section, + "'$' must be followed by '$' or '{', " + "found: %r" % (rest,)) + + +class LegacyInterpolation(Interpolation): + """Deprecated interpolation used in old versions of ConfigParser. + Use BasicInterpolation or ExtendedInterpolation instead.""" + + _KEYCRE = re.compile(r"%\(([^)]*)\)s|.") + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn( + "LegacyInterpolation has been deprecated since Python 3.2 " + "and will be removed from the configparser module in Python 3.13. " + "Use BasicInterpolation or ExtendedInterpolation instead.", + DeprecationWarning, stacklevel=2 + ) + + def before_get(self, parser, section, option, value, vars): + rawval = value + depth = MAX_INTERPOLATION_DEPTH + while depth: # Loop through this until it's done + depth -= 1 + if value and "%(" in value: + replace = functools.partial(self._interpolation_replace, + parser=parser) + value = self._KEYCRE.sub(replace, value) + try: + value = value % vars + except KeyError as e: + raise InterpolationMissingOptionError( + option, section, rawval, e.args[0]) from None + else: + break + if value and "%(" in value: + raise InterpolationDepthError(option, section, rawval) + return value + + def before_set(self, parser, section, option, value): + return value + + @staticmethod + def _interpolation_replace(match, parser): + s = match.group(1) + if s is None: + return match.group() + else: + return "%%(%s)s" % parser.optionxform(s) + + +class RawConfigParser(MutableMapping): + """ConfigParser that does not do interpolation.""" + + # Regular expressions for parsing section headers and options + _SECT_TMPL = r""" + \[ # [ + (?P
.+) # very permissive! + \] # ] + """ + _OPT_TMPL = r""" + (?P