From 1b20aa407b8836bae382d63001271e68228f674c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 30 Oct 2020 18:07:53 +0200 Subject: [PATCH] Remove unneeded sys subdirectory --- DEVELOPMENT.md | 8 ++- sys/.gitignore | 3 -- sys/.gitlab-ci.yml | 118 --------------------------------------------- sys/Cargo.toml | 23 --------- sys/DEVELOPMENT.md | 13 ----- sys/LICENSE | 23 --------- sys/README.md | 33 ------------- sys/ci/env.sh | 8 --- sys/deny.toml | 34 ------------- sys/generator.py | 61 ----------------------- 10 files changed, 6 insertions(+), 318 deletions(-) delete mode 100644 sys/.gitignore delete mode 100644 sys/.gitlab-ci.yml delete mode 100644 sys/Cargo.toml delete mode 100644 sys/DEVELOPMENT.md delete mode 100644 sys/LICENSE delete mode 100644 sys/README.md delete mode 100644 sys/ci/env.sh delete mode 100644 sys/deny.toml delete mode 100755 sys/generator.py diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 57a4f4c05..ba19cc309 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,7 +1,11 @@ # How to update the bindings - * Make sure gstreamer-rs-sys is up to date - * Take the updated .gir files from gstreamer-rs-sys and copy them over + * Take the updated .gir files (e.g. from your gst-build checkout) and put + them in the gir-files directory + * In the gir-files directory, run ./fix.sh + * In the GstVideo-1.0.gir file, the `GST_VIDEO_BUFFER_FLAG_ONEFIELD` and + `GST_VIDEO_FRAME_FLAG_ONEFIELD` flags are twice. This is a gir bug. Delete + the second one. * If there is a new GStreamer version: Manually update `gst*/Cargo.toml` * Run generator.py * Investigate the diff, fix any mess-ups, look at commented functions and diff --git a/sys/.gitignore b/sys/.gitignore deleted file mode 100644 index 6aa106405..000000000 --- a/sys/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/sys/.gitlab-ci.yml b/sys/.gitlab-ci.yml deleted file mode 100644 index e92a8fede..000000000 --- a/sys/.gitlab-ci.yml +++ /dev/null @@ -1,118 +0,0 @@ -include: - - remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml" - -stages: - - "lint" - - "test" - - "extras" - -.base: - image: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG" - variables: - G_DEBUG: "fatal_warnings" - before_script: - - source ./ci/env.sh - - mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config - # If cargo exists assume we probably will want to update the lockfile - - | - if command -v cargo; then - cargo generate-lockfile - cargo update - fi - -.img-stable: - extends: .base - variables: - RUST_VERSION: "stable" - -.img-1-41: - extends: .base - variables: - RUST_VERSION: "1.41.0" - -.img-nightly: - extends: .base - variables: - RUST_VERSION: "nightly" - -.cargo test: - stage: "test" - script: - - rustc --version - - cargo --version - - cargo build --locked --all --color=always - # FIXME: tests are broken - # https://github.com/sdroege/gstreamer-sys/issues/16 - # - cargo test --locked --all --color=always - - cargo build --locked --all --all-features --color=always - # FIXME: tests are broken - # https://github.com/sdroege/gstreamer-sys/issues/16 - # - cargo test --locked --all --all-features --color=always - - # Run tests for crates we can currently run. The others - # need a new release of the C library first - - | - for crate in gstreamer-app-sys \ - gstreamer-audio-sys \ - gstreamer-base-sys \ - gstreamer-check-sys \ - gstreamer-gl-sys \ - gstreamer-mpegts-sys \ - gstreamer-net-sys \ - gstreamer-pbutils-sys \ - gstreamer-player-sys \ - gstreamer-rtsp-sys \ - gstreamer-sdp-sys \ - gstreamer-sys \ - gstreamer-tag-sys \ - gstreamer-video-sys \ - gstreamer-webrtc-sys \ - gstreamer-controller-sys; \ - do \ - cargo test --locked -p $crate; \ - done - -test stable: - extends: - - '.cargo test' - - .img-stable - -test 1.41: - extends: - - '.cargo test' - - .img-1-41 - -test nightly: - extends: - - '.cargo test' - - .img-nightly - -rustfmt: - extends: .img-stable - stage: "lint" - script: - - cargo fmt --version - - cargo fmt -- --color=always --check - -check commits: - extends: .img-stable - stage: "lint" - script: - - ci-fairy check-commits --textwidth 0 --no-signed-off-by - -outdated: - extends: .img-stable - allow_failure: true - stage: 'extras' - only: - - schedules - script: - - cargo outdated --root-deps-only --exit-code 1 -v - -deny: - extends: .img-stable - stage: 'extras' - only: - - schedules - script: - - cargo deny check diff --git a/sys/Cargo.toml b/sys/Cargo.toml deleted file mode 100644 index 43286d90e..000000000 --- a/sys/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[workspace] - -members = [ - "gstreamer-sys", - "gstreamer-base-sys", - "gstreamer-tag-sys", - "gstreamer-audio-sys", - "gstreamer-video-sys", - "gstreamer-pbutils-sys", - "gstreamer-app-sys", - "gstreamer-player-sys", - "gstreamer-mpegts-sys", - "gstreamer-net-sys", - "gstreamer-sdp-sys", - "gstreamer-rtsp-sys", - "gstreamer-rtsp-server-sys", - "gstreamer-webrtc-sys", - "gstreamer-gl-sys", - "gstreamer-editing-services-sys", - "gstreamer-check-sys", - "gstreamer-rtp-sys", - "gstreamer-controller-sys", -] diff --git a/sys/DEVELOPMENT.md b/sys/DEVELOPMENT.md deleted file mode 100644 index 982d62e5d..000000000 --- a/sys/DEVELOPMENT.md +++ /dev/null @@ -1,13 +0,0 @@ -# How to update the bindings - - * Take the updated .gir files (e.g. from your gst-build checkout) and put - them in the gir-files directory - * In the gir-files directory, run ./fix.sh - * In the GstVideo-1.0.gir file, the `GST_VIDEO_BUFFER_FLAG_ONEFIELD` and - `GST_VIDEO_FRAME_FLAG_ONEFIELD` flags are twice. This is a gir bug. Delete - the second one. - * If there is a new GStreamer version: Manually update `gst*/Cargo.toml` and - `gst*/build.rs` files. generator.py will mess these up. - * Run generator.py - * `git checkout gst*/Cargo.toml gst*/build.rs` - * Investigate the diff and fix any mess-ups diff --git a/sys/LICENSE b/sys/LICENSE deleted file mode 100644 index 3d76f6e2f..000000000 --- a/sys/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Sebastian Dröge . - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - diff --git a/sys/README.md b/sys/README.md deleted file mode 100644 index 8932e987a..000000000 --- a/sys/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)! - -# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master) - -[GStreamer](https://gstreamer.freedesktop.org/) FFI bindings for Rust. - -These bindings are providing unsafe FFI API that can be used to interface with -GStreamer. Generally they are meant to be used as the building block for -higher-level abstractions like: - - * Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs - * Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs - -The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) -based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) -API metadata provided by the GStreamer project. - -## LICENSE - -gstreamer-sys and all crates contained here are licensed under the MIT -license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). - -GStreamer itself is licensed under the Lesser General Public License version -2.1 or (at your option) any later version: -https://www.gnu.org/licenses/lgpl-2.1.html - -## Contribution - -Any kinds of contributions are welcome as a pull request. - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, -without any additional terms or conditions. diff --git a/sys/ci/env.sh b/sys/ci/env.sh deleted file mode 100644 index 0692b9d1b..000000000 --- a/sys/ci/env.sh +++ /dev/null @@ -1,8 +0,0 @@ -export RUSTUP_HOME='/usr/local/rustup' -export PATH=$PATH:/usr/local/cargo/bin - -export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig -export GST_PLUGIN_SYSTEM_PATH=/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0 -export GST_PLUGIN_SCANNER=/usr/local/libexec/gstreamer-1.0/gst-plugin-scanner -export PATH=$PATH:/usr/local/bin -export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH diff --git a/sys/deny.toml b/sys/deny.toml deleted file mode 100644 index f5d0a0f86..000000000 --- a/sys/deny.toml +++ /dev/null @@ -1,34 +0,0 @@ -[advisories] -db-path = "~/.cargo/advisory-db" -db-url = "https://github.com/rustsec/advisory-db" -vulnerability = "deny" -unmaintained = "warn" -notice = "warn" -ignore = [] - -[licenses] -unlicensed = "deny" -allow = [ - "Apache-2.0", -] -deny = [ - "GPL-1.0", - "GPL-2.0", - "GPL-3.0", - "AGPL-1.0", - "AGPL-3.0", -] -copyleft = "deny" -allow-osi-fsf-free = "either" -confidence-threshold = 0.8 - -[bans] -multiple-versions = "deny" -highlight = "all" - -[sources] -unknown-registry = "deny" -unknown-git = "deny" -allow-git = [ - "https://github.com/gtk-rs/sys", -] diff --git a/sys/generator.py b/sys/generator.py deleted file mode 100755 index c55c46864..000000000 --- a/sys/generator.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python3 - -from os import listdir -from os.path import isfile, join -from subprocess import call -import sys - -need_rebuild = False - -def update_workspace(): - with open('Cargo.toml', 'r') as f: - old_lines = f.readlines() - lines = old_lines[:] - with open('Cargo.toml', 'w') as f: - lines.insert(len(lines) - 2, '"gir",') - f.write(''.join(lines)) - success = True - try: - call(['bash', '-c', 'cd gir && cargo build --release']) - except: - success = False - with open('Cargo.toml', 'w') as f: - f.write(''.join(old_lines)) - return success - - -if not isfile('./gir/src'): - need_rebuild = True - print('=> Initializing gir submodule...') - call(['bash', '-c', 'git submodule update --init']) - print('<= Done!') - -question = 'Do you want to update gir submodule? [y/N]' -if sys.version_info[0] < 3: - line = raw_input(question) -else: - line = input(question) -line = line.strip() -if line.lower() == 'y': - need_rebuild = True - print('=> Updating gir submodule...') - call(['bash', '-c', 'cd gir && git reset --hard HEAD && git pull -f origin master']) - print('<= Done!') - -if need_rebuild is True or not os.path.isfile('./gir/target/release/gir'): - print('=> Building gir...') - if update_workspace() is True: - print('<= Done!') - else: - print('<= Failed...') - sys.exit(1) - -print('=> Regenerating crates...') -for entry in [f for f in listdir('.') if isfile(join('.', f))]: - if entry.startswith('Gir_Gst') and entry.endswith('.toml'): - print('==> Regenerating "{}"...'.format(entry)) - call(['./target/release/gir', '-c', entry]) - print('<== Done!') -call(['cargo', 'fmt']) -print('<= Done!') -print("Don't forget to check if everything has been correctly generated!")