Package Details: snapd 2.56.2-1

Git Clone URL: https://aur.archlinux.org/snapd.git (read-only, click to copy)
Package Base: snapd
Description: Service and tools for management of snap packages.
Upstream URL: https://github.com/snapcore/snapd
Licenses: GPL3
Conflicts: snap-confine
Submitter: Barthalion
Maintainer: bboozzoo (zyga, mardy)
Last Packager: bboozzoo
Votes: 187
Popularity: 4.31
First Submitted: 2018-01-07 17:37 (UTC)
Last Updated: 2022-06-20 08:07 (UTC)

Pinned Comments

bboozzoo commented on 2018-10-25 11:56 (UTC) (edited on 2018-10-25 12:31 (UTC) by bboozzoo)

2.36 is the first release with AppArmor enabled by default on Arch.

If you do not have AppArmor enabled at boot there should be no functional changes visible.

If you wish to use snaps with Apparmor, first make sure that Apparmor is enabled during boot, see https://wiki.archlinux.org/index.php/AppArmor for details. After upgrading the package, you need to do the following steps:

  • Reload the profiles: systemctl restart apparmor.service
  • Restart snapd: systemctl restart snapd.service
  • Load profiles for snaps: systemctl enable --now snapd.apparmor.service

Latest Comments

bboozzoo commented on 2022-06-20 08:09 (UTC)

@patlefort thanks for reporting this. I've pushed the relevant change with the latest update.

patlefort commented on 2022-06-15 13:44 (UTC)

This package doesn't play nice with lto enabled. Can you please add options=(!lto)?

illuser commented on 2022-05-10 13:01 (UTC)

Upstream has just merged fixes for when Clang is the C-compiler that is used by the system. It should resolve problems with building this package.

See: https://github.com/snapcore/snapd/pull/11765

fabrixx commented on 2022-03-07 20:00 (UTC)

I get the error only if I update snapd with pamac. If I use yay everything works fine and the update takes effect.

I cannot update snapd via pamac.

bboozzoo commented on 2022-03-07 06:55 (UTC)

@gavmanz please see: https://wiki.archlinux.org/title/Arch_User_Repository#Getting_started and https://wiki.archlinux.org/title/PKGBUILD#makedepends I didn't make those guidelines, but I seriously doubt they make sense since the same problems pops up over and over again.

gavmanz commented on 2022-03-07 02:22 (UTC)

It seems that this depends on the "automake" package from the official repos, but it is not listed as a dependency. I had an install error about aclocal until installing automake.

bboozzoo commented on 2022-03-04 17:32 (UTC)

@bob-xygene hi, idk what pamac is. I assume it's some package builder? The snapd package builds fine with makepkg (and yay for that matter). I suggest you contact with pamac upstream, and collect a backtrace for them.

bob-xygene commented on 2022-03-04 17:22 (UTC)

snapd makes pamac-manager crash every new update, have to exclude snapd for pamac not crash. /strace -t pamac-manager .... 18:08:45 statx(AT_FDCWD, "/tmp/pamac/aur-franck/snapd-2.54.4-1", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=120, ...}) = 0 18:08:45 statx(AT_FDCWD, "/tmp/pamac/aur-franck/snapd-2.54.4-1/desc", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=73, ...}) = 0 18:08:45 futex(0x55ae6f8f36c0, FUTEX_WAKE_PRIVATE, 1) = 1 18:08:45 futex(0x55ae6f8f36b0, FUTEX_WAKE_PRIVATE, 1) = 1 18:08:45 poll([{fd=4, events=POLLIN}, {fd=16, events=POLLIN}, {fd=20, events=POLLIN}], 3, 0) = 0 (Timeout) 18:08:45 poll([{fd=4, events=POLLIN}, {fd=16, events=POLLIN}, {fd=20, events=POLLIN}], 3, 0) = 1 ([{fd=4, revents=POLLIN}]) 18:08:45 read(4, "\1\0\0\0\0\0\0\0", 16) = 8 18:08:45 write(26, "%FILENAME%\nsnapd-2.54.4-1-any.pk"..., 39) = 39 18:08:45 write(26, "%NAME%\nsnapd\n\n", 14) = 14 18:08:45 write(26, "%VERSION%\n2.54.4-1\n\n", 20) = 20 18:08:45 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x55ab2a259c71} --- 18:08:45 +++ killed by SIGSEGV (core dumped) +++ Erreur de segmentation (core dumped)

Since its only snapd that does the crash it must be snapd the culprit. It crashes when writing this file : /tmp/pamac/aur-franck/snapd-2.54.4-1/desc

/cat /tmp/pamac/aur-franck/snapd-2.54.4-1/desc %FILENAME% snapd-2.54.4-1-any.pkg.tar

%NAME% snapd

%VERSION% 2.54.4-1

/pamac-manager --version Pamac 10.3.0-2

Is there any hope ?

nerveous commented on 2022-02-07 14:19 (UTC)

@bboozzoo still issue for me, so i decide to follow this tutorial https://snapcraft.io/docs/installing-snap-on-arch-linux

bboozzoo commented on 2022-02-07 06:23 (UTC)

@nerveous IDK, have you tried again? maybe github returned something silly. Is snapd-2.54.2.tar.xz even a valid tar archive? Do you have a proxy on your network?

==> Making package: snapd 2.54.2-1 (pon, 7 lut 2022, 07:22:00)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading snapd-2.54.2.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   663  100   663    0     0   2426      0 --:--:-- --:--:-- --:--:--  2428
100 4711k  100 4711k    0     0  5467k      0 --:--:-- --:--:-- --:--:-- 25.3M
  -> Found 0001-Treat-XDG_DATA_DIRS-like-PATH.patch
==> Validating source files with sha256sums...
    snapd-2.54.2.tar.xz ... Passed
    0001-Treat-XDG_DATA_DIRS-like-PATH.patch ... Passed
==> Extracting sources...

nerveous commented on 2022-02-07 03:49 (UTC) (edited on 2022-02-07 03:50 (UTC) by nerveous)

What is this issue ?

