From 177e996aa979ecf235c8cc2c643be69c98636360 Mon Sep 17 00:00:00 2001 From: Giuliano Bellini s294739 Date: Fri, 23 Jun 2023 17:01:12 +0200 Subject: [PATCH] update debian source generation and fixed debcargo warnings --- .github/workflows/package.yml | 5 +- .../packaging/linux/deb-source/changelog | 5 ++ .../packaging/linux/deb-source/copyright | 38 +++++++++++++ .../packaging/linux/deb-source/debcargo.toml | 55 ++----------------- 4 files changed, 51 insertions(+), 52 deletions(-) create mode 100644 resources/packaging/linux/deb-source/changelog create mode 100644 resources/packaging/linux/deb-source/copyright diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 35c9c28b..78ce9c1f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -133,7 +133,10 @@ jobs: export DEBFULLNAME="Giuliano Bellini" export DEBEMAIL="gyulyvgc99@gmail.com" debcargo package --config resources/packaging/linux/deb-source/debcargo.toml sniffnet - mv rust-sniffnet-1.2.1 artifacts/ + cp resources/packaging/linux/deb-source/changelog rust-sniffnet*/debian/changelog + cp resources/packaging/linux/deb-source/copyright rust-sniffnet*/debian/copyright + mv resources/packaging/linux/scripts/postinst rust-sniffnet*/debian/sniffnet.postinst + mv rust-sniffnet* artifacts/ - name: Upload package artifacts uses: actions/upload-artifact@v3 diff --git a/resources/packaging/linux/deb-source/changelog b/resources/packaging/linux/deb-source/changelog new file mode 100644 index 00000000..8e38484a --- /dev/null +++ b/resources/packaging/linux/deb-source/changelog @@ -0,0 +1,5 @@ +rust-sniffnet (1.2.1-1) unstable; urgency=medium + + * Package sniffnet 1.2.1 from crates.io using debcargo 2.6.0 + + -- Giuliano Bellini Fri, 23 Jun 2023 16:30:47 +0200 diff --git a/resources/packaging/linux/deb-source/copyright b/resources/packaging/linux/deb-source/copyright new file mode 100644 index 00000000..9bb163d3 --- /dev/null +++ b/resources/packaging/linux/deb-source/copyright @@ -0,0 +1,38 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: sniffnet +Upstream-Contact: Giuliano Bellini +Source: https://github.com/GyulyVGC/sniffnet + +Files: * +Copyright: + 2023 Giuliano Bellini +License: MIT or Apache-2.0 + +Files: debian/* +Copyright: + 2023 Debian Rust Maintainers + 2023 Giuliano Bellini +License: MIT or Apache-2.0 + +License: Apache-2.0 + Debian systems provide the Apache 2.0 license in + /usr/share/common-licenses/Apache-2.0 + +License: MIT + 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/resources/packaging/linux/deb-source/debcargo.toml b/resources/packaging/linux/deb-source/debcargo.toml index 3a559c02..5a782cb6 100644 --- a/resources/packaging/linux/deb-source/debcargo.toml +++ b/resources/packaging/linux/deb-source/debcargo.toml @@ -148,7 +148,7 @@ section = "net" # probably instead go in the [packages.lib] depends key rather than this key. # debcargo will then automatically add those into the package Build-Depends if # needed by dh-cargo; you don't have to add them here as well. -build_depends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev"] +#build_depends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev"] # Build-Depends to subtract from those generated by debcargo. This should be # used when our default generated Build-Depends results in a cycle. For @@ -176,64 +176,17 @@ build_depends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev"] # "lib+FEATURE" - the metapackage for feature FEATURE # bin - the package for the binary crate # -[packages.KEY] - -# Section override for the binary package. Use this if your crate is both a -# library and a binary crate; in this case, omit source.section which will -# default to "rust" and override this value for your binary package. -#section = "PLACEHOLDER" - -# Short description for the package. If omitted, debcargo autogenerates this -# using the top-level "summary" key plus a suffix describing the feature. -#summary = "PLACEHOLDER" - -# Long description for the package. If omitted, debcargo autogenerates this -# using the top-level "description" key plus a suffix describing the feature. -#description = """ -#PLACEHOLDER -#""" +[packages.bin] # Additional Depends on top of the ones generated by debcargo. This should be # used to pull in system libraries for crates that need them to build. You'll # want the -dev versions of the library packages, since our crate packages are # development packages and not runtime packages. -depends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev"] - -# We generate an autopkgtest (post-install test) for every feature, and also -# run `cargo test` for the default feature set during build-time if there are -# no additional dev-dependencies. -# However sometimes this may not work, e.g. if the crate is part of a larger -# workspace and its tests require files from the workspace directory. Or if -# the crate author is simply negligent and didn't ensure the test passes for -# all features. In these cases, you can use this setting to mark the test as -# "flaky" to ignore failures. Special cases for packages.KEY: -# packages."lib+@" - disables the test for the --all-features autopkgtest -# The effect is transitive to its reverse-dependencies, so e.g. if you specify -# this for feature A, and feature B depends on feature A, then feature B also -# implicitly has this set. To unset it on feature B (and its transitive rdeps), -# explicit set this to false for feature B as well. -# So for example if the test breaks for the bare library (when running with -# --no-default-features) but works when the std feature is enabled, set this to -# true for [packages.lib] and false for [packages."lib+std"]. -# Note: debcargo will error if you set these in an inconsistent way. For -# example if feature A depends on {B, C}, B says true and C says false, of -# course we cannot determine what A should be. You can suppress the error by -# explicitly giving A a value, either true or false. -#test_is_broken = false - -# Some tests depend on extra system tools or libraries, which need to be given -# to autopkgtest. Like test_is_broken, the effect is transitive to its rdeps. -#test_depends = [] -# -# Note: we do not (currently) support unsetting of this in indirect rdeps. This -# would result in similar conflict issues as documented for test_is_broken. It -# is possible to work around it similarly, by requiring manual resolution - but -# cancelling dependencies is harder to implement than true/false so we avoid it -# for now. Please file an issue if you have a real use-case for it. +depends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev", "libcap2-bin"] # More additional fields. This is mostly useful for binary packages that might # relate to other external programs, e.g. debcargo Recommends cargo. -recommends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev"] +# recommends = ["libasound2-dev, libpcap0.8-dev, libfontconfig1-dev"] #suggests = ["PLACEHOLDER", "PLACEHOLDER"] #provides = ["PLACEHOLDER", "PLACEHOLDER"]