Comments (8)
A variable BEAKERLIB_LIBRARIES will be used to define custom locations.
current state:
the library is defined by a component and a library name, it is written in format <component>/<library name>
and it must be located in a directory <component>/Library/<library name>
BEAKERLIB_LIBRARIES
is a space-separated list of following references:
I will be using library my-comp/basic-1
as an illustrative example
-
reference to a common place for library repos:
URL(s) to clone<URL>/<LIBRARY>, LIBRARY here cannot contain slash (/) and other special characters so they are replaced by dashes (-), thus the actual library repo is
-e.g. URL
https://github.com/beakerlib-libraries` and library would be actually located inhttps://github.com/beakerlib-libraries/my-comp-basic-1
-
reference of a single library in dedicated repo
(LIBRARY)URL
e.g.(my-comp/basic-1)https://github.com/beakerlib-libraries/my-comp-basic-1
-
reference of a library inside of a general repo
(LIBRARY)URL
e.g.(my-comp/basic-1)https://github.com/some/repo/raw/master/libraries/my-comp-basic-1.yaml
from beakerlib.
While I was experimenting with git
I found out that if I try to clone non-existing repo git
asks for credentials. This needs to be somehow worked around as it is quite expected scenario.
edit:
This might be overcome using svn or direct download of the archive bug it differs per provider.
edit2:
an idea: A mandatory file in the library's root with library identification and other data might be used. There might be instructions how and what to download if the direct method is going to be used.
Personally I would prefer direct download as we could omit git as a dependency but then downloading more complex structures might be an issue. Or there might be provides-specific link to the archive. Actually there might be more possible ways as a fall-back mechanism.
from beakerlib.
A variable BEAKERLIB_LIBRARIES will be used to define custom locations.
current state:
the library is defined by a component and a library name, it is written in format<component>/<library name>
and it must be located in a directory<component>/Library/<library name>
BEAKERLIB_LIBRARIES
is a space-separated list of following references:I will be using library
my-comp/basic-1
as an illustrative example1. reference to a common place for library repos: URL(s) to clone `<URL>/<LIBRARY>, LIBRARY here cannot contain slash (/) and other special characters so they are replaced by dashes (-), thus the actual library repo is `-`e.g. URL`[https://github.com/beakerlib-libraries`](https://github.com/beakerlib-libraries%60) and library would be actually located in `https://github.com/beakerlib-libraries/my-comp-basic-1` 2. reference of a single library in dedicated repo (LIBRARY)URL e.g. `(my-comp/basic-1)https://github.com/beakerlib-libraries/my-comp-basic-1` 3. reference of a library inside of a general repo (LIBRARY)URL e.g. `(my-comp/basic-1)https://github.com/some/repo/raw/master/libraries/my-comp-basic-1.yaml`
Actually I have probably better and more generic way to describe the reference now, see next comment.
from beakerlib.
Actually only one common pattern to describe all three reference variants and more.
(library regexp pattern)URL
a special keyword LIBRARY
in the reference would be substituted by the actual LIBRARY (with dashes)
e.g.
- reference to a common place for library repos
(.*)https://github.com/beakerlib-libraries/LIBRARY/raw/master/lib.yaml
- reference of a single library in dedicated repo
(my-comp/basic-1)https://github.com/beakerlib-libraries/my-comp-basic-1/raw/master/lib.yaml
- reference of a library inside of a general repo
(my-comp/basic-1)https://github.com/some/repo/raw/master/libraries/my-comp-basic-1.yaml
- reference more libraries inside of a general repo
(my-comp/basic-1|my-comp/basic-2)https://github.com/some/repo/raw/master/libraries/LIBRARY.yaml
Basically when looking for a library the URL would be considered if the LIBRARY matches the regexp pattern, otherwise it would be just wasting of time.
The yaml file should contain an information how to get whole library, where it is located inside the repo (branch, tag, commit, path). Currently, I'm thinking of just a link to the archive and links to raw files, but it might be extended in the future by other methods.
The advantage of this solution is that there is no need for further dependencies for beakerlib.
from beakerlib.
To allow to dive the library down into the component's repo it would make sense to define COMPONENT
and NAME
which would act as LIBRARY=COMPONENT/NAME
.
from beakerlib.
format of the definition yaml file:
url:
base_url:
files:
url
- reference to a single file (complete url)
base_url
- a URL to be used together with files
files
- array of items to be added to base_url to construct the final URL for a download
example 1:
url: https://github.com/some/repo/raw/master/lib.sh
example 2:
base_url: https://github.com/some/repo/raw/master/
files:
- lib.sh
- Makefile
- additional_files/x
- additional_files/y
note that Makefile
might be necessary in case of other libraries required
from beakerlib.
another key requires
and/or requires_lib
might be added to somehow express the library requirements
from beakerlib.
actually, this is not needed anymore as it is prepared by the schedulers, like tmt
from beakerlib.
Related Issues (20)
- rlImport should check that the callback function exists and raise better error HOT 1
- Can you build the beakerlib at a Fedora GA time (or slightly before)? HOT 15
- rlImport --all does not consider Makefile HOT 1
- each phase should contain pkgdetails in the journal
- rlRun -l doesn't log line if it is missing \n at the end
- implicit rlJournalStart? HOT 1
- Support to add extra parameter for task type in job.xml HOT 1
- Missing require on selinuxenabled binary
- src/testing.sh: __INTERNAL_rlGetOSReleaseItem() may not use a good way to check file osrelease_file HOT 1
- [RFE] Option for rlFileSubmit to gzip file HOT 1
- Performance regression in 1.29 with large amount of asserts in phase HOT 4
- Fedora ELN - rlIsRHELLike or not? rlIsFedora or not? HOT 1
- /usr/share/beakerlib/testing.sh: line 878: 111: Bad file descriptor HOT 2
- [RFE] Reduce amount of boilerplate code needed by the beakerlib library HOT 3
- When a library is being imported, the import ignores custom paths defined in `require` metadata HOT 3
- rlFetchSrcForInstalled should prioritize --source repo before Koji HOT 5
- cat: /var/tmp/tmt/run-075/plans/package_update-swtpm/execute/data/Setup: No such file or directory
- After reboot, world-writable files are created HOT 5
- Performance still dips the more you log HOT 2
- rlPerfTime_AvgFromRuns() does not work correctly.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beakerlib.