==> Making package: snapd 2.54.2-1 (Mon Feb  7 10:48:37 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found snapd-2.54.2.tar.xz
  -> Found 0001-Treat-XDG_DATA_DIRS-like-PATH.patch
==> Validating source files with sha256sums...
    snapd-2.54.2.tar.xz ... FAILED
    0001-Treat-XDG_DATA_DIRS-like-PATH.patch ... Passed
==> ERROR: One or more files did not pass the validity check!
 -> error making: snapd

bboozzoo commented on 2022-01-29 20:06 (UTC)

@exxnav none of these flags are set by the build files in snapd source tree or in PKGBUILD, what means it's your local makepkg.conf or something your distro sets. It's probably best if you ask in EndevourOS forums/mailing lists.

exxnav commented on 2022-01-29 18:01 (UTC) (edited on 2022-01-29 18:01 (UTC) by exxnav)

getting this while trying to install on EndeavourOS

gcc-5: error: unrecognized command line option '-fno-plt'
gcc-5: error: unrecognized command line option '-fstack-clash-protection'
gcc-5: error: unrecognized command line option '-fcf-protection'

bboozzoo commented on 2021-12-30 16:17 (UTC)

@illuser no clue, builds fine here and in a clean chroot, maybe you've tweaked your CFLAGS and something is wrong, or maybe it's something else entirely. The AUR distribution model is inherently flawed as each user tweaks their system and can introduce breaking changes that are unique to their setup. The package that does not build in your system is libseccomp-golang, you can try to find out the actual revision of github.com/seccomp/libseccomp-golang from the go.mod file and file a bug upstream.

illuser commented on 2021-12-29 23:23 (UTC)

@bboozzoo I am using the go package and not gcc-go

bboozzoo commented on 2021-12-29 17:06 (UTC)

@illuser make sure you use the actual go package and not gcc-go.

illuser commented on 2021-12-29 12:40 (UTC)

Having issues with installing 2.54.1:

*** Setting version to '2.54.1-1' from user.
# github.com/snapcore/snapd/vendor/github.com/seccomp/libseccomp-golang
../go/src/github.com/snapcore/snapd/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:630:2: duplicate case _Ciconst_C_ACT_KILL_THREAD (value 0) in switch
    previous case at ../go/src/github.com/snapcore/snapd/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:626:2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: snapd

soideawe commented on 2021-12-21 14:07 (UTC) (edited on 2021-12-21 14:08 (UTC) by soideawe)

when i using yay -S snapd PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.10/site-packages/pynput-1.7.5-py3.10.egg-info/PKG-INFO' make[1]: [Makefile:4725: snap-confine/snap-confine.8] Error 1 make[1]: Leaving directory '/home/balja/.cache/yay/snapd/src/snapd-2.53.4/cmd' make: [Makefile:1389: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... -> error making: snapd

Anaximander commented on 2021-12-19 18:16 (UTC) (edited on 2021-12-19 18:21 (UTC) by Anaximander)

Not exactly sure what happened here.

Cloned
makepkg -si
Making package
Check runtime dependencies
Installing missing dependencies [apparmor; squashfs-tools]
Check buildtime dependencies
Installing missing dependencies [go; go-tools; python-docutils]
Retrieving Sources
Downloading snapd-2.53.4.tar.xz
curl: (7) Failed to connect to objects.githubusercontent.com port 443 after 14 ms: Connection refused
==> ERROR: Failure while downloading https://github.com/snapcore/snapd/releases/download/2.53.4/snapd_2.53.4.vendor.tar.xz
    Aborting...

Since it installed apparmor, enabled and started the apparmor service. I searched PKGBUILD and the 'objects.githubusercontent.com' is not in there in a way that I can find.

bboozzoo commented on 2021-12-16 16:25 (UTC)

@soideawe sorry, but the snippet you attached does not contain anything meaningful, however I do recommend starting with: https://wiki.archlinux.org/title/Arch_User_Repository#Getting_started specifically the point about having base-devel installed.

soideawe commented on 2021-12-16 15:02 (UTC)

make[1]: Leaving directory '/home/USER/.cache/yay/snapd/src/snapd-2.53.4/cmd' make: *** [Makefile:1389: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... -> error making: snapd

bboozzoo commented on 2021-12-08 07:09 (UTC)

@fabrixx snapd.install is definitely in the tree. I'm sorry, but I have no clue in what state is your local tree. Have you tried running git reset --hard? Or maybe just do a fresh clone.

fabrixx commented on 2021-12-08 06:04 (UTC)

Snapd construction in progress ... ==> ERROR: The install file (snapd.install) does not exist or is not a regular file.

bboozzoo commented on 2021-11-08 06:53 (UTC)

@FabioLima base-devel is an implicit dependency for all packages from AUR: https://wiki.archlinux.org/title/Arch_User_Repository#Getting_started

FabioLima commented on 2021-11-07 04:13 (UTC)

I am tryng do makepkg in a "clean room" arch install, but........

$ git clone https://aur.archlinux.org/snapd.git ; cd snapd ; makepkg -sirc
Cloning into 'snapd'...
remote: Enumerating objects: 550, done.
remote: Counting objects: 100% (550/550), done.
remote: Compressing objects: 100% (367/367), done.
remote: Total 550 (delta 184), reused 541 (delta 178), pack-reused 0
Receiving objects: 100% (550/550), 208.93 KiB | 49.00 KiB/s, done.
Resolving deltas: 100% (184/184), done.
==> Making package: snapd 2.53.1-1 (Sun 07 Nov 2021 01:09:19 AM -03)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading snapd-2.53.1.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   632  100   632    0     0   1725      0 --:--:-- --:--:-- --:--:--  1726
100 4602k  100 4602k    0     0  2291k      0  0:00:02  0:00:02 --:--:-- 3505k
==> Validating source files with sha256sums...
    snapd-2.53.1.tar.xz ... Passed
==> Extracting sources...
  -> Extracting snapd-2.53.1.tar.xz with bsdtar
==> Starting prepare()...
==> Starting build()...
*** Setting version to '2.53.1-1' from user.
# github.com/snapcore/snapd/cmd/snap
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exec: "gcc": executable file not found in $PATH

==> ERROR: A failure occurred in build().
    Aborting...

Unfortunaly installing gcc make it go failing further.

bendavis78 commented on 2021-10-19 16:46 (UTC) (edited on 2021-10-19 17:08 (UTC) by bendavis78)

FYI, the error I was getting earlier:

snap-exec is not a static binary

seems to be due to the fact that I had gcc-go installed. I replaced the gcc-go package with just go, and things built successfully after that.

omerkaraduman commented on 2021-09-21 13:26 (UTC)

@bboozzoo Thank you for your helps, the problem was solved.

bboozzoo commented on 2021-09-21 11:41 (UTC)

@omerkaraduman thanks for the heads up, this is caused by glib 2.70 landing in testing. I've pushed an update with a patch from upstream.

omerkaraduman commented on 2021-09-21 11:14 (UTC)

Snapd package is crashing, please fix it. When makepkg -si command given, I take following autput:

/usr/bin/rst2man snap-confine/snap-confine.rst > snap-confine/snap-confine.8 touch snap-mgmt/.dirstamp /usr/bin/rst2man snap-discard-ns/snap-discard-ns.rst > snap-discard-ns/snap-discard-ns.8 libsnap-confine-private/test-utils.c: 'rm_rf_tmp' işlevinde: libsnap-confine-private/test-utils.c:63:9: hata: 'g_spawn_check_exit_status' is deprecated: Use 'g_spawn_check_wait_status' instead [-Werror=deprecated-declarations] 63 | g_assert_true(g_spawn_check_exit_status(exit_status, NULL)); | ^~~~~~~~~~~~~ In file included from /usr/include/glib-2.0/glib.h:81, from libsnap-confine-private/test-utils.c:24: /usr/include/glib-2.0/glib/gspawn.h:280:10: bilgi: declared here 280 | gboolean g_spawn_check_exit_status (gint wait_status, | ^~~~~~~~~~~~~~~~~~~~~~~~~ mv -f libsnap-confine-private/.deps/snap_confine_unit_tests-unit-tests.Tpo libsnap-confine-private/.deps/snap_confine_unit_tests-unit-tests.Po /usr/bin/rst2man snapd-env-generator/snapd-env-generator.rst > snapd-env-generator/snapd-env-generator.8 mv -f libsnap-confine-private/.deps/system_shutdown_unit_tests-unit-tests.Tpo libsnap-confine-private/.deps/system_shutdown_unit_tests-unit-tests.Po cc1: all warnings being treated as errors make[1]: [Makefile:3119: libsnap-confine-private/snap_confine_unit_tests-test-utils.o] Error 1 make[1]: Bitmemiş işler için bekliyor.... mv -f snap-confine/.deps/snap_confine_unit_tests-cookie-support-test.Tpo snap-confine/.deps/snap_confine_unit_tests-cookie-support-test.Po mv -f snap-confine/.deps/snap_confine_unit_tests-snap-device-helper-test.Tpo snap-confine/.deps/snap_confine_unit_tests-snap-device-helper-test.Po mv -f system-shutdown/.deps/system_shutdown_unit_tests-system-shutdown-utils-test.Tpo system-shutdown/.deps/system_shutdown_unit_tests-system-shutdown-utils-test.Po mv -f snap-confine/.deps/snap_confine_unit_tests-snap-confine-invocation-test.Tpo snap-confine/.deps/snap_confine_unit_tests-snap-confine-invocation-test.Po mv -f snap-confine/.deps/snap_confine_unit_tests-mount-support-test.Tpo snap-confine/.deps/snap_confine_unit_tests-mount-support-test.Po mv -f snap-confine/.deps/snap_confine_unit_tests-ns-support-test.Tpo snap-confine/.deps/snap_confine_unit_tests-ns-support-test.Po mv -f snap-confine/.deps/snap_confine_unit_tests-snap-confine-args-test.Tpo snap-confine/.deps/snap_confine_unit_tests-snap-confine-args-test.Po make[1]: Leaving directory '/home/omerkaraduman/snapd/src/snapd-2.52/cmd' make: *** [Makefile:1203: all] Error 2 ==> HATA: build() içinde bir hata oluştu. Çıkılıyor...

bboozzoo commented on 2021-08-28 15:46 (UTC)

@Hori base-devel is an implicit dependency of all packages from AUR, please see https://wiki.archlinux.org/title/Arch_User_Repository#Getting_started

4eeqz commented on 2021-08-28 12:26 (UTC) (edited on 2021-08-28 12:27 (UTC) by 4eeqz)

I get the following error while building: PKGBUILD: line 97: autoreconf: command not found

The autoconf package should be added as a dependency / build dependency

bboozzoo commented on 2021-07-30 09:59 (UTC)

@abhaypatil2000 please follow the AUR getting started steps: https://wiki.archlinux.org/title/Arch_User_Repository#Getting_started

abhaypatil2000 commented on 2021-07-29 20:29 (UTC)

Starting prepare()...
  -> applying 0001-snap-squashfs-handle-squashfs-tools-4.5.patch
/home/abhay/aur/snapd/PKGBUILD: line 50: patch: command not found
==> ERROR: A failure occurred in prepare().
    Aborting...

I am getting this error. Any idea how to solve it? I have tried to delete the repo and reclone it. Still the same error.

Hyllios commented on 2021-07-26 03:06 (UTC)

This is flagged as out of date, however the fix is very simple.

Update the following lines

pkgver=2.51.3
...
sha256sums=('67d3701b52484d7dba9c7b122752429eafbb20a0182966dd44ab1b1f6c1b780e')

bboozzoo commented on 2021-06-11 05:21 (UTC)

@bendavis78 builds fine in clean chroot, suggesting something in your system is most likely responsible for the problem. My rough guess is there's some tweaks in makepkg.conf that confuse the go link too.

The procedure is described in archwiki and has been linked to here many times. eg here: https://aur.archlinux.org/packages/snapd/#comment-810009

bendavis78 commented on 2021-06-10 20:12 (UTC)

I'm getting this error when using makepkg:

==> Starting check()...
snap-exec is not a static binary

bboozzoo commented on 2021-05-28 16:49 (UTC)

@TheCultLeader666 try building in a clean chroot then: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_clean_chroot#Classic_way

TheCultLeader666 commented on 2021-05-28 15:28 (UTC)

@bboozzoo I have the base-devel group installed, still getting the error

bboozzoo commented on 2021-05-28 15:25 (UTC)

@TheCultLeader666 make sure to have base-devel group installed.

TheCultLeader666 commented on 2021-05-28 15:22 (UTC) (edited on 2021-05-28 15:22 (UTC) by TheCultLeader666)

I'm getting this error when installing, I've tried reinstalling gcc:

cgo: exec gcc-5: exec: "gcc-5": executable file not found in $PATH
==> ERROR: A failure occurred in build().
    Aborting...
error making: snapd

bboozzoo commented on 2021-04-26 07:12 (UTC)

@sighup_mae yes it is maintained. I did not see a reason to update as the changes in point releases were focused on Ubuntu Core. The 2.50 release brings some changes to the desktop, hence the package will be updated again. If you are eager to see an update each time the upstream creates a new tag, you are always welcome to send me a patch.

sighup_mae commented on 2021-04-26 07:06 (UTC)

Are the maintainers still active? Package has been out-of-date for over a month now.

bendavis78 commented on 2021-03-24 16:08 (UTC) (edited on 2021-03-24 16:10 (UTC) by bendavis78)

I'm getting this error when running makepkg -i:

==> Starting check()...
snap-exec is not a static binary

yxgi5 commented on 2021-03-16 08:53 (UTC) (edited on 2021-03-16 09:03 (UTC) by yxgi5)

Is there any solution?


make[1]: Leaving directory '/home/andy/.cache/yay/snapd/src/snapd-2.49.1/cmd'
==> Starting check()...
snap-exec is not a static binary
error making: snapd

ArchRob commented on 2021-02-27 22:36 (UTC)

@benalexau the tip about pkgconf helped. I was getting weird errors like:

Traceback (most recent call last):
  File "/usr/bin/rst2man", line 26, in <module>
    publish_cmdline(writer=manpage.Writer(), description=description)
  File "/usr/lib/python3.9/site-packages/docutils/core.py", line 352, in publish_cmdline
    pub.set_components(reader_name, parser_name, writer_name)
  File "/usr/lib/python3.9/site-packages/docutils/core.py", line 94, in set_component

I ran sudo pacman -S pkgconf. It was already installed, and pacman confirmed it was simply reinstalling. But after that, I was able to build this package without issue. No idea why, but it worked.

bboozzoo commented on 2021-02-27 18:42 (UTC)

@rageltman looks like the Go compiler crashed in your system. Maybe try buliding a minimal hello world, you can find an example here: https://gobyexample.com/hello-world Perhaps you should also file a bug for the golang package.

rageltman commented on 2021-02-27 15:57 (UTC)

Not quite sure what to make of this one:

[2021-02-27T05:38:01.052Z] ==> Starting build()...
[2021-02-27T05:38:01.052Z] fatal: not a git repository (or any of the parent directories): .git
[2021-02-27T05:38:01.052Z] fatal: not a git repository (or any of the parent directories): .git
[2021-02-27T05:38:01.052Z] *** Setting version to '2.49-1' from user.
[2021-02-27T05:38:01.052Z] # net
[2021-02-27T05:38:01.052Z] cgo: cannot load DWARF output from $WORK/b058//_cgo_.o: decoding dwarf section info at offset 0x0: too short
[2021-02-27T05:38:01.052Z] # os/user
[2021-02-27T05:38:01.052Z] cgo: cannot load DWARF output from $WORK/b064//_cgo_.o: decoding dwarf section info at offset 0x0: too short
[2021-02-27T05:38:01.052Z] ==> ERROR: A failure occurred in build().
[2021-02-27T05:38:01.052Z]     Aborting...
script returned exit code 255

cindrmon commented on 2021-02-14 10:49 (UTC)

@bboozzoo thanks for the tip! it worked when i switched back to bash. i guess it is because i was using fish, no wonder it wouldn't work. thanks again!

bboozzoo commented on 2021-02-14 09:42 (UTC)

@cindrmon /etc/profile.d/snapd.sh is only sourced by bash and zsh. There's a systemd mechanism that injects the right variables into your session via /usr/lib/environment.d/990-snapd.conf which should also work if you use other shells. It's possible that your desktop environment can mess something up too, IIRC lxde did that. Lastly, the profile scripts in your $HOME can override PATH by mistake. I suggest you add a new account, log into that and check whether PATH includes snap locations.

cindrmon commented on 2021-02-14 05:15 (UTC)

i have a inquiry

why does the /etc/profile.d/snapd.sh don't work?

i've been restarting my pc over and over again after installing this specific package and there is still no snap in the $PATH variable.

i even tried executing the script itself, and it still doesn't work.

can anyone help?

bboozzoo commented on 2021-01-28 06:36 (UTC)

@benalexau the base-devel group is an implicit requirement for all AUR packages, pkgconf (which provides pkg-config) is already included in that group. Please make sure that it is installed in your system before building any AUR packages.

benalexau commented on 2021-01-28 00:53 (UTC)

Error:

==> Starting build()...
*** Setting version to '2.48.2-1' from user.
# pkg-config --cflags  -- libseccomp libseccomp
pkg-config: exec: "pkg-config": executable file not found in $PATH
==> ERROR: A failure occurred in build().
    Aborting...

Solved by installing pkgconf. Please add pkgconf to makedepends.

commented on 2020-12-16 17:29 (UTC)

New update from upstream with check sum:

# Maintainer: aimileus <me at aimileus dot nl>
# Maintainer: Maciej Borzecki <maciek.borzecki@gmail.com>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Zygmunt Krynicki <me at zygoon dot pl>

pkgname=snapd
pkgdesc="Service and tools for management of snap packages."
depends=('squashfs-tools' 'libseccomp' 'libsystemd' 'apparmor')
optdepends=('bash-completion: bash completion support'
            'xdg-desktop-portal: desktop integration')
pkgver=2.48.2
pkgrel=1
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url="https://github.com/snapcore/snapd"
license=('GPL3')
makedepends=('git' 'go' 'go-tools' 'libseccomp' 'libcap' 'systemd' 'xfsprogs' 'python-docutils' 'apparmor')
conflicts=('snap-confine')
options=('!strip' 'emptydirs')
install=snapd.install
source=("$pkgname-$pkgver.tar.xz::https://github.com/snapcore/${pkgname}/releases/download/${pkgver}/${pkgname}_${pkgver}.vendor.tar.xz")
sha256sums=('7d3b4772b35af699eebedc9ade5bade7b87be0cdb7a9dec7511d3c096e553a50')

_gourl=github.com/snapcore/snapd

prepare() {
  cd "$pkgname-$pkgver"

  export GOPATH="$srcdir/go"
  mkdir -p "$GOPATH"

  # Have snapd checkout appear in a place suitable for subsequent GOPATH. This
  # way we don't have to go get it again and it is exactly what the tag/hash
  # above describes.
  mkdir -p "$(dirname "$GOPATH/src/${_gourl}")"
  ln --no-target-directory -fs "$srcdir/$pkgname-$pkgver" "$GOPATH/src/${_gourl}"

  for name in "${source[@]}"; do
      if [[ "${name%.patch}" == "$name" ]]; then
          # not a patch
          continue
      fi
      msg2 "applying $name"
      patch -p1 -i "$srcdir/$name"
  done
}

build() {
  cd "$pkgname-$pkgver"
  export GOPATH="$srcdir/go"

  # GOFLAGS may be modified by CI tools
  # GOFLAGS are the go build flags for all binaries, GOFLAGS_SNAP are for snap
  # build only.
  GOFLAGS=""
  GOFLAGS_SNAP="-tags nomanagers"
  # snapd does not support modules yet, explicitly disable Go modules
  export GO111MODULE=off

  export CGO_ENABLED="1"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"

  ./mkversion.sh $pkgver-$pkgrel

  # because argument expansion with quoting in bash is hard, and -ldflags=-extldflags='-foo'
  # is not exactly the same as -ldflags "-extldflags '-foo'" use the array trick
  # to pass exactly what we want
  flags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '$LDFLAGS'" -trimpath)
  staticflags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '$LDFLAGS -static'" -trimpath)
  # Build/install snap and snapd
  go build "${flags[@]}" -o "$srcdir/go/bin/snap" $GOFLAGS_SNAP "${_gourl}/cmd/snap"
  go build "${flags[@]}" -o "$srcdir/go/bin/snapd" $GOFLAGS "${_gourl}/cmd/snapd"
  go build "${flags[@]}" -o "$srcdir/go/bin/snap-seccomp" $GOFLAGS "${_gourl}/cmd/snap-seccomp"
  go build "${flags[@]}" -o "$srcdir/go/bin/snap-failure" $GOFLAGS "${_gourl}/cmd/snap-failure"
  # build snap-exec and snap-update-ns completely static for base snaps
  go build "${staticflags[@]}" -o "$srcdir/go/bin/snap-update-ns" $GOFLAGS "${_gourl}/cmd/snap-update-ns"
  go build "${staticflags[@]}" -o "$srcdir/go/bin/snap-exec" $GOFLAGS "${_gourl}/cmd/snap-exec"
  go build "${staticflags[@]}" -o "$srcdir/go/bin/snapctl" $GOFLAGS "${_gourl}/cmd/snapctl"

  # Generate data files such as real systemd units, dbus service, environment
  # setup helpers out of the available templates
  make -C data \
       BINDIR=/bin \
       LIBEXECDIR=/usr/lib \
       SYSTEMDSYSTEMUNITDIR=/usr/lib/systemd/system \
       SNAP_MOUNT_DIR=/var/lib/snapd/snap \
       SNAPD_ENVIRONMENT_FILE=/etc/default/snapd

  cd cmd
  autoreconf -i -f
  ./configure \
    --prefix=/usr \
    --libexecdir=/usr/lib/snapd \
    --with-snap-mount-dir=/var/lib/snapd/snap \
    --enable-apparmor \
    --enable-nvidia-biarch \
    --enable-merged-usr
  make $MAKEFLAGS
}

check() {
    export GOPATH="$srcdir/go"
    cd "$srcdir/go/src/${_gourl}"

    # make sure the binaries that need to be built statically really are
    for binary in snap-exec snap-update-ns snapctl; do
        LC_ALL=C ldd "$srcdir/go/bin/$binary" 2>&1 | grep -q 'not a dynamic executable'
    done
}

package() {
  cd "$pkgname-$pkgver"
  export GOPATH="$srcdir/go"
  # snapd does not use modules, setting GO111MODULE=on in the environment breaks
  # the build
  unset GO111MODULE

  # Install bash completion
  install -Dm644 data/completion/bash/snap \
    "$pkgdir/usr/share/bash-completion/completions/snap"
  install -Dm644 data/completion/bash/complete.sh \
    "$pkgdir/usr/lib/snapd/complete.sh"
  install -Dm644 data/completion/bash/etelpmoc.sh \
    "$pkgdir/usr/lib/snapd/etelpmoc.sh"
  # Install zsh completion
  install -Dm644 data/completion/zsh/_snap \
    "$pkgdir/usr/share/zsh/site-functions/_snap"

  # Install systemd units, dbus services and a script for environment variables
  make -C data/ install \
     DBUSSERVICESDIR=/usr/share/dbus-1/services \
     BINDIR=/usr/bin \
     SYSTEMDSYSTEMUNITDIR=/usr/lib/systemd/system \
     SNAP_MOUNT_DIR=/var/lib/snapd/snap \
     DESTDIR="$pkgdir"
  # no tweaks for sudo are needed
  rm -rfv "$pkgdir/etc/sudoers.d"

  # Install polkit policy
  install -Dm644 data/polkit/io.snapcraft.snapd.policy \
    "$pkgdir/usr/share/polkit-1/actions/io.snapcraft.snapd.policy"

  # Install executables
  install -Dm755 "$srcdir/go/bin/snap" "$pkgdir/usr/bin/snap"
  install -Dm755 "$srcdir/go/bin/snapctl" "$pkgdir/usr/lib/snapd/snapctl"
  install -Dm755 "$srcdir/go/bin/snapd" "$pkgdir/usr/lib/snapd/snapd"
  install -Dm755 "$srcdir/go/bin/snap-seccomp" "$pkgdir/usr/lib/snapd/snap-seccomp"
  install -Dm755 "$srcdir/go/bin/snap-failure" "$pkgdir/usr/lib/snapd/snap-failure"
  install -Dm755 "$srcdir/go/bin/snap-update-ns" "$pkgdir/usr/lib/snapd/snap-update-ns"
  install -Dm755 "$srcdir/go/bin/snap-exec" "$pkgdir/usr/lib/snapd/snap-exec"
  # Ensure /usr/bin/snapctl is a symlink to /usr/libexec/snapd/snapctl
  ln -s /usr/lib/snapd/snapctl "$pkgdir/usr/bin/snapctl"

  # pre-create directories
  install -dm755 "$pkgdir/var/lib/snapd/snap"
  install -dm755 "$pkgdir/var/cache/snapd"
  install -dm755 "$pkgdir/var/lib/snapd/apparmor"
  install -dm755 "$pkgdir/var/lib/snapd/assertions"
  install -dm755 "$pkgdir/var/lib/snapd/dbus-1/services"
  install -dm755 "$pkgdir/var/lib/snapd/dbus-1/system-services"
  install -dm755 "$pkgdir/var/lib/snapd/desktop/applications"
  install -dm755 "$pkgdir/var/lib/snapd/device"
  install -dm755 "$pkgdir/var/lib/snapd/hostfs"
  install -dm755 "$pkgdir/var/lib/snapd/mount"
  install -dm755 "$pkgdir/var/lib/snapd/seccomp/bpf"
  install -dm755 "$pkgdir/var/lib/snapd/snap/bin"
  install -dm755 "$pkgdir/var/lib/snapd/snaps"
  install -dm755 "$pkgdir/var/lib/snapd/inhibit"
  install -dm755 "$pkgdir/var/lib/snapd/lib/gl"
  install -dm755 "$pkgdir/var/lib/snapd/lib/gl32"
  install -dm755 "$pkgdir/var/lib/snapd/lib/vulkan"
  install -dm755 "$pkgdir/var/lib/snapd/lib/glvnd"
  # these dirs have special permissions
  install -dm111 "$pkgdir/var/lib/snapd/void"
  install -dm700 "$pkgdir/var/lib/snapd/cookie"
  install -dm700 "$pkgdir/var/lib/snapd/cache"

  make -C cmd install DESTDIR="$pkgdir/"

  # Install man file
  mkdir -p "$pkgdir/usr/share/man/man8"
  "$srcdir/go/bin/snap" help --man > "$pkgdir/usr/share/man/man8/snap.8"

  # Install the "info" data file with snapd version
  install -m 644 -D "$srcdir/go/src/${_gourl}/data/info" \
          "$pkgdir/usr/lib/snapd/info"

  # Remove snappy core specific units
  rm -fv "$pkgdir/usr/lib/systemd/system/snapd.system-shutdown.service"
  rm -fv "$pkgdir/usr/lib/systemd/system/snapd.autoimport.service"
  rm -fv "$pkgdir/usr/lib/systemd/system/snapd.recovery-chooser-trigger.service"
  rm -fv "$pkgdir"/usr/lib/systemd/system/snapd.snap-repair.*
  rm -fv "$pkgdir"/usr/lib/systemd/system/snapd.core-fixup.*
  # and scripts
  rm -fv "$pkgdir/usr/lib/snapd/snapd.core-fixup.sh"
  rm -fv "$pkgdir/usr/bin/ubuntu-core-launcher"
  rm -fv "$pkgdir/usr/lib/snapd/system-shutdown"
}

dmp1ce commented on 2020-12-11 15:01 (UTC)

@bboozzoo: Thank you. Maybe this issue will be more motivating. https://bugs.archlinux.org/task/68943

bboozzoo commented on 2020-12-11 14:51 (UTC)

@dmp1ce thanks for checking. I see that they already closed a task because AUR was mentioned, that's very useful (as always).

If you care enough about Arch you could try filing a new bug, attaching the snippet I provided, include the version of apparmor, linux, linux-lts, and preferrably strace -vf ./a.out too. IMO it's most likely a bug in libapparmor. This is unrelated to snapd or AUR.

dmp1ce commented on 2020-12-11 14:34 (UTC)

david@bar:/tmp/apparmor_test$ gcc a.c -lapparmor
david@bar:/tmp/apparmor_test$ ls
a.c  a.out
david@bar:/tmp/apparmor_test$ ./a.out 
aa_getcon: Invalid argument
1 david@bar:/tmp/apparmor_test$ uname -a
Linux bar 5.4.82-1-lts #1 SMP Tue, 08 Dec 2020 12:10:59 +0000 x86_64 GNU/Linux

dmp1ce commented on 2020-12-11 14:29 (UTC) (edited on 2020-12-11 14:40 (UTC) by dmp1ce)

$ ./a.out 
david@bar:/tmp/apparmor_test$ gcc a.c -lapparmor
david@bar:/tmp/apparmor_test$ ls
a.c  a.out
david@bar:/tmp/apparmor_test$ ./a.out 
label: unconfined
mode: (null)   
david@bar:/tmp/apparmor_test$ uname -a
Linux bar 5.9.13-arch1-1 #1 SMP PREEMPT Tue, 08 Dec 2020 12:09:55 +0000 x86_64 GNU/Linux

bboozzoo commented on 2020-12-11 13:53 (UTC)

@dmp1ce sorry, I meant this gist: https://gist.github.com/bboozzoo/840cdbd066ab81ca438fab6b0b75ea1b build it with gcc a.c -lapparmor. Does it run?

dmp1ce commented on 2020-12-11 12:49 (UTC)

I posted an issue but I have a feeling it will be rejected because of snapd being from the AUR. https://bugs.archlinux.org/task/68938

dmp1ce commented on 2020-12-11 12:40 (UTC) (edited on 2020-12-11 12:42 (UTC) by dmp1ce)

@bboozzoo: aa-status seems to work on LTS. The other command didn't find the file. I'll try the snippet, but the snippet you provided looks like my error output. Is it the right gist?

david@bar:~$ cat /proc/slef/attr/apparmor/current                                                                                                                                                                                             
cat: /proc/slef/attr/apparmor/current: No such file or directory                                                                                                                                                                              
1 david@bar:~$ sudo cat /proc/slef/attr/apparmor/current                                                                                                                                                                                      
[sudo] password for david:                                                                                                                                                                                                                    
cat: /proc/slef/attr/apparmor/current: No such file or directory

bboozzoo commented on 2020-12-11 12:35 (UTC)

@dmp1ce so it may be a case when the new libapparmor does not handle old kernels too well. I would suggest you try to build the snippet I provided: https://gist.github.com/dmp1ce/8a321608fbcf4c3ea61fce134e1f0b0d and if that fails on the LTS kernel, you should most likely file a bug for the apparmor package.

dmp1ce commented on 2020-12-11 12:33 (UTC)

@bbozzoo: booting up non-LTS works fine. Do you still want the information on the LTS version?

bboozzoo commented on 2020-12-11 06:49 (UTC) (edited on 2020-12-11 07:21 (UTC) by bboozzoo)

@dmp1ce thanks, this is highly unexpected. Everything else suggests that AppArmor is enabled, but then it really isn't working:

openat(AT_FDCWD, "/proc/1051439/attr/apparmor/current", O_RDONLY) = -1 ENOENT (No such file or directory)
futex(0x7fabaf3ad368, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "cannot query current apparmor pr"..., 37cannot query current apparmor profile) = 37

Can you cat /proc/slef/attr/apparmor/current in a shell? Does it work? Does aa-status work?

Maybe it has something to do with the LTS kernel, I would suggest trying to boot the non-LTS one. Another thing to try, is to rebuild the snapd package, perhaps it was last built on your system before apparmor 2.x.x -> 3.x.x switch.

Edit: can you try building and running this snippet https://gist.github.com/dmp1ce/8a321608fbcf4c3ea61fce134e1f0b0d ?

dmp1ce commented on 2020-12-11 00:01 (UTC)

@bboozzoo: Thanks for looking into this. https://gist.github.com/dmp1ce/8a321608fbcf4c3ea61fce134e1f0b0d

bboozzoo commented on 2020-12-10 20:13 (UTC) (edited on 2020-12-10 20:14 (UTC) by bboozzoo)

@dmp1ce interesting, can you try running snap run --strace=--raw superproductivity and post the log to a pastebin? (the log may be too long for poasting in a comment here)

Edit: you need to pacman -S strace first

dmp1ce commented on 2020-12-10 20:01 (UTC)

@bboozzoo: Here is my output.

david@bar:~$ cat /proc/self/attr/current
unconfined
david@bar:~$ SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run superproductivity
2020/12/10 14:59:51.067755 tool_linux.go:68: DEBUG: re-exec not supported on distro "arch" yet
2020/12/10 14:59:51.082619 cmd_run.go:407: DEBUG: SELinux not enabled
DEBUG: umask reset, old umask was  022
DEBUG: security tag: snap.superproductivity.superproductivity
DEBUG: executable:   /usr/lib/snapd/snap-exec
DEBUG: confinement:  non-classic
DEBUG: base snap:    core18
DEBUG: ruid: 1000, euid: 0, suid: 0
DEBUG: rgid: 1000, egid: 1000, sgid: 1000
cannot query current apparmor profile: Invalid argument

bboozzoo commented on 2020-12-10 16:28 (UTC)

@dmp1ce what does cat /proc/self/attr/current show?

Can you upload the logs of SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run superproductivity to some pastebin?

dmp1ce commented on 2020-12-10 16:03 (UTC)

@bboozzoo, I think something is wrong with snapd, because restarting apparmor didn't help me. I am using an LTS kernel.

Here is what I tried:

david@bar:~$ superproductivity 
cannot query current apparmor profile: Invalid argument
1 david@bar:~$ sudo systemctl restart apparmor
[sudo] password for david: 
david@bar:~$ superproductivity 
cannot query current apparmor profile: Invalid argument
1 david@bar:~$ uname -a
Linux bar 5.4.82-1-lts #1 SMP Tue, 08 Dec 2020 12:10:59 +0000 x86_64 GNU/Linux

bboozzoo commented on 2020-12-10 10:12 (UTC)

@dmp1ce hit this today after the kernel update, but restarting apparmor.service fixed it. Looks like aa_getcon() from libapparmor returned EINVAL, which is weird because it's supposed to go and read /proc/self/attr/current AFAIK.

dmp1ce commented on 2020-12-09 13:36 (UTC)

Is anyone here getting an apparmor error? I'm getting:

$ hello-world
cannot query current apparmor profile: Invalid argument

sbussetti commented on 2020-11-07 23:05 (UTC)

I've done a full system update as of 20201107.

Attempting to install the latest version of snapd from here (currently '2.47.1-2') fails for me in the following way:

$ git clone https://aur.archlinux.org/snapd.git
$ cd snapd
$ makepkg -si

==> Making package: snapd 2.47.1-2 (Sat 07 Nov 2020 06:03:31 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found snapd-2.47.1.tar.xz
==> Validating source files with sha256sums...
    snapd-2.47.1.tar.xz ... Passed
==> Extracting sources...
  -> Extracting snapd-2.47.1.tar.xz with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
*** Setting version to '2.47.1-2' from user.
# github.com/snapcore/snapd/cmd/snap
panic: runtime error: slice bounds out of range [:3965974062] with capacity 566288

goroutine 1 [running]:
cmd/internal/goobj2.(*Reader).StringAt(...)
        /usr/lib/go/src/cmd/internal/goobj2/objfile.go:539
cmd/internal/goobj2.(*Reader).StringRef(0xc00063a7e0, 0x9f83, 0x38, 0x252)
        /usr/lib/go/src/cmd/internal/goobj2/objfile.go:561 +0x112
cmd/internal/goobj2.(*Reader).Pkg(...)
        /usr/lib/go/src/cmd/internal/goobj2/objfile.go:597
cmd/link/internal/loader.(*Loader).resolve(0xc00061c000, 0xc000620cc0, 0x38a7ffffffb, 0x40a4)
        /usr/lib/go/src/cmd/link/internal/loader/loader.go:603 +0xe5
cmd/link/internal/loader.Reloc2.Sym(0x7fcc5a07fbe8, 0xc000620cc0, 0xc00061c000, 0x0, 0x40a4)
        /usr/lib/go/src/cmd/link/internal/loader/loader.go:83 +0x48
cmd/link/internal/ld.(*deadcodePass).flood(0xc0000640a0)
        /usr/lib/go/src/cmd/link/internal/ld/deadcode.go:154 +0x1e9
cmd/link/internal/ld.deadcode(0xc000073880)
        /usr/lib/go/src/cmd/link/internal/ld/deadcode.go:264 +0xcc
cmd/link/internal/ld.Main(0x86f840, 0x20, 0x20, 0x1, 0x7, 0x10, 0x0, 0x0, 0x6dab5f, 0x1b, ...)
        /usr/lib/go/src/cmd/link/internal/ld/main.go:235 +0xd3c
main.main()
        /usr/lib/go/src/cmd/link/main.go:68 +0x1dc
==> ERROR: A failure occurred in build().
    Aborting...

bboozzoo commented on 2020-10-26 17:08 (UTC)

@codyps applied, thank you!

codyps commented on 2020-10-26 16:53 (UTC)

Package currently fails to build for me with the error:

loadelf: $WORK/b060/_pkg_.a(_x011.o): 284706: sym#70: ignoring symbol in section 1 (type 0)
.rela: relocation target _cgo_26061493d47f_C2func_getaddrinfo not defined
/usr/lib/go/pkg/tool/linux_amd64/link: too many errors

This is fixed by adding -linkmode external to the go flags used. This is based on the current go packaging guidelines (https://wiki.archlinux.org/index.php/Go_package_guidelines)

Here's a patch: https://gist.github.com/5a8dec1b14f1869d7882feb1bd7832ea

bboozzoo commented on 2020-10-26 06:33 (UTC)

@henrylaxen this still looks wrong, I do not have to modify anything in a chroot and I don't understand why need to do so. I can only recommend you build the AUR packages in clean chroots.

henrylaxen commented on 2020-10-25 18:51 (UTC)

Thanks bboozzoo for the pointers. I got it to compile by changing:

CPPFLAGS="-D_FORTIFY_SOURCE=2"

to CPPFLAGS="-D_FORTIFY_SOURCE=2 -O2"

Best wishes, Henry Laxen

bboozzoo commented on 2020-10-25 18:16 (UTC)

@henrylaxen it builds fine in my system and in a clean chroot. Maybe you're setting something in your environment? The /etc/makepkg.conf file is owned by pacman, so maybe you can try reinstalling that to reset whatever modifications you have there.

If that doesn't help you can always try and debug the recipe, adding -x -v to go build commands will produce more useful output.

henrylaxen commented on 2020-10-25 17:34 (UTC)

I never changed them from the default. I think these are the ones you are looking for:

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

If there are other flags, just let me know. Best wishes, Henry Laxen

bboozzoo commented on 2020-10-25 17:19 (UTC)

@henrylaxen what build flags are set in /etc/makepkg.conf?

henrylaxen commented on 2020-10-25 16:58 (UTC)

When trying to install, I get: In file included from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdlib.h:25, from _cgo_export.c:3: /usr/include/features.h:397:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] 397 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ cc1: all warnings being treated as errors ==> ERROR: A failure occurred in build(). Aborting...

Not sure how to proceed from here. Any pointers will be appreciated. Best wishes, Henry Laxen

MartinX3 commented on 2020-09-16 10:47 (UTC) (edited on 2020-09-16 10:47 (UTC) by MartinX3)

I'm getting a big, fat warning

==> WARNUNG: Verwende bestehenden $srcdir/ Baum
==> Beginne build()...
fatal: Kein Git-Repository (oder irgendein Elternverzeichnis bis zum Einhängepunkt /)
Stoppe bei Dateisystemgrenze (GIT_DISCOVERY_ACROSS_FILESYSTEM nicht gesetzt).
fatal: Kein Git-Repository (oder irgendein Elternverzeichnis bis zum Einhängepunkt /)
Stoppe bei Dateisystemgrenze (GIT_DISCOVERY_ACROSS_FILESYSTEM nicht gesetzt).
*** Setting version to '2.46.1-1' from user.

Ataraxy commented on 2020-09-11 01:22 (UTC)

I'm getting a build problem after removing .cache/yay/snapd:

configure: WARNING: "cannot find the valgrind tool, will not run unit tests through valgrind"
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
make: *** No rule to make target '"4"'.  Stop.
==> ERROR: A failure occurred in build().
    Aborting...
error making: snapd

bboozzoo commented on 2020-08-17 07:50 (UTC)

@dslink builds fine with 2.45.3.1-2 I pushed a week ago.

dslink commented on 2020-08-15 18:29 (UTC)

Wont build, even tried to build directly from offical git. This is the aur error snap-confine-private.a make[1]: Leaving directory '/tmp/trizen-***/snapd/src/snapd-2.45.3.1/cmd' ==> Starting check()... ==> ERROR: A failure occurred in check(). Aborting... :: Unable to build snapd - makepkg exited with code: 4

bboozzoo commented on 2020-07-16 05:25 (UTC)

@bittin can you try again? There was some delay in publishing tarballs in the releases page. This also overlapped with some unexpected github downtime.

bittin commented on 2020-07-15 12:33 (UTC)

The download from Github does not work

ZombB commented on 2020-05-25 21:22 (UTC)

@bboozzoo Thanx, 'export LC_ALL=C' and 'pikaur -S snapd' now did the trick, snapd was installed from AUR and is now working fine!

bboozzoo commented on 2020-05-25 20:04 (UTC)

@ZombB please attach the journal output, preferrably try building it again with LC_ALL=C. Make sure that all packages from base-devel are installed and that build dependencies are installed.

bboozzoo commented on 2020-05-22 10:28 (UTC) (edited on 2020-05-22 10:31 (UTC) by bboozzoo)

@camilojm patch is part of base-devel which is implicitly expected to be installed when building anything from AUR.

camilojm commented on 2020-05-22 07:54 (UTC)

Sorry, this is the log

Starting prepare () ... -> applying 0001-fontconfig-compat.patch / tmp / trizen-camilo / snapd / PKGBUILD: line 49: patch: command not found ==> Error: An error occurred in prepare (). Abandoning ... :: Unable to build snapd-makepkg exited with code: 4 = >> Try again? [Y / N]:

bboozzoo commented on 2020-05-22 06:03 (UTC)

@camilojm please provide a log.

camilojm commented on 2020-05-21 23:44 (UTC)

Error makinkg snapd i have also LANG=zh_CN.UTF-8 not sure if that is the problem, but i have LANG=en_US.UTF-8 and LANG=es_COL.UTF-8 ass support

bboozzoo commented on 2020-05-19 09:41 (UTC)

@sxyzy1016 thanks, this is useful. I've pushed an update.

sxyzy1016 commented on 2020-05-19 09:30 (UTC)

set LANG=zh_CN.UTF-8 and run into Error making: snapd in check(); set LANG=en_US.UTF-8 and it works fine.

bboozzoo commented on 2020-05-19 08:04 (UTC)

@sl13kp can you upload the log somewhere? it builds fine in the CI system and clean chroot here.

sl13kp commented on 2020-05-19 07:43 (UTC)

Error making: snapd

bboozzoo commented on 2020-04-26 18:56 (UTC)

@WomboCombo pushed a fix, 2.44.3-2 sets GO111MODULES=off during the build.

WomboCombo commented on 2020-04-25 10:13 (UTC)

Oh, pretty sure that should fix it too. Could have thought about that. Setting it in the PKGBUILD should ensure that it works for people that, for whatever reason, have a newer golang version installed. And it does no harm for people with an older version.

bboozzoo commented on 2020-04-24 06:28 (UTC)

@WomboCombo I suspect I should set GO111MODULE=off in the PKGBUILD. Surprisingly, this does not come up in either chroot or my regular shell. Just checked that we already set that in the test environments on Arch. Unfortunately snapd does not use modules yet because of quite old Go versions used on other distros.

WomboCombo commented on 2020-04-23 20:27 (UTC) (edited on 2020-04-24 05:15 (UTC) by WomboCombo)

Currerntly running into this error when installing snapd. Any ideas how to fix it?

==> Making package: snapd 2.44.3-1 (Thu 23 Apr 2020 10:16:45 PM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found snapd-2.44.3.tar.xz
==> Validating source files with sha256sums...
    snapd-2.44.3.tar.xz ... Passed
==> Extracting sources...
  -> Extracting snapd-2.44.3.tar.xz with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
*** Setting version to '2.44.3-1' from user.
can't load package: cannot find module providing package                     github.com/snapcore/snapd/cmd/snap: working directory is not part of a module
==> ERROR: A failure occurred in build().
    Aborting...

EDIT: Okay got it working by manually initializing the modules in the snapd directory with:

go mod init

and then

go mod tidy

it's probably also not wrong to just run

go mod vendor

on your own if you run into this problem. I suspect the problem occured because I already hat a golang environment installed on my machine.

frankbe commented on 2020-03-05 15:21 (UTC)

@bboozzoo: Good point. Interestingly, I had the package group installed, but was missing a few group members. I guess it's because my arch installation is old and the base-devel group changed over time. Anyway, thanks for clearification.

bboozzoo commented on 2020-03-04 14:05 (UTC)

@frankbe there's no need to specify automake or autoconf in makedepends, the base-devel group is expected to be already installed. Consult https://wiki.archlinux.org/index.php/PKGBUILD#makedepends for details.

frankbe commented on 2020-03-04 13:23 (UTC) (edited on 2020-03-04 13:24 (UTC) by frankbe)

During the installation, I got two errors:

/data/arch_builds/snapd/PKGBUILD: Zeile 88: autoreconf: Kommando nicht gefunden.

SOLUTION: Installing package "autoconf".

Can't exec "aclocal": Datei oder Verzeichnis nicht gefunden at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

SOLUTION: Installing package "automake".

So, I think you should add this two packages to the depends or makedepends list.

bboozzoo commented on 2019-12-06 12:08 (UTC)

@rsevero I don't know about Artix. Maybe try asking questions on https://forum.snapcraft.io

rsevero commented on 2019-12-06 11:21 (UTC)

@bboozzoo, first of all, sorry for the delay.

Yes you are right, this is Artix, not Arch.

Is this the log you wanted?

https://pastebin.com/eMjqNqyR

bboozzoo commented on 2019-12-04 10:41 (UTC)

@Fixed looks to me that mathpix-snipping-tool loads Gtk2, and that in turn tries to load the theme engines. From what I could try out (app requires you to have some random online account), the login screen pops up correctly. It's probably some electron thing to depend on Gtk2. The publisher of the snap is free to use the content snap that provides the relevant engines, snap info mathpix-snipping-tool lists support@mathpix.com as the contact address.

Fixed commented on 2019-12-03 21:02 (UTC) (edited on 2019-12-14 09:05 (UTC) by Fixed)

@bboozzoo:

support@mathpix.com is silent for more than a week.

bboozzoo commented on 2019-12-02 07:00 (UTC)

@rsevero pacman -Qlp snapd-2.42.2-1-x86_64.pkg.tar.xz | grep 'snapd /lib' yields nothing here, that's because there's no files under /lib shipped by the package. This isn't Arch, is it?

Can you post the build log somewhere?

rsevero commented on 2019-12-02 02:05 (UTC)

Can't install snapd-2.42.2-1:

(1/1) checking for file conflicts [########################################################] 100% error: failed to commit transaction (conflicting files) snapd: /lib exists in filesystem (owned by filesystem) Errors occurred, no packages were upgraded.

Ideias? Suggestions?

archplayer commented on 2019-11-06 00:28 (UTC) (edited on 2019-11-06 00:37 (UTC) by archplayer)

@bboozzoo It's fixed. Thanks.

bboozzoo commented on 2019-11-05 15:42 (UTC)

@archplayer this should be fixed now with the latest update to 2.42.1.

bboozzoo commented on 2019-11-04 12:37 (UTC) (edited on 2019-11-04 14:06 (UTC) by bboozzoo)

@archplayer would it be possible for you to provide the output of eu-readelf -n /usr/lib/snapd/snap-seccomp ? eu-readelf is part of elfutils package.

If that's easier, then readelf -n /usr/lib/snapd/snap-seccomp output is fine too.

zyga commented on 2019-11-01 10:38 (UTC)

The issue reported by @archplayer is now tracked as https://bugs.launchpad.net/snapd/+bug/1850914

archplayer commented on 2019-11-01 01:34 (UTC)

Hi. Ever since end of May 2019, snappy daemon fails to start on my system (with or without apparmor). This is what I see in the output of

$ sudo journalctl -u snapd.service
...
cannot run daemon: state startup errors: [cannot obtain snap-seccomp version information: invalid format of version-info: "6f33567a6d5533534e6273424138556e5a7757582f654153436e383650336a61346537544b673975482f565059786473696e77496b3275724a39755f6d6d2f48314d544863384d51344c417a4c387845717976 2.4.1 8c73f36d3de1f71977107bf6687514f16787f639058b4db4c67b28dfdb2fd3af bpf-actlog"]

bboozzoo commented on 2019-10-22 08:27 (UTC)

@malathion is there anything in dmesg that would suggest AppArmor blocked it? Anything in journalctl -u snapd? Does uname -r list the same kernel version as reported by pacman -Q linux?

malathion commented on 2019-10-22 08:20 (UTC) (edited on 2019-10-22 08:21 (UTC) by malathion)

$ sudo snap install <thing>
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/sanity-mountpoint-581485990: mount failed: Operation not permitted.

bboozzoo commented on 2019-10-17 08:57 (UTC)

@landaro do you have a log perhaps? Are you sure this isn't your AUR helper? There's no dependency on netcat (either variant), so I'm not sure how you got there. It builds and installs just fine if nc isn't available.

landaro commented on 2019-10-17 08:50 (UTC)

I believe there might be a missing dependency on netcat with this package. My initial installation attempt failed with a command not found: nc. Manually installing one of the providers for nc fixed the problem, though.

dharrigan commented on 2019-10-05 20:43 (UTC)

Hi,

Thanks for fixing! Yes, GO111MODULES was set to on. I've disabled it (or rather, put it to the default behaviour of auto).

Thank you for being responsive :-)

-=david=-

bboozzoo commented on 2019-10-05 13:27 (UTC) (edited on 2019-10-05 13:38 (UTC) by bboozzoo)

@dharrigan that's a bit surprising, snapd does not use go.mod. Is it possible that you have GO111MODULE=on in your environment?

Edit: yeah, I was able to reproduce this problem by setting GO111MODULE=on in my environment. I've pushed an update.

dharrigan commented on 2019-10-05 07:55 (UTC) (edited on 2019-10-05 07:55 (UTC) by dharrigan)

Hi,

Getting build errors when attempting to install snapd (or snapd-git). Here's the output:

==> Validating source files with sha256sums...
    snapd-2.42.tar.xz ... Passed
==> Cleaning up...
==> Making package: snapd 2.42-1 (Sat 05 Oct 2019 08:51:16 BST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found snapd-2.42.tar.xz
==> Validating source files with sha256sums...
    snapd-2.42.tar.xz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting snapd-2.42.tar.xz with bsdtar
==> Starting prepare()...
==> Sources are ready.
==> Making package: snapd 2.42-1 (Sat 05 Oct 2019 08:51:17 BST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
*** Setting version to '2.42-1' from user.
go: finding github.com/snapcore/snapd latest
can't load package: package github.com/snapcore/snapd/cmd/snap: no matching versions for query "latest"
==> ERROR: A failure occurred in build().
    Aborting...
Error making: snapd

homelessuser commented on 2019-10-02 03:22 (UTC)

@bboozzoo remmina was the application that had no fonts, but also snap store was missing fonts also.

bboozzoo commented on 2019-10-01 14:24 (UTC)

@homelessuser which snap had the fonts rendered incorrectly in your case?

bboozzoo commented on 2019-10-01 12:06 (UTC)

@homelessuser thanks for letting me know. Indeed, I can see the problem here too: https://i.imgur.com/5sLAJTs.png

homelessuser commented on 2019-10-01 12:00 (UTC)

Fonts missing and replaced with empty boxes in 2.14.r1137. It looks exactly like this https://forum.snapcraft.io/t/snapped-app-not-loading-fonts-on-fedora/12484 Host fonts not being read correctly?

bboozzoo commented on 2019-07-12 14:41 (UTC)

@Gonzalo2683 I think there's something broken in your system.

$ pkg-config --path libseccomp
/usr/lib/pkgconfig/libseccomp.pc

Maybe try reinstalling libseccomp or using a clean chroot to build the package like described here: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_clean_chroot

Gonzalo2683 commented on 2019-07-12 14:35 (UTC) (edited on 2019-07-12 14:41 (UTC) by Gonzalo2683)

Hello @bboozzoo the results was:

 gonza@Arch-Linux/ pacman -Q libseccomp 
libseccomp 2.4.1-2
 gonza@Arch-Linux/ pkg-config --cflags --libs libseccomp
Package libseccomp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libseccomp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libseccomp' found
 gonza@Arch-Linux/  
I can not find the location of the file 'libseccomp.pc' How would the correct way to create the environment variable called PKG_CONFIG_PATH?

bboozzoo commented on 2019-07-12 12:30 (UTC)

@Gonzalo2683 not sure I understand what's happening in your system then.

The libseccomp package is listed in makedepends, so it should get automatically installed when you run makepkg -s.

Can you verify that libseccomp is indeed installed? Try running pacman -Q libseccomp. If that works try pkg-config --cflags --libs libseccomp.

Gonzalo2683 commented on 2019-07-09 14:38 (UTC)

@bboozzoo The problem persist, i have the same error even if run the makepkg -s.

bboozzoo commented on 2019-06-07 15:11 (UTC)

@Gonzalo2683 you need to install the packages listed in makedepends manually, or use makepkg -s. AUR helpers will likely do that for you automatically.

Gonzalo2683 commented on 2019-06-07 14:34 (UTC)

I have the following problem trying to instal snap: Package libseccomp was not found in the pkg-config search path. Perhaps you should add the directory containing libseccomp.pc' to the PKG_CONFIG_PATH environment variable No package 'libseccomp' found Package libseccomp was not found in the pkg-config search path. Perhaps you should add the directory containinglibseccomp.pc' to the PKG_CONFIG_PATH environment variable No package 'libseccomp' found pkg-config: exit status 1 ==> ERROR: Se produjo un fallo en build(). Cancelando...

I have tried installing the package like this: sudo pacman -S libseccomp And although the package is installed, the problem persists.

Some help?

now-im commented on 2019-03-08 14:58 (UTC) (edited on 2019-03-08 19:14 (UTC) by now-im)

I am facing the following problems. Kindly help.

sudo snap refresh                                                      
error: too early for operation, device not yet seeded or device model not acknowledged
sudo snap install bitwarden journey mailspring                                                                                 
error: cannot install "bitwarden", "journey", "mailspring": cannot refresh, install, or download:
       soft-expired device authorization needs refresh

Solution:

I tried all of the solution and finally solved it. First Install the package jq from arch repo. Then execute the following commands. This should solve the problem.

$ systemctl stop snapd
$ sudo cat /var/lib/snapd/state.json | \
    jq 'delpaths([["data", "auth", "device"]])' > state.json-new
$ sudo cp state.json-new /var/lib/snapd/state.json
$ sudo systemctl start snapd

bboozzoo commented on 2018-12-23 08:43 (UTC)

@C0rn3j squashfs driver is in the kernel already. I don't see why you'd need to use squashfuse on Arch unless you're on a custom kernel without squashfs, or upgraded the kernel but did not reboot (effectively anything that loads drivers on-demand will fail at this point), or running Arch in a container.

The first and the last case could use optdepends, but IMO a wiki note would be more useful (or both even).

The upgraded kernel case is unfortunately a lost cause, unless fuse was it was already loaded, squashfuse will fail too.

after running it twice because of irrelevant snapd bug

Can you describe the problem?

C0rn3j commented on 2018-12-23 02:38 (UTC)

I just setup a fresh privileged LXD container with Arch.

I then installed this package, but was getting a hard middle finger from snapd.

After installing squashfuse and fuse3, I could snap install something just fine(after running it twice because of irrelevant snapd bug). Those two packages (not 100% sure that squashfuse is needed) are not even in optdepends.

rvlobato commented on 2018-12-18 16:25 (UTC)

Indeed, @bboozzoo, you were right, thanks! Now everything works fine.

bboozzoo commented on 2018-12-18 07:37 (UTC)

@rvlobato libgo.so is used by gcc-go. My guess would be you've built snapd using gcc-go and then it was removed or replaced with go. If you still have the package file, you can extract the .BUILDINFO file and see what was installed at the time. The upstream test suite running on Arch builds snapd using go. I'd recommend you install go, rebuild the package and pacman -U the new one.

FWIW, snap-update-ns is built statically, but also requires CGO. Proper flags are passed, to make it work. Maybe the go frontend provided by gcc-go interprets/handles the flags differently.

rvlobato commented on 2018-12-17 22:32 (UTC)

Hello, I have installed according the Wiki, but I am having this issue for any app installed:

snap-update-ns: error while loading shared libraries: libgo.so.13: cannot open shared object file: No such file or directory snap-update-ns failed with code 127: No such file or directory

Looking around I din't find anything. I have this libgo.so.13 on /usr/lib/ and have tested with apparmor disable/enabled and checking dmesg, there is no sign of apparmor is blocking snap. I reinstalled the base and base-devel as well both the apparmor/snapd without success.

Version of snap: snap 2.36.2-1 snapd 2.36.2-1 series 16 arch - kernel 4.19.8-arch1-1-ARCH

bboozzoo commented on 2018-10-25 11:56 (UTC) (edited on 2018-10-25 12:31 (UTC) by bboozzoo)

2.36 is the first release with AppArmor enabled by default on Arch.

If you do not have AppArmor enabled at boot there should be no functional changes visible.

If you wish to use snaps with Apparmor, first make sure that Apparmor is enabled during boot, see https://wiki.archlinux.org/index.php/AppArmor for details. After upgrading the package, you need to do the following steps:

  • Reload the profiles: systemctl restart apparmor.service
  • Restart snapd: systemctl restart snapd.service
  • Load profiles for snaps: systemctl enable --now snapd.apparmor.service

bboozzoo commented on 2018-10-11 20:37 (UTC)

@beidl Yes. It's already enabled in snapd-git. With a PR that landed today, the generated security policy is not downgraded on Arch anymore so the AppArmor profiles for snaps are not more fine grained. All this will be part of the upcoming 2.36 release. I'm plan to enable AppArmor by default in snapd with the next update in a week or so.

beidl commented on 2018-10-11 19:52 (UTC) (edited on 2018-10-11 19:52 (UTC) by beidl)

With AppArmor enabled in kernel packages provided in the default repos what are the chances of enabling AppArmor support in the snapd PKGBUILD by default?

bboozzoo commented on 2018-09-14 06:19 (UTC)

@eschwartz thanks for the tip. I ended up adding a hook locally. Your aurpublish project looks like a very nice alternative, I think I'll start using it and migrate to the repo layout it expects.

eschwartz commented on 2018-09-14 01:04 (UTC)

There have never been any such checks, and if there were it would prevent many legitimate update situations. Or lead to a world where the pkgrel gets updated every time whitespace or quoting gets fixed in a PKGBUILD...

I'd suggest instead, using something like community/aurpublish which provides githooks to keep .SRCINFO up to date.

bboozzoo commented on 2018-09-12 07:27 (UTC)

@qKUqm3wtY4 should be fixed now. Sorry for that. AUR used to have checks that rejected git push when pkg* were changed but .SRCINFO was not updated. This does not seem to work anymore.

qKUqm3wtY4 commented on 2018-09-12 07:01 (UTC) (edited on 2018-09-12 07:02 (UTC) by qKUqm3wtY4)

This package is broken:

:: snapd package(s) failed to install. :: ensure package version does not mismatch between .SRCINFO and PKGBUILD :: ensure package name has a VCS suffix if this is a devel package

mati865 commented on 2018-09-04 09:57 (UTC)

@bboozzoo it turned out to be unreproducible post-upgrade issue. Works fine now.

bboozzoo commented on 2018-09-03 09:38 (UTC)

@mati865 thanks for the report. It's a bug in snapd service files, classical distributions should not need to use snap-failure, yikes! I'll try to fix it upstream.

While at it, can you check the log to see why snapd may have failed? The failure helper is run only of the main service fails, so snapd must have exited unexpectedly. I'd be really interested in knowing what happened there.

mati865 commented on 2018-09-02 10:07 (UTC)

With the latest version I'm getting: snapd.failure.service: Failed at step EXEC spawning /usr/lib/snapd/snap-failure: No such file or directory. Probably snap-failure should be included in the package.

aimileus commented on 2018-08-17 06:51 (UTC)

Autoconf and automake are included in the base-devel group, which is supposed to be installed when building AUR packages.

jezeklu commented on 2018-08-17 06:45 (UTC) (edited on 2018-08-17 06:46 (UTC) by jezeklu)

Hello @bboozzoo, there are missing dependencies in makedepends array - autoconf and automake. Thanks for completion.

gee commented on 2018-08-03 13:08 (UTC)

Hello,

until snapd builds with flto would you mind adding fno-lto to the flags since you already use them?

Thanks!

JayGatsby commented on 2018-06-26 22:10 (UTC)

thank you bboozzoo: I tried fixing it and messed with a bunch of settings not sure my machine would be the best to try to debug from... ended up removing snapd for now. believe that it had something to do with a symlink but couldn't figure out what needed to be changed. Again, thanks!

bboozzoo commented on 2018-06-25 05:46 (UTC)

@JayGatsby what do you mean by snaps no longer opening? Are snaps no longer being mounted?

Can you report this on https://forum.snapcraft.io/ and upload journalctl and SNAP_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run hello-world logs?

JayGatsby commented on 2018-06-24 18:45 (UTC)

snaps no longer opening for me - Wonding if this is something others are experiencing or isolated to my machine.

aimileus commented on 2018-06-24 06:04 (UTC)

@rplanchuelo, autoconf is part of the base-devel group. Packages in base-devel are assumed to be installed when building (AUR) packages, and should not be included as build dependencies.

https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites

rplanchuelo commented on 2018-06-23 05:20 (UTC) (edited on 2018-06-23 12:57 (UTC) by rplanchuelo)

I have problems with the last update:

/home/rober/.cache/aurman/snapd/PKGBUILD: línea 74: autoreconf: no se encontró la orden ==> ERROR: Se produjo un fallo en build(). Cancelando... 2018-06-23 07:19:24,818 - wrappers - makepkg - ERROR - makepkg query makepkg -cf --noconfirm failed

I'VE JUST FOUND THE SOLUTION: You have to install "autoconf" in orther to execute "autoreconf" (line 74). Maybe autoconf should be a dependencia.

bboozzoo commented on 2018-06-15 05:57 (UTC)

@ibrokemypie your current LDFLAGS setting appears to be incorrect. ld will be called like this: /usr/bin/ld .. -01 --sort-common --as-needed -z relro now, notice that now is passed without a preceding -z, making ld interpret it as an object file.

Can you edit your LDFLAGS to be: LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" and build again?

ibrokemypie commented on 2018-06-15 04:49 (UTC)

@bboozzoo My makepkg.conf is here: https://hastebin.com/bozoduwete.coffeescript

joopdo commented on 2018-06-13 05:46 (UTC)

@bboozzoo that's it! Thanks a lot for the quick response and fix for my problem. Cheers

bboozzoo commented on 2018-06-12 14:06 (UTC)

@joopdo pushed a change to use the source tarball with vendor dependencies bundled in. Can you check if it works for you now?

joopdo commented on 2018-06-12 08:23 (UTC) (edited on 2018-06-12 08:27 (UTC) by joopdo)

@bboozzoo I assumed it's generic due to the unrecognized import path.

If specific, I look myself. I'm based in China (forgot to mention this fact) but got same response with and without VPN. I noticed that my first mention included some output from my proxy, sorry for any confusion.

bboozzoo commented on 2018-06-12 07:50 (UTC)

@joopdo do the hosts you build the package on have network access or are behind some proxy that may mangle the headers?

I can probably look into using the source tarball that includes the vendored dependencies. The downside is that sometimes it took a while to have it published on github releases page.

joopdo commented on 2018-06-12 06:38 (UTC) (edited on 2018-06-12 08:26 (UTC) by joopdo)

Current AUR seems to fail for me on multiple machines.

Govendor reports: Obtaining dependencies Error: Remotes failed for: Failed for "golang.org/x/crypto/cast5" (failed to ping remote repo): unrecognized import path "golang.org/x/crypto/cast5"

bboozzoo commented on 2018-06-12 06:07 (UTC)

@ibrokemypie can you share your makepkg.conf and how you build the package? I tried building it with clang (and lld) inside and outside of a clean chroot, but failed to reproduce the build issue you're seeing. Can you double check that binutils is properly installed?

ibrokemypie commented on 2018-06-12 00:20 (UTC)

==> Starting build()... *** Setting version to '2.33-1' from shell. Obtaining dependencies

runtime/cgo

/usr/bin/ld: cannot find now: No such file or directory clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation) ==> ERROR: A failure occurred in build(). Aborting... Error making: snapd

7314776 commented on 2018-05-08 15:12 (UTC)

@bboozzoo, this one builds fine, thank you!

bboozzoo commented on 2018-05-08 07:36 (UTC)

Included a patch from upstream, the package should build fine with gcc 8.x now.

7314776 commented on 2018-05-07 21:29 (UTC)

triple confirm @Janzu report - same syntax error while building, yaourt twice and pacman-helper once. @bboozzoo – thanks for noting this.

bboozzoo commented on 2018-05-07 18:58 (UTC)

@Janzu thanks for reporting this. A fix is in the works right here: https://github.com/snapcore/snapd/pull/5138 and we should be able to merge it soon. Once in master, it will be cherry-picked to the upcoming 2.32.7 release and I'll also pick it up for 2.32.6-2.

Janzu commented on 2018-05-07 18:34 (UTC) (edited on 2018-05-07 18:40 (UTC) by Janzu)

Latest version fails build with error during make

Relevant part of log: https://pastebin.com/mSGSYTgx

lockheed commented on 2018-04-12 06:54 (UTC)

@bboozzoo thanks for clarification. Could you update arch wiki to reflect this change?

bboozzoo commented on 2018-04-12 06:48 (UTC) (edited on 2018-04-12 06:48 (UTC) by bboozzoo)

@lockheed snap.refresh.timer has been removed in favor of an internal mechanism of snapd. It can be controlled by setting refresh.timer, eg. snap set core refresh.timer=0:00-24:00/4. See https://forum.snapcraft.io/t/system-options/87 for more details on how to set refresh.timer. snap refresh --time shows last/next refresh times.

FWIW the syntax is more expressive and as we learned people try to do pretty crazy things with refresh times. Also, snap.refresh.timer was also acting as a workaround for bad (or nonexistent) support for monotonic timers in Go, what could cause the refresh to not happen at all (hence the separate, systemd-driven, timer which would kick the refresh anyway).

lockheed commented on 2018-04-11 20:24 (UTC)

Why is there no snapd.refresh.timer in this package?

systemctl start snapd.refresh.timer

Failed to start snapd.refresh.timer: Unit snapd.refresh.timer not found.

aimileus commented on 2018-03-23 16:37 (UTC)

@cmsigler, you are right that these files should be removed. Upstream includes a script to clean up the snapd files, but this does not include the udev rules. Since these rules are generated on the fly (one per snap), it is also not possible to include them in the package. For now I just decided to remove them manually in snapd.install.

cmsigler commented on 2018-03-21 15:47 (UTC)

Hi,

I hope these aren't stupid questions.

A few days ago I installed snapd from AUR and tried it. The snaps I installed didn't work and that's fine, no complaint as it was purely an experiment. I removed snapd. This left behind one file I found today -- `/etc/udev/rules.d/70-snap.core.rules'. This is some kind of USB modem manager file(?). Please see:

https://github.com/snapcore/snapd/blob/master/interfaces/builtin/modem_manager.go

1.) The package itself seems to generate this file? Does that mean it's not intended to go in /usr/lib/udev/rules.d/ ? Or should it? 2.) Is it possible to have the package manager clean up this file upon removal?

Just something I noticed. The answer to both may be "no." :) HTH and thank you.

Clemmitt Sigler

bboozzoo commented on 2018-03-12 06:31 (UTC)

@archlinux38 Can you post that to https://forum.snapcraft.io so that we don't spam the comments here?

The only think I can suggest now, having a cloned tree and while in the package directory:

  • go env and paste the output somewhere
  • export GOPATH=$PWD
  • try to build one of the components, eg. go build -x -v -o test-snapd github.com/snapcore/snapd/cmd/snapd once it fails, upload the log somewhere

archlinux38 commented on 2018-03-11 20:15 (UTC)

@aimileus I wish I could answer that but I can't. I don't think I have changed anything like that. Can you guide me how to look for those changes?

aimileus commented on 2018-03-10 15:50 (UTC)

@archlinux38, do you have a dirty go environment that might complicate things, e.g. a GOPATH/GOROOT environment variable set? Could you try building in a clean chroot, running extra-x86_64-build instead of makepkg?

archlinux38 commented on 2018-03-03 11:05 (UTC)

I have tried to build snapd for a couple of months in hope that it would somehow work some day but this is what I get every time I try:

Installing govendor

net

cannot load DWARF output from $WORK/b105//cgo.o: decoding dwarf section info at offset 0x0: too short ==> ERROR: A failure occurred in build(). Aborting...

anthraxx commented on 2018-03-01 11:56 (UTC)

@aimileus: thanks a lot, very much appreciated, more arch-ish now :D PS: i love your commit messages, thats how all AUR/repo message should be, explaining the why and whats. big thumbs!

aimileus commented on 2018-02-24 10:42 (UTC)

@anthraxx, I removed the /snap symlink and systemd unit handling. If a user wants to install classic snaps the Arch Wiki and the snap command instruct the user to create a symlink manually.

anthraxx commented on 2018-02-22 18:45 (UTC) (edited on 2018-02-22 19:59 (UTC) by anthraxx)

why was the symlink to /snap reintroduced that violaes the FHS strongly and populates / with a rediculous directory? It has been changed for a reason and just because of --classic its still a bad idea to add. Please drop it again.

PS: install scripts doing systemd start/stop/reload things are not what one would call "the arch way"

bboozzoo commented on 2018-02-12 09:43 (UTC)

@precrisk interesting thought. I'm afraid we're missing a larger bunch of dependencies, snapd-glib and snapd-qt to start with. Off the top of my head, there's also snap backend for gnome-software. You would end up rebuilding 2-3 packages at least. No promises at this point, but I can try a look into at least packaging the pluggable backends.

OTOH it'd be much easier if snapd was in 'community'.

precrisk commented on 2018-02-11 13:04 (UTC)

Hey, can you please build the snap backend for kde discover please. for the following reasons - 1. it helps me manage both flatpak and snap from single software. 2. also the snap backend for discover 5.12 is considered stable, thats why it is included in kde neon for this release. 3. it probably will never be included in official repos because snapd itseld is not available in official repos.

i wish i could but i dont know enough about snapd (they are heck lot complicated), hence your help.

vlatkoB commented on 2018-02-08 15:39 (UTC)

Built and installed. Thanks for very quick response! :-)

bboozzoo commented on 2018-02-08 15:25 (UTC)

@vlatkoB i've pushed an update just now. Can you try to build it?

bboozzoo commented on 2018-02-08 15:03 (UTC)

Yeah, turns out Go released 1.9.4 with a fix for CVE-2018-6574 which also broke quite some code everywhere. I'll see if I can push a fix soon.

vlatkoB commented on 2018-02-08 15:02 (UTC) (edited on 2018-02-08 15:02 (UTC) by vlatkoB)

It was installed (2.3.2-2) and I reinstalled it. Same error

bboozzoo commented on 2018-02-08 14:42 (UTC)

Getting this error on installing: go build github.com/snapcore/snapd/cmd/snap-seccomp: invalid pkg-config package name: --static

Can you install libseccomp and try building again? There's a missing dependency in the current PKGBUILD. We should be updating it soon though.

vlatkoB commented on 2018-02-08 14:39 (UTC)

Getting this error on installing:

go build github.com/snapcore/snapd/cmd/snap-seccomp: invalid pkg-config package name: --static

aimileus commented on 2018-02-07 18:22 (UTC)

According to the Arch packaging guidelines, I removed non-x86_64 architectures from the PKGBUILD. Use makepkg -A to override this check.

aimileus commented on 2018-01-22 18:56 (UTC)

Added i686, armv7h and aarch64 to the PKGBUILD.

bboozzoo commented on 2018-01-22 15:55 (UTC)

When trying to compile on ARMv7 i get: # ==> ERROR: snapd is not available for the 'armv7h' architecture.h On raspbian this seems to be possible though: https://forum.snapcraft.io/t/snapd-on-raspbian-jessie/458

Any ideas?

We might be a bit overzealous with arch=(). The same applies to snapd-git. Probably allowing 'i686', 'armv7h', 'aarch64' makes sense. The upstream runs tests on i686 and x86_64 on each pull request. RaspberryPi 2 & 3, Dragonboard (both are armv7) and some other boards are tested on release.

chippey5 commented on 2018-01-20 10:33 (UTC)

When trying to compile on ARMv7 i get:

     # ==> ERROR: snapd is not available for the 'armv7h' architecture.h

On raspbian this seems to be possible though: https://forum.snapcraft.io/t/snapd-on-raspbian-jessie/458

Any ideas?

aimileus commented on 2018-01-11 08:43 (UTC)

The last update should fix "snap: command not found". It uses the snap binary from $GOPATH instead.

@maxlefou I also added snap-confine to the conflicts array, that should fix the file conflicts. I merged the snap-confine and snapd packages so that created some file conflicts.

@bboozzoo the snap-mngt isn't in cmd for the 2.30 tag, which this package builds form (https://github.com/snapcore/snapd/tree/2.30/cmd). So for this release I used the Fedora packaging. Enabled --enable-nvidia-biarch Added the configuration options from snapd-git. Removed the snappy core files. I don't understand that one, I already added "install -dm755 "$pkgdir/var/lib/snapd/snap"? Most Arch packages don't display messages about required systemd units even if the packages are (almost) useless without the service e.g. networkmanager. So I prefer to use the Arch packaging way. Also, most snapd installation guides for Arch mention the unit anyway.

Aventura5 commented on 2018-01-09 21:36 (UTC)

Same here, "line 132: snap: command not found"

oryband commented on 2018-01-09 11:00 (UTC)

I also have the same compilation error as mentioned below: line 132: snap: command not found

maxlefou commented on 2018-01-09 08:22 (UTC)

Tried to update the package, I ran into file conflicts with: /usr/bin/ubuntu-core-launcher, /usr/lib/snapd/snap-confine, /usr/lib/snapd/snap-discard-ns, /usr/lib/snapd/system-shutdown, /usr/lib/udev/snappy-app-dev and /usr/share/man/man5/snap-discard-ns.5.gz

Tried to uninstall and install back. Compilation stops at: /tmp/pamac-build-user/snapd/PKGBUILD: line 132: snap : command not found

bboozzoo commented on 2018-01-08 11:59 (UTC) (edited on 2018-01-08 12:00 (UTC) by bboozzoo)

Thanks for the effort.

I tried installing this on a clean system and ran into some problem with package() failing in this line:

# Install man file snap help --man > "$pkgdir/usr/share/man/man1/snap.1"

I reviewed the PKGBUILD and there's some issues that may need addressing:

  • snap-mgmt is provided by data/snap-mgmt, no need to pull in the one from fedore packaging

  • we probably would want --enable-nvidia-biarch

  • better set all possible configuration variables when doing make -C "$srcdir/$pkgname/data"

  • quite a few of snappy core specific files can be removed in install()

  • please make sure that /var/lib/snapd/snap existst when symlinking /snap, it's actually created as a side effect of this install -dm755 "$pkgdir/var/lib/snapd/snap/bin but it's better to be explicit

  • IMO we still should display the message about the need to enable snapd.socket (probably even add a note about needing to do systemctl daemon-reload)

Let me know if you need any help, it'd be great to keep snapd and snapd-git in sync and working mostly out of the box.

edit: formatting