-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snap improvements #4298
base: main
Are you sure you want to change the base?
Snap improvements #4298
Commits on Aug 9, 2024
-
snap: Switch Leptonica source to Git repository
This patch mitigates risk of supply chain attack via tainted source release packages(e.g. CVE-2024-3094). Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b613c6d - Browse repository at this point
Copy the full SHA b613c6dView commit details -
snap: Fix Leptonica part not build with OpenJPEG support
This patch addresses the following Snapcraft linter warning: ``` - library: libopenjp2.so.7: unused library 'usr/lib/x86_64-linux-gnu/libo penjp2.so.2.4.0'. (https://snapcraft.io/docs/linters-library) ``` Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66afa2c - Browse repository at this point
Copy the full SHA 66afa2cView commit details -
snap: Fix missing {build,stage}-packages declaration for the Leptonic…
…a part Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0649d0f - Browse repository at this point
Copy the full SHA 0649d0fView commit details -
snap: Ensure Leptonica features we need are built
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7e9dd2d - Browse repository at this point
Copy the full SHA 7e9dd2dView commit details -
* Reduce part pull time by limiting the history depth to clone * Reduce part build time by disable components that we don't need. * Reduce overall snap size by only shipping files that are needed in runtime. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 064a6b0 - Browse repository at this point
Copy the full SHA 064a6b0View commit details -
snap: Update Leptonica to 1.84.1 version
This is the current latest version. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8d9174a - Browse repository at this point
Copy the full SHA 8d9174aView commit details -
snap: Fix missing WebP support in the Leptonica part
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b28ab15 - Browse repository at this point
Copy the full SHA b28ab15View commit details -
snap: Fix missing stage-packages of the Tesseract part
The application is still runnable due to some of the packages are already staged by the Leptonica part, however it should still be declared for clarity. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ef199ef - Browse repository at this point
Copy the full SHA ef199efView commit details -
snap: Reduce package size by stripping out files not used in runtime
This change reduces package size by 44%(73637888 -> 40894464). Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8782ee4 - Browse repository at this point
Copy the full SHA 8782ee4View commit details -
snap: Drop unused training tools build/runtime dependencies
Currently this feature isn't exposed to the host, dropping the dependencies to reduce built package size. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19270b4 - Browse repository at this point
Copy the full SHA 19270b4View commit details -
snap: Explicitly declare features we don't want to be build
Previously this is implicitly configured as the build dependency isn't available and the training tools build target isn't called. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for db818ac - Browse repository at this point
Copy the full SHA db818acView commit details -
snap: Disable unused features to reduce snap size and built time
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7a7a984 - Browse repository at this point
Copy the full SHA 7a7a984View commit details -
snap: Fix incorrect dependency declaration for the Tesseract part
The zlib library is Leptonica's dependency, not Tesseract's. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7d2ba18 - Browse repository at this point
Copy the full SHA 7d2ba18View commit details -
snap: Drop incorrect build-packages declaration of the Tesseract part
These should be Leptonica part's build dependencies. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 23b31c6 - Browse repository at this point
Copy the full SHA 23b31c6View commit details -
snap: Add cosmetic blank line separator between the definition of the…
… tesseract and leptonica part Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d05286d - Browse repository at this point
Copy the full SHA d05286dView commit details -
snap: Improve order of the
after
part propertySigned-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 53f2b00 - Browse repository at this point
Copy the full SHA 53f2b00View commit details -
snap: Incorporate v3.0.6 selective-checkout scriptlet for ease of sta…
…ble snap publishing This scriptlet allows stable builds to be always available for the downstream snap publisher to promote to the `stable` channel on the Snap Store. Higher risk builds(e.g. beta/edge) will only occur when the lower risk builds(rc/stable) are promoted. Refer the following Snapcraft Forum topic for more info: Selective-checkout: Check out the tagged release revision if it isn't promoted to the stable channel - doc - snapcraft.io https://forum.snapcraft.io/t/selective-checkout-check-out-the-tagged-release-revision-if-it-isnt-promoted-to-the-stable-channel/10617 Here's a snippet of the scriptlet in action: ``` :: selective-checkout: INFO: Detecting stable releases... :: selective-checkout: determine_stable_release_details: DEBUG: Last stable release tag determines to be "5.4.1". :: selective-checkout: determine_stable_release_details: DEBUG: Last stable version determines to be "5.4.1". :: selective-checkout: snap_query_version: DEBUG: Checking what snap revisions are available for the tesseract snap at the stable release channel... :: selective-checkout: determine_stable_release_details: DEBUG: Last stable version on the snap store determines to be "". :: selective-checkout: INFO: Detecting release candidate releases... :: selective-checkout: DEBUG: Last release candidate release tag determines to be "5.4.0-rc2". :: selective-checkout: DEBUG: Last release candidate version determines to be "5.4.0-rc2". :: selective-checkout: snap_query_version: DEBUG: Checking what snap revisions are available for the tesseract snap at the candidate release channel... :: selective-checkout: DEBUG: Last release candidate version on the snap store determines to be "". :: selective-checkout: INFO: Detecting beta releases... :: selective-checkout: DEBUG: Last beta release tag determines to be "5.0.0-beta-20210916". :: selective-checkout: DEBUG: Last beta version determines to be "5.0.0-beta-20210916". :: selective-checkout: snap_query_version: DEBUG: Checking what snap revisions are available for the tesseract snap at the beta release channel... :: selective-checkout: DEBUG: Last beta version on the snap store determines to be "". :: selective-checkout: determine_which_version_to_build: DEBUG: Stable version(5.4.1) is newer than the one on the Snap Store(none), stable release will be built. :: selective-checkout: Info: The last tagged stable release(5.4.1) hasn't been promoted to the stable channel() on the Snap Store yet, checking out 5.4.1. ``` Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 89a673c - Browse repository at this point
Copy the full SHA 89a673cView commit details -
snap: Fix missing libarchive and libcurl support of the Tesseract part
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9717555 - Browse repository at this point
Copy the full SHA 9717555View commit details -
snap: Fix libraries under $SNAP/usr/local/lib aren't loaded in runtime
Libraries under $SNAP/usr/local/lib isn't searched by the dynamic linker by default. Refer-to: Staging - Build and staging dependencies - doc - snapcraft.io <https://forum.snapcraft.io/t/build-and-staging-dependencies/11451> Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0331ab5 - Browse repository at this point
Copy the full SHA 0331ab5View commit details -
snap: Strip unused icu libraries from snap
This patch addresses the following linter warnings: ``` - library: libicuio.so.70: unused library 'usr/lib/x86_64-linux-gnu/libicuio.so.70.1'. (https://snapcraft.io/docs/linters-library) - library: libicutest.so.70: unused library 'usr/lib/x86_64-linux-gnu/libicutest.so.70.1'. (https://snapcraft.io/docs/linters-library) - library: libicutu.so.70: unused library 'usr/lib/x86_64-linux-gnu/libicutu.so.70.1'. (https://snapcraft.io/docs/linters-library - library: libicui18n.so.70: unused library 'usr/lib/x86_64-linux-gnu/libicui18n.so.70.1'. (https://snapcraft.io/docs/linters-library) ``` Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b8b0fd0 - Browse repository at this point
Copy the full SHA b8b0fd0View commit details -
fixup! snap: Fix missing libarchive and libcurl support of the Tesser…
…act part libcurl functionality requires network access. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a2cbc1 - Browse repository at this point
Copy the full SHA 3a2cbc1View commit details
Commits on Aug 10, 2024
-
snap: Implement fallback config loading mechanism
This patch fixes configuration files in the readonly snap filesystem not loadable by Tesseract due to missing datadir fallback logic. If the config file with the same name doesn't appear in the $SNAP_USER_COMMON directory, the one in the $SNAP/usr/local/share/tessdata directory will be loaded, allow Tesseract to work properly. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bdccad5 - Browse repository at this point
Copy the full SHA bdccad5View commit details -
snap: Replace deprecated CRAFT_ARCH_TRIPLET Snapcraft part environmen…
…t variable This patch addresses the following Snapcraft linter warnings: ``` CRAFT_ARCH_TRIPLET is deprecated, use CRAFT_ARCH_TRIPLET_BUILD_{ON|FOR} ``` Refer-to: core22 | Parts environment variables | Snapcraft documentation <https://snapcraft.io/docs/parts-environment-variables#heading--snapcraft-configuration-core22> Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 32c4320 - Browse repository at this point
Copy the full SHA 32c4320View commit details
Commits on Aug 11, 2024
-
snap: Fix incorrect compiled-in datadir
This patch fixes the incorrect compiled-in datadir path and as a side-effect, simplifies the fallback config loading patch. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 88c3e33 - Browse repository at this point
Copy the full SHA 88c3e33View commit details -
snap: Avoid hardcoding the TESSDATA_PREFIX environment variable
This patch allows the user to store Tesseract data in custom paths using the TESSDATA_PREFIX environment variable. Previously it is hardcoded to $SNAP_USER_COMMON. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ca47315 - Browse repository at this point
Copy the full SHA ca47315View commit details