I have a fairly simple APKBUILD file, fetched from the original repository and just altered at one place to build a static library instead of a dynamic. However, I'm new to Alpine, apkbuild and I'm stuck at what is probably a failry simply to fix problem, but I couldn't quite figure out myself where it comes from. When I build using abuild -r -F I get the error:
>>> fc-abseil-cpp: Unpacking /var/cache/distfiles/abseil-cpp-20211102.0.tar.gz...
>>> ERROR: fc-abseil-cpp: Is $builddir set correctly?
>>> ERROR: fc-abseil-cpp: prepare failed
The APKBUILD file is this one:
# Contributor: Bart Ribbers <bribbers#disroot.org>
# Maintainer: Duncan Bellamy <dunk#denkimushi.com>
pkgname=fc-abseil-cpp
pkgver=20211102.0
pkgrel=1
pkgdesc="Abseil Common Libraries (C++) "
url="https://abseil.io/"
arch="all"
license="Apache-2.0"
makedepends="
cmake
gtest-dev
linux-headers
"
subpackages="$pkgname-dev"
source="https://github.com/abseil/abseil-cpp/archive/$pkgver/abseil-cpp-$pkgver.tar.gz
0002-abseil.patch
"
build() {
cmake -B build \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=ON \
-DABSL_USE_EXTERNAL_GOOGLETEST=ON \
-DABSL_PROPAGATE_CXX_STD=ON \
-DABSL_FIND_GOOGLETEST=ON
cmake --build build
}
# disable broken tests
check() {
CTEST_OUTPUT_ON_FAILURE=TRUE ctest --test-dir build -E "absl_str_format_convert_test|absl_mutex_test\
|absl_notification_test|absl_per_thread_sem_test|absl_sysinfo_test|absl_random_beta_distribution_test"
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
fed68aa434c02ec6faa9d1c81f1ad35b60ec024b44957e2e0ac31e6075e385c06a3e1b616afeb4bb7c2413191fd7827d82e1f9f0796b52ed21fb2c41dd9031cf abseil-cpp-20211102.0.tar.gz
78bca9372af30624a303b53cbc07b4bfe0ca5a11ef2126c6b3fb34714e3b119fa4bf9a088968b491a7823107df5083c0d4b4aed0e47b8e872ba572543e9a52ea 0002-abseil.patch
"
I've tried to set a builddir vairable directly within the APKBUILD file, as well as on the shell as an export. What's the problem here?
Related
I am using openapi generator to generate my rest api client. It generates the line
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
In my imports but I can't for the life of me understand why. Running a go mod vendor prompts me to sign in while this line is in place. What is this trying to import? I'm on an enterprise github, which would complicate things. The example README says to add this line but provides no explanation of what it is doing https://github.com/OpenAPITools/openapi-generator/blob/master/samples/openapi3/client/petstore/go/go-petstore/README.md#:~:text=%22github.com/GIT_USER_ID/GIT_REPO_ID%22
You can pass those to the OpenAPI Generator client as parameters:
openapi-generator-cli generate \
-i openapi.yaml
-g go \
-p packageName=mypackage \
-o /src \
--git-repo-id my-go-lib/v1 --git-user-id user1 \
that will result in
openapiclient "github.com/user1/my-go-lib/v1"
I'm trying to create a custom recipe to sign a u-boot image generated from u-boot.bb.
I have 2 custom recipes:
1. u-boot.bb - clones, compiles and deploys u-boot resulting u-boot.elf.
2. u-boot-sign.bb - depends on u-boot.bb. Gets u-boot.elf, passes it through
custom signing procedure and deploys the result.
For signing I am forced to use a custom procedure which is in a form of python scripts located in external repository.
The part which causes a problem is accessing a deployed u-boot.elf binary file from u-boot.bb recipe. I cannot find a way to expose u-boot.elf binary file to a u-boot-sign.bb recipe.
What should be the correct way of exposing an image binary file from one recipe, to be accessed, signed and deployed in another recipe?
For the purpose of sharing the files between recipes and between cross-compilation scope, I used ${datadir} when installing the binaries (via do_install). This allowed me to access all files described by FILES:${PN} via recipe-sysroot.
u-boot.bb - exporting recipe:
…
do_install() {
install -d ${D}${datadir}/u-boot-2016/
install -m 0644 ${B}/${UBOOT_ELF_BINARY} ${D}${datadir}/u-boot-2016
}
FILES:${PN} = "${datadir}/u-boot-2016"
…
u-boot-sign.bb - depending recipe
…
DEPENDS += " u-boot python3-native"
do_sign() {
${STAGING_BINDIR_NATIVE}/python3-native/python3 sign.py \
-i ${RECIPE_SYSROOT}${datadir}/u-boot-2016/${UBOOT_ELF_BINARY}
}
…
Inspiration from Here
Edit
I was advised not to transfer files like this using ${datadir}. For intermediate files the better approach would be to use to use /firmware as it is done in meta-arm.
u-boot.bb - exporting recipe:
…
do_install() {
install -D -p -m 0644 ${B}/${UBOOT_ELF_BINARY} ${D}/firmware/${UBOOT_ELF_BINARY}
}
FILES:${PN} = "/firmware"
SYSROOT_DIRS += "/firmware"
…
u-boot-sign.bb - depending recipe
…
DEPENDS += " u-boot python3-native"
do_sign() {
${STAGING_BINDIR_NATIVE}/python3-native/python3 sign.py \
-i ${RECIPE_SYSROOT}/firmware/u-boot-2016/${UBOOT_ELF_BINARY}
}
…
It also requires to add /firmware to SYSROOT_DIRS.
I imported proto file (validator.proto) from one of my project https://github.com/maanasasubrahmanyam-sd/customValidation to another project (test.proto) https://github.com/maanasasubrahmanyam-sd/customeValTest/tree/master/interfaces/test_server
go get github.com/maanasasubrahmanyam-sd/customValidation
protoc \
-I. \
-I $GOPATH/src/ \
--proto_path=${GOPATH}/pkg/mod/github.com/envoyproxy/protoc-gen-validate#v0.1.0 \
--proto_path=${GOPATH}/src/github.com/google/protobuf/src \
--go_out="plugins=grpc:./generated" \
--validate_out="lang=go:./generated" \
--govalidators_out=. \
./interfaces/test_server/*.proto
The correct import should come as github.com/maanasasubrahmanyam-sd/customValidation/validator. But test.pb.go import was coming as _ "./validator" which shows red line in Goland.
EDIT - All pb.go files are showing errors in them. I suspect it is due to bad import.
I google it but did not found any relevant information. Any suggestion experts ?
You can address the proto path in two ways,
One: if your import proto file is in your local then you should move it to your parent directory then address it from your parent path like this:
- parentDirectory
-- directory1
--- proto1.proto
-- importDirectory
--- proto2.proto
you can build this file(proto1.proto) with this command :
protoc --proto_path=parentDirectory/directory1 --proto_path=parentDirectory --go-grpc_out=***your output path*** --go_out=***your output path*** parentDirectory/directory1/proto1.proto
also if you use Goland you need to add parentDirectory to your setting(File | Settings | Languages & Frameworks | Protocol Buffers) then uncheck Configure automatically and add your parent path.
Two: If your proto file is in URL: then you can add it to your build command like this:
protoc --proto_path=src \
--go_opt=Mprotos/buzz.proto=example.com/project/protos/fizz \
--go_opt=Mprotos/bar.proto=example.com/project/protos/foo \
protos/buzz.proto protos/bar.proto
I get this error when running turtle build:android
turtle[4754] ERROR: Failed to build standalone app
err: ConfigError: The expected package.json path: /Users/runner/work/1/s/<key_alias>/package.json does not exist
This is what the script looks like in my .yml
turtle setup:ios \
IOS_DIST_P12_PASSWORD=$(IOS_DIST_P12_PASSWORD) \
turtle build:ios -u $(EXPO_CLI_USER) -p $(EXPO_CLI_PASSWORD)\
--team-id $(APPLE_TEAM_ID) \
--dist-p12-path ./my-app_dist.p12 \
--provisioning-profile-path ./myapp.mobileprovision \
--release-channel deployment
turtle setup:android \
ANDROID_KEYSTORE_PASSWORD=$(ANDROID_KEYSTORE_PASSWORD) \
ANDROID_KEY_PASSWORD=$(ANDROID_KEY_PASSWORD) \
turtle build:android -u $(EXPO_CLI_USER) -p $(EXPO_CLI_PASSWORD)\
--keystore-path ./my-app.jks \
--keystore-alias $(KEY_ALIAS) \
-t apk \
--release-channel deployment
I have all the correct information in the yml and all the env variables are defined. Do I also need to run keytool command before i run turtle build? I have already done it for the app in the past and the filepaths are there.
Same issue for ios, it says the path/package.json doesnt exist.
As a workaround:
Remove the Expo variables in front of the build command (they were already declared as variables) and it worked fine.
For details, please refer to this case.
In addition, you can try to check whether the android.package key is included in the expo object of the app.json file
{
"expo": {
"sdkVersion": "26.0.0",
"name": "TongPos",
"description": "your app desc",
"android": {
"package": "com.sohagfaruque.tongpos"
}
}
}
I use a conda env that I create manually, not automatically using Snakemake. I do this to keep tighter version control.
Anyway, in my config.yaml I have the following line:
conda_env: '/rst1/2017-0205_illuminaseq/scratch/swo-406/snakemake'
Then, at the start of my Snakefile I read that variable (reading variables from config in your shell part does not seem to work, am I right?):
conda_env = config['conda_env']
Then in a shell part I hail said parameter like this:
rule rsem_quantify:
input:
os.path.join(fastq_dir, '{sample}_R1_001.fastq.gz'),
os.path.join(fastq_dir, '{sample}_R2_001.fastq.gz')
output:
os.path.join(analyzed_dir, '{sample}.genes.results'),
os.path.join(analyzed_dir, '{sample}.STAR.genome.bam')
threads: 8
shell:
'''
#!/bin/bash
source activate {conda_env}
rsem-calculate-expression \
--paired-end \
{input} \
{rsem_ref_base} \
{analyzed_dir}/{wildcards.sample} \
--strandedness reverse \
--num-threads {threads} \
--star \
--star-gzipped-read-file \
--star-output-genome-bam
'''
Notice the {conda_env}. Now this gives me the following error:
Could not find conda environment: None
You can list all discoverable environments with `conda info --envs`.
Now, if I change {conda_env} for its parameter directly /rst1/2017-0205_illuminaseq/scratch/swo-406/snakemake, it does work! I don't have any trouble reading other parameters using this method (like rsem_ref_base and analyzed_dir in the example rule above.
What could be wrong here?
Highest regards,
Freek.
The pattern I use is to load variables into params, so something along the lines of
rule rsem_quantify:
input:
os.path.join(fastq_dir, '{sample}_R1_001.fastq.gz'),
os.path.join(fastq_dir, '{sample}_R2_001.fastq.gz')
output:
os.path.join(analyzed_dir, '{sample}.genes.results'),
os.path.join(analyzed_dir, '{sample}.STAR.genome.bam')
params:
conda_env=config['conda_env']
threads: 8
shell:
'''
#!/bin/bash
source activate {params.conda_env}
rsem-calculate-expression \
...
'''
Although, I'd also never do this with a conda environment, because Snakemake has conda environment management built-in. See this section in the docs on Integrated Package Management for details. This makes reproducibility much more manageable.