packaging/fedora, tests: Fix build for snapd and enable a test for Fedora #3577

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
6 participants
Contributor

Conan-Kudo commented Jul 11, 2017

These changes come from pending changes for Fedora packaging for snapd 2.27.

Signed-off-by: Neal Gompa ngompa13@gmail.com

codecov-io commented Jul 11, 2017

Codecov Report

Merging #3577 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3577      +/-   ##
==========================================
- Coverage   76.82%   76.81%   -0.02%     
==========================================
  Files         379      379              
  Lines       26314    26314              
==========================================
- Hits        20216    20213       -3     
- Misses       4304     4306       +2     
- Partials     1794     1795       +1
Impacted Files Coverage Δ
interfaces/sorting.go 93.33% <0%> (-3.34%) ⬇️
overlord/snapstate/snapstate.go 81.17% <0%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75e3302...e2bcc3f. Read the comment docs.

Looks good, just one question inline.

@@ -345,6 +348,10 @@ GOFLAGS="$GOFLAGS -tags withtestkeys"
%gobuild -o bin/snapctl $GOFLAGS %{import_path}/cmd/snapctl
%gobuild -o bin/snap-update-ns $GOFLAGS %{import_path}/cmd/snap-update-ns
+# We don't need mvo5 fork for seccomp, as we have seccomp 2.3.x
@mvo5

mvo5 Jul 11, 2017

Collaborator

Nice!

packaging/fedora/snapd.spec
popd
+# Rename snapd.core-fixup.sh
@mvo5

mvo5 Jul 11, 2017

Collaborator

Why is this renamed? The unit file referes to it with the .sh suffix. Having said this, this unit is only relevant on core systems so its fine to just not package it at all on a fedora/opensuse system.

Contributor

Conan-Kudo commented Jul 11, 2017

@mvo5 I just purge the file now.

Member

chipaca commented Jul 11, 2017

Could you also include, in this pr, the change to tests/main/help/task.yaml that makes that test run on fedora?

@Conan-Kudo Conan-Kudo changed the title from packaging/fedora: Fix build for snapd to packaging/fedora, tests: Fix build for snapd and enable a test on Fedora Jul 11, 2017

Contributor

Conan-Kudo commented Jul 11, 2017

@chipaca Done.

@Conan-Kudo Conan-Kudo changed the title from packaging/fedora, tests: Fix build for snapd and enable a test on Fedora to packaging/fedora, tests: Fix build for snapd and enable a test for Fedora Jul 11, 2017

packaging/fedora: Fix build for snapd
These changes come from pending changes for Fedora packaging for
snapd 2.27.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>

NICE but I think some of the quoting is off.

popd
+# Remove snappy core specific scripts
+rm %{buildroot}%{_libexecdir}/snapd/snapd.core-fixup.sh
@zyga

zyga Jul 11, 2017

Contributor

Thanks!

tests/lib/pkgdb.sh
@@ -279,13 +279,13 @@ distro_install_build_snapd(){
packages=
case "$SPREAD_SYSTEM" in
ubuntu-*|debian-*)
- packages="${GOHOME}"/snapd_*.deb
+ packages="${GOHOME}/snapd_*.deb"
@zyga

zyga Jul 11, 2017

Contributor

Hmm, does it really do the right thing? Compare ls "$HOME/*" and ls "$HOME"/*?

sergiocazzolato and others added some commits Jul 10, 2017

tests: Enable main/help for Fedora
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
Contributor

Conan-Kudo commented Jul 11, 2017

@zyga Fixed.

zyga approved these changes Jul 11, 2017

Woot, thanks

tests/lib/pkgdb.sh
;;
fedora-*)
- packages="${GOHOME}"/snap-confine*.rpm "${GOPATH}"/snapd*.rpm
+ packages="${GOHOME}/snap-confine*.rpm ${GOPATH}/snapd*.rpm"
@zyga

zyga Jul 11, 2017

Contributor

Same here

tests/lib/pkgdb.sh
;;
opensuse-*)
- packages="${GOHOME}"/snapd*.rpm
+ packages="${GOHOME}/snapd*.rpm"
@zyga

zyga Jul 11, 2017

Contributor

And here

@@ -76,7 +76,7 @@ build_rpm() {
mkdir -p "/tmp/pkg/snapd-$version"
cp -rav -- * "/tmp/pkg/snapd-$version/"
mkdir -p "$rpm_dir/SOURCES"
- (cd /tmp/pkg || tar c${archive_compression}f "$rpm_dir/SOURCES/$archive_name" "snapd-$version" "$extra_tar_args")
+ (cd /tmp/pkg && tar c${archive_compression}f "$rpm_dir/SOURCES/$archive_name" "snapd-$version" $extra_tar_args)
@zyga

zyga Jul 11, 2017

Contributor

Nice catch!!

@@ -1,4 +1,5 @@
summary: Check commands help
+systems: [+fedora-*]
@zyga

zyga Jul 11, 2017

Contributor

❤️

@zyga zyga closed this Jul 12, 2017

@Conan-Kudo Conan-Kudo deleted the Conan-Kudo:packaging-fedora-fixbuild branch Jul 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment