Skip to content
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

app-misc/meilisearch Replace Python autogen with YAML-based generator… #243

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

org-tekeli-borisp
Copy link
Collaborator

@org-tekeli-borisp org-tekeli-borisp commented Dec 24, 2024

Summary

  • Replace Python autogen with YAML-based generator
  • Adjusted templates
  • Added network-sandbox restriction as the custom build command of lindera-ko-dic building requests a download during compiling
workstation-mark-repo ~ # cat /var/tmp/portage/app-misc/meilisearch-1.12.0/work/cargo_home/gentoo/lindera-ko-dic-0.32.2/build.rs
use std::error::Error;

#[cfg(feature = "ko-dic")]
fn main() -> Result<(), Box<dyn Error>> {
    lindera_assets::fetch(
        lindera_assets::FetchParams {
            file_name: "mecab-ko-dic-2.1.1-20180720.tar.gz",
            input_dir: "mecab-ko-dic-2.1.1-20180720",
            output_dir: "lindera-ko-dic",
            download_url: "https://dlwqk3ibdg1xh.cloudfront.net/mecab-ko-dic-2.1.1-20180720.tar.gz",
            dummy_input: "테스트,1785,3543,4721,NNG,행위,F,테스트,*,*,*,*\n",
        },
        lindera_ko_dic_builder::ko_dic_builder::KoDicBuilder::new(),
    )
}

#[cfg(not(feature = "ko-dic"))]
fn main() -> Result<(), Box<dyn Error>> {
    Ok(())
}

Test Plan

  • Doit
 ╰ $ doit
INFO     Autogen: app-misc/meilisearch (latest)                                                                                                                                                                              
INFO     Download from https://github.com/meilisearch/meilisearch/tarball/ba11121cfc822438659ccb4120327c0c211a2796 verified as valid tar.gz archive.                                                                         
INFO     Created: meilisearch-1.12.0.ebuild   
  • Make it available in a own repo tree or by seeding into a local overlay
╰ $ scp -r ../meilisearch workstation-mark-repo:/home/borisp/Development/src/overlay/app-misc/ 
meilisearch-1.12.0.ebuild                                                                                                                                                                  100% 2057     1.9MB/s   00:00    
meilisearch.tmpl                                                                                                                                                                           100% 1585     2.2MB/s   00:00    
autogen.yaml                                                                                                                                                                               100%  248   556.8KB/s   00:00    
meilisearch.toml                                                                                                                                                                           100%  183   274.4KB/s   00:00    
meilisearch.initd                                                                                                                                                                          100%  535     1.1MB/s   00:00    
Manifest                                                                                                                                                                                   100%  785     1.6MB/s   00:00    
 
 ╰ $ pwd
/home/borisp/repo_tmp/stores/blos/ed/79/2c
 ╰ $ scp ed792c7047c2335de1bf7d15603f1fd1d255d3cef6acf96c9dbcaf0a8efdf7e850d49dda2573d56ba9b22b1ffcadf211454f13449aa7d133c5e272c8179bfbb8.blob root@workstation-mark-repo:/var/cache/portage/distfiles/meilisearch-1.12.0-funtoo-crates-bundle-acab29c78bc66ebcece4d700f351106c1696226d88afe276303bb75a56a75735ac8bbe42c30b8de8135352df4453ee6cbd2643edf1d7b9af0fc105b474a9cedb.tar.gz
ed792c7047c2335de1bf7d15603f1fd1d255d3cef6acf 100%  120MB  33.6MB/s   00:03  
  • Emerge it
workstation-mark-repo ~ # emerge -av app-misc/meilisearch

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-misc/meilisearch-1.12.0::overlay  USE="mini-dashboard -debug" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-misc/meilisearch-1.12.0::overlay
>>> Installing (1 of 1) app-misc/meilisearch-1.12.0::overlay
>>> Recording app-misc/meilisearch in "world" favorites file...
>>> Jobs: 1 of 1 complete                           Load avg: 1.91, 3.37, 2.27
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
  • Running it
borisp@workstation-mark-repo ~ $ meilisearch 

