GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘ޝpß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Аè•m"сœn|@›U¶ÆÎž—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X ÓØ)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oа^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 143.110.188.43  /  Your IP : 216.73.217.31
Web Server : Apache/2.4.57 (Ubuntu)
System : Linux Client-Droplet 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:10:09 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.10-2ubuntu2.2
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /snap/core26/current/snap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/core26/current/snap/snapcraft.yaml
name: core26
adopt-info: build-env
summary: Runtime environment based on Ubuntu 26.04
description: |
  The base snap based on the Ubuntu 26.04 release.
confinement: strict
type: base
build-base: core26
grade: stable
assumes:
  - snapd2.55.5
  # This is uncommented in our github builds for riscv64
  ## - isa-riscv64-rva23

parts:
  build-env:
    plugin: nil
    # To retrigger the pull step automatically on changes.
    source: .
    override-pull: |
      # We use a file with env vars in $CRAFT_PROJECT_DIR to decide whether to
      # include cloud-init or not. This file can be manually created for local
      # builds, or created here if we are running from a launchpad recipe with
      # suffix -cloud-init. This is detected by looking at the
      # SNAPCRAFT_IMAGE_INFO env var injected in LP, which tells us the build
      # url and has a form like:
      #
      # {
      #   "build-request-id": "lp-<id>",
      #   "build-request-timestamp": "<time>",
      #   "build_url": "https://launchpad.net/~ubuntu-core-service/+snap/core26-cloud-init/+build/<build_id>"
      # }
      #
      # (although in one line).
      if ! [ -e "$CRAFT_PROJECT_DIR"/build-env ]; then
        (
            cd "${CRAFT_PART_SRC}"
            touch build-env
            # parse the snap name from the url, and remove the prefix "core26-" and 
            # suffix "/+build" to get the variant name, if any.
            if [ -n "${SNAPCRAFT_IMAGE_INFO+x}" ]; then
              SNAP_BUILD_VARIANT=$(printf '%s' "$SNAPCRAFT_IMAGE_INFO" | grep -oP '(?<=core26-)[^/]*(?=/\+build)' || true)
              if [ -n "$SNAP_BUILD_VARIANT" ]; then
                  echo "SNAP_BUILD_VARIANT=$SNAP_BUILD_VARIANT" > build-env
              fi
            fi
        )
      else
        # copy to install dir so that we can use it in the build step
        cp "$CRAFT_PROJECT_DIR"/build-env "${CRAFT_PART_SRC}"/build-env
      fi

      date_tag=$("$CRAFT_PROJECT_DIR"/get-version.sh)

      # make sure we load the build-env here, especially if we're using
      # the locally sourced one.
      . "${CRAFT_PART_SRC}"/build-env
      SNAP_BUILD_VARIANT=${SNAP_BUILD_VARIANT:-}

      # handle build variants
      if [ -n "$SNAP_BUILD_VARIANT" ]; then
        craftctl set version="${date_tag}+$SNAP_BUILD_VARIANT"
        echo "SNAP_BUILD_NAME=core26-$SNAP_BUILD_VARIANT" >> "${CRAFT_PART_SRC}"/build-env
      else
        craftctl set version="${date_tag}"
        echo "SNAP_BUILD_NAME=core26" > "${CRAFT_PART_SRC}"/build-env
      fi
    override-build: |
      cp "${CRAFT_PART_SRC}"/build-env "${CRAFT_PART_INSTALL}"/build-env
    prime:
      - -build-env

  # TODO: rewrite this once all slices are upstreamed to use chisel slices
  # directly from canonical, instead of our own chisel-releases repo.
  chisel-libs:
    after:
      - build-env
    plugin: nil
    build-packages:
      - golang
      - file
    source: https://github.com/canonical/chisel-ubuntu-core.git
    source-type: git
    source-branch: '26.04'
    override-build: |
      go install github.com/canonical/chisel/cmd/chisel@latest
      
      # Define the system utilities that we want to include in the base
      # These are the ones where we can probably slim down the number of binaries
      # later on, but for now we include them all to ensure maximum compatibility.
      UTILS=(
        apparmor_bins
        bash_bins
        bzip2_scripts
        coreutils-from-uutils_bins
        diffutils_bins
        dosfstools_bins
        debianutils_which
        debianutils_ischroot
        debianutils_run-parts
        file_bins
        gdbserver_bins
        gnu-coreutils_bins
        gnutls-bin_bins
        gpgv_bins
        grep_bins
        gzip_scripts
        hostname_bins
        iptables_bins
        iputils-ping_bins
        less_bins
        login_bins
        mawk_bins
        ncurses-bin_bins
        polkitd_bins
        rfkill_bins
        sed_bins
        sudo-rs_bins
        sysvinit-utils_scripts
        squashfs-tools_bins
        tar_bins
        util-linux_bins
        util-linux_nsenter
        util-linux-extra_pivot-root
        util-linux-extra_hardware
        util-linux-extra_process
        util-linux-extra_login
        vim-tiny_bins
      )

      # Define the system libraries and services that we want to include in the base
      # 
      SLICES=(
        apparmor_systemd
        base-files_motd
        base-files_locale
        base-files_profile
        base-files_release-info
        base-files_root-defaults
        bash-completion_config
        bash-completion_completions
        ca-certificates_data-with-certs
        cracklib-runtime_bins
        cryptsetup_bins
        cryptsetup-bin_bins
        dbus_services
        dbus-user-session_services
        dhcpcd-base_standard
        distro-info-data_data
        dmsetup_rules
        e2fsprogs_services
        e2fsprogs_standard
        fdisk_bins
        fonts-ubuntu_all
        fonts-ubuntu_config
        finalrd_services
        iproute2_bins
        kmod_bins
        kmod_config

        libc6_config
        libc6_gconv
        libc-bin_iconv
        libc-bin_nsswitch
        libc-bin_ldconfig
        libc-bin_locale
        libc-bin_getconf
        libc-bin_getent

        libpam-modules_config
        libpam-modules_pam-config
        libpam-pwquality_pam-config
        libpam-modules-bin_standard
        libpam-modules-bin_extrausers
        libpam-modules-bin_namespace
        libpam-modules-bin_timestamp
        libpam-systemd_libs
        libengine-pkcs11-openssl_libs
        libgnutls30t64_config
        libopts25_libs
        libp11-3t64_libs
        libnss-mdns_mdns4-minimal
        libnss-extrausers_libs
        libpam-pwquality_libs
        libpciaccess0_libs
        libwrap0_host-files
        libx11-data_xerrordb
        locales_standard

        netcat-openbsd_bins
        netplan.io_bins
        ncurses-base_terminfo

        openssh-client_config
        openssh-client_services
        openssh-server_bins
        openssh-server_config
        openssh-server_services
        openssl_bins
        opensc_bins
        p11-kit_bins
        passwd_pam-config
        polkitd_services
        procps_bins
        plymouth_bins
        plymouth-label-ft_libs
        procps_config

        udev_services
        util-linux_services
        systemd_bash-completions
        systemd_extras
        systemd_run0
        systemd_kernel-parameters
        systemd_udev-rules
        systemd_tpm2
        systemd_standard
        systemd_user-services
        systemd-bootchart_services
        systemd-coredump_bins
        systemd-cryptsetup_bins
        systemd-cryptsetup_services
        systemd-resolved_bins
        systemd-sysv_bins
        systemd-timesyncd_services
        systemd-zram-generator_services
        
        tzdata_zoneinfo
        wpasupplicant_services
      )


      . "$CRAFT_STAGE"/build-env
      SNAP_BUILD_VARIANT=${SNAP_BUILD_VARIANT:-}
      if [ "$SNAP_BUILD_VARIANT" = cloud-init ]; then
          SLICES+=(cloud-init_bins)
      fi

      # TODO: not sure about FIPS yet, this will have to come later, chisel has builtin
      # support for ESM, meaning it's something we can request chisel to do for us.
      # if [ "$SNAP_BUILD_VARIANT" = fips ]; then
      #   # Ensure vital crypt packages are refreshed / downgraded and downloaded
      #   # from the FIPS ppa. This should also contain openssh-server, but we already
      #   # have that one listed above.
      #   SLICES+=(libgcrypt20 libgnutls30t64 openssl-fips-module-3 ssh)
      # fi
      
      # add architecture specific slices
      case "$(dpkg --print-architecture)" in
          amd64|arm64)
              SLICES+=(
                secureboot-db_services
                nvidia-kernel-common-595_bins
                nvidia-kernel-common-595_modprobe-d-kms
              )
              ;;
          i386)
              SLICES+=(secureboot-db_services)
              ;;
          riscv64)
              SLICES+=(gdbserver_bins systemd-bootchart_services)
              ;;
      esac

      # create the rootfs directory we install slices into
      mkdir -p "${CRAFT_PART_INSTALL}"/base

      # Cut the initial slices into the rootfs
      chisel cut \
        --release="${CRAFT_PART_SRC}" \
        --root "${CRAFT_PART_INSTALL}"/base \
        "${SLICES[@]}" "${UTILS[@]}" \
        base-files_chisel

      # Cut foreign libraries we also need
      case "$(dpkg --print-architecture)" in
          amd64)
              chisel cut \
                --arch=i386 \
                --release="${CRAFT_PART_SRC}" \
                --root "${CRAFT_PART_INSTALL}"/base \
                libnss-mdns_mdns4-minimal libc6_libs libc6_gconv libc6_config libgcc-s1_libs
              ;;
      esac

      # Derive changelog slices from the manifest to automatically cover
      # all packages, including their dependencies.
      CHANGELOG_SLICES=()
      python3 "${CRAFT_PROJECT_DIR}/tools/wall2dpkg.py" \
        "${CRAFT_PART_INSTALL}/base/var/lib/chisel/manifest.wall" \
        "${CRAFT_PART_BUILD}/dpkg-for-changelogs.yaml" 2>/dev/null || true

      while IFS='= ' read -r pkg _; do
          case "$pkg" in
              # Skip packages known to not have a changelog slice
              openssh-server |\
              kmod |\
              libatomic1 |\
              libgcc-s1 |\
              libncursesw6 |\
              libpython3.14-stdlib |\
              libstdc++6 |\
              openssh-sftp-server |\
              p11-kit-modules)
                  continue ;;
          esac
          CHANGELOG_SLICES+=("${pkg}_changelog")
      done < <(grep '^- ' "${CRAFT_PART_BUILD}/dpkg-for-changelogs.yaml" | sed 's/^- //')

      # We are sure to have changelog slices, it's likely a bug if there are
      # none.
      if [ ${#CHANGELOG_SLICES[@]} -eq 0 ]; then
          echo "No changelogs?"
          exit 1
      fi

      chisel cut \
          --release="${CRAFT_PART_SRC}" \
          --root "${CRAFT_PART_INSTALL}"/base \
          "${CHANGELOG_SLICES[@]}"

      # https://ubuntu.com/chisel/docs/latest/reference/manifest/
      # chisel automatically generates a manifest for the cut slices here:
      # $rootfs/var/lib/chisel/manifest.wall
      # this is zstd compressed, and must therefor be uncompressed
      # unzstd ./manifest.wall -o manifest.json

    override-prime: |
      # No files from this step in prime

  snapd-files:
    plugin: nil
    source: .
    build-packages:
      - snapd
    after:
      - chisel-libs
    override-build: |
      mkdir -p "${CRAFT_PART_INSTALL}"/base/usr/lib/systemd/system-generators
      cp /usr/lib/systemd/system-generators/snapd-generator "${CRAFT_PART_INSTALL}"/base/usr/lib/systemd/system-generators/snapd-generator
      mkdir -p "${CRAFT_PART_INSTALL}"/base/usr/lib/tmpfiles.d
      cp /usr/lib/tmpfiles.d/snapd.conf "${CRAFT_PART_INSTALL}"/base/usr/lib/tmpfiles.d/snapd.conf
    override-prime: |
      # No files from this step in prime

  generators:
    plugin: nil
    source: generators/
    build-packages:
      - cargo
      - rustc
    override-build: |
      cd "${CRAFT_PART_SRC}"
      cargo build --release
      strip target/release/ubuntu-core-generator
      mkdir -p "${CRAFT_PART_INSTALL}/usr/lib/core"
      install -m 755 target/release/ubuntu-core-generator \
        "${CRAFT_PART_INSTALL}/usr/lib/core/ubuntu-core-generator"

  splash-theme:
    plugin: dump
    source: https://github.com/snapcore/plymouth-theme-ubuntu-core.git
    source-type: git
    organize:
      ubuntu-core: usr/share/plymouth/themes/ubuntu-core
      copyright: usr/share/doc/plymouth-theme-ubuntu-core/copyright
    stage:
      - -README.md

  hooks:
    after:
      - chisel-libs
      - snapd-files
      - splash-theme
      - build-env
    plugin: make
    source: .
    build-packages:
      - shellcheck
      - distro-info
    override-prime: |
      craftctl default

      # ensure build-in tests are run
      make -C ${CRAFT_PART_SRC} test TESTDIR=${CRAFT_PRIME}

  generate-changelog:
    after:
      - hooks
    plugin: make
    # Use the root to be able to detect the git repo, as we need to be able
    # to get the current commit
    source: .
    build-packages:
      - python3-debian
      - python3-requests
      - python3-yaml
    # to generate changelogs, it's own snap need to be present
    # TODO: maybe we can override pull and just copy the files we need into
    # the source dir.
    build-snaps:
      - core26/beta
    override-build: |
      cd ${CRAFT_PART_SRC}

      # Generate the dpkg.yaml for compatability purposes. Scanning tools still expect
      # this file to be present, and they move slowly in terms of support for the new chisel format.
      mkdir -p "${CRAFT_PART_BUILD}/sysroot/usr/share/snappy"
      cp -avT "${CRAFT_STAGE}/base/usr/share/doc" "${CRAFT_PART_BUILD}/sysroot/usr/share/doc"
      python3 ./tools/wall2dpkg.py "${CRAFT_STAGE}/var/lib/chisel/manifest.wall" "${CRAFT_PART_BUILD}/sysroot/usr/share/snappy/dpkg.yaml"

      # When building through spread there is no .git, which means we cannot
      # generate the changelog in this case, ensure that the current folder is
      # a git repository, additionally check that the snap we are building a changelog
      # against has the dpkg.yaml.
      if git rev-parse HEAD && [ -e "/snap/core26/current/usr/share/snappy/dpkg.yaml" ]; then
        CHG_PARAMS=
        if [ -e /build/core26 ]; then
          CHG_PARAMS=--launchpad
        fi
        ./tools/generate-changelog.py "/snap/core26/current" "${CRAFT_PART_BUILD}/sysroot" core26 $CHG_PARAMS
        install -D "${CRAFT_PART_BUILD}/sysroot/usr/share/doc/ChangeLog" "${CRAFT_PART_INSTALL}/usr/share/doc/ChangeLog"
      else
        echo "WARNING: changelog will not be generated for this build"
      fi
      install -D "${CRAFT_PART_BUILD}/sysroot/usr/share/snappy/dpkg.yaml" "${CRAFT_PART_INSTALL}/usr/share/snappy/dpkg.yaml"

  publish-artifacts-lp:
    after:
      - generate-changelog
    plugin: nil
    override-prime: |
      # copy dpkg.yaml, chisel manifest and changelog files for lp build
      if [ -e /build/core26 ]; then
        DATEFMT="$(date +%Y%m%d%H%M)"
        /bin/cp ${CRAFT_PRIME}/usr/share/snappy/dpkg.yaml /build/core26/core26-$(DATEFMT)_${CRAFT_ARCH_BUILD_FOR}.dpkg.yaml
        /bin/cp ${CRAFT_PRIME}/var/lib/chisel/manifest.wall /build/core26/core26-$(DATEFMT)_${CRAFT_ARCH_BUILD_FOR}.manifest.wall
        /bin/cp ${CRAFT_PRIME}/usr/share/doc/ChangeLog /build/core26/core26-$(DATEFMT)_${CRAFT_ARCH_BUILD_FOR}.ChangeLog
      fi

Youez - 2016 - github.com/yon3zu
LinuXploit