888b     d888          d8b 888 d8b                                            888
8888b   d8888          Y8P 888 Y8P                                            888
88888b.d88888              888                                                888
888Y88888P888  .d88b.  888 888 888 .d8888b   .d88b.   8888b.  888d888 .d8888b 88888b.
888 Y888P 888 d8P  Y8b 888 888 888 88K      d8P  Y8b     "88b 888P"  d88P"    888 "88b
888  Y8P  888 88888888 888 888 888 "Y8888b. 88888888 .d888888 888    888      888  888
888   "   888 Y8b.     888 888 888      X88 Y8b.     888  888 888    Y88b.    888  888
888       888  "Y8888  888 888 888  88888P'  "Y8888  "Y888888 888     "Y8888P 888  888

Config file path:	"none"
Database path:		"./data.ms"
Server listening on:	"http://localhost:7700"
Environment:		"development"
Commit SHA:		"ba11121cfc822438659ccb4120327c0c211a2796"
Commit date:		"unknown"
Package version:	"1.12.0"

Thank you for using Meilisearch!


We collect anonymized analytics to improve our product and your experience. To learn more, including how to turn off analytics, visit our dedicated documentation page: https://www.meilisearch.com/docs/learn/what_is_meilisearch/telemetry

Anonymous telemetry:	"Enabled"
Instance UID:		"44b795b8-b59f-45fb-9ee7-cd68469284e4"



 No master key was found. The server will accept unidentified requests.

 A master key of at least 16 bytes will be required when switching to a production environment.


We generated a new secure master key for you (you can safely use this token):

>> --master-key _8Wemn6KbkJopzGOaOlWMmPYfNATLnCLM07RIGwKZN8 <<

Restart Meilisearch with the argument above to use this new and secure master key.

Check out Meilisearch Cloud!	https://www.meilisearch.com/cloud?utm_campaign=oss&utm_source=engine&utm_medium=cli
Documentation:			https://www.meilisearch.com/docs
Source code:			https://github.com/meilisearch/meilisearch
Discord:			https://discord.meilisearch.com

2024-12-24T15:46:06.162990Z  INFO actix_server::builder: starting 16 workers
2024-12-24T15:46:06.163045Z  INFO actix_server::server: Actix runtime found; starting in Actix runtime

image

… for Meilisearch

- replaced the Python autogen script with a YAML generator
- adjusted templates
-
- added network-sandbox restriction as custom build command of lindera-ko-dic building requests a download during compiling
```
workstation-mark-repo ~ # cat /var/tmp/portage/app-misc/meilisearch-1.12.0/work/cargo_home/gentoo/lindera-ko-dic-0.32.2/build.rs
use std::error::Error;

#[cfg(feature = "ko-dic")]
fn main() -> Result<(), Box<dyn Error>> {
    lindera_assets::fetch(
        lindera_assets::FetchParams {
            file_name: "mecab-ko-dic-2.1.1-20180720.tar.gz",
            input_dir: "mecab-ko-dic-2.1.1-20180720",
            output_dir: "lindera-ko-dic",
            download_url: "https://dlwqk3ibdg1xh.cloudfront.net/mecab-ko-dic-2.1.1-20180720.tar.gz",
            dummy_input: "테스트,1785,3543,4721,NNG,행위,F,테스트,*,*,*,*\n",
        },
        lindera_ko_dic_builder::ko_dic_builder::KoDicBuilder::new(),
    )
}

#[cfg(not(feature = "ko-dic"))]
fn main() -> Result<(), Box<dyn Error>> {
    Ok(())
}
```

(cherry picked from commit f6603f1c79600a254002dd1ad11e9f11d4724150)
(cherry picked from commit 355c931721d2818d83ea13d075b70c88acdb69e4)
@geaaru geaaru merged commit 0d4ae40 into mark-testing Dec 29, 2024
@geaaru geaaru deleted the app-misc/meilisearch branch December 29, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

=app-misc/meilisearch-1.12.0 fails on autogen and prevents the tree regeneration
2 participants