explicit priming

2017-04-01 Thread Spencer Parkin
Hi,

My snapcraft.yaml file...

https://github.com/spencerparkin/TwistyPuzzle/blob/stable-release/Snap/snapcraft.yaml

...as you can see, has a new "prime:" section in it.  This wasn't needed in
all my earlier snappings, but to finally get my program snapping correctly
again, I've had to explicitly add some things in there.  I suppose that
snapcraft may not be detecting the "libmir*.so*" files as dependencies.  Is
this a bug in snapcraft?  Why did I need to explicitly add my executable
files and my "Data" directory?  Are these no longer automatically added if
you start to explicitly prime things?

Thanks.  Clearly I'm an novice snap crafter.

BTW, how is the snap/snapcraft project coming along?  Is it doing well,
poor?  Is it catching on?  Is it the ultimate in package technology!?

Thanks,
--Spencer
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: desktop-gtk3

2017-03-30 Thread Spencer Parkin
That just adds a deprecation warning (if I add the '/', I mean.)  It says,
"DEPRECATED: Found a "/" in the name of the 'desktiop/gtk3' part"

Here's the major error I'm getting...

"Issue while loading plugin: properties failed to load for desktop-gtk3:
Additional properties are not allowed ('prime' was unexpected)"

I'm punting on this for now (i.e., giving up), but if anyone has any ideas,
please let me know.  Thanks.

On Thu, Mar 30, 2017 at 11:21 AM, José Pekkarinen <
jose.pekkari...@canonical.com> wrote:

>
>
> Did you tried [desktop/gtk3]?
>
>
>
> $ snapcraft search
>
> ...
>
> desktop-gtk3   Helpers for gtk2, gtk3, qt4 and qt5 or
> glib minimal launchers.
> ...
>
> desktop/gtk3   Helpers for gtk2, gtk3, qt4 and qt5 or
> glib minimal launchers.
> ...
>
>
>
> Best regards.
>
>
>
> José.
>
>
>
> On Thursday 30 March 2017 11:09:00 Spencer Parkin wrote:
>
> > Take a look at the following .yaml file.
>
> >
>
> > https://github.com/ubuntu/snapcraft-desktop-helpers/
> blob/master/demos/gtk3/s
>
> > napcraft.yaml
>
> >
>
> > Notice the following line in it...
>
> >
>
> > after: [desktop-gtk3]
>
> >
>
> > That's the line I need, and the line I've used most often in my git
>
> > history, but it doesn't work anymore. When I'm back on my linux box this
>
> > evening, I can give more information.
>
> >
>
> > I wonder if something has changed with an update of snapcraft.
>
> >
>
> > On Thu, Mar 30, 2017 at 11:05 AM, José Pekkarinen <
>
> >
>
> > jose.pekkari...@canonical.com> wrote:
>
> > > On Thursday 30 March 2017 11:01:02 Spencer Parkin wrote:
>
> > > > Yes, that's the complete file. See, here's the thing. My program has
>
> > > > been
>
> > > >
>
> > > > correctly snapping with "desktop-gtk3" in there fore quite some time.
>
> > >
>
> > > It's
>
> > >
>
> > > > only recently that it's stopped working. I've looked in my git
> history
>
> > > > to
>
> > > >
>
> > > > see if maybe I've broken something, but that's how it's always been.
>
> > >
>
> > > Reading your file what I thing you might want to do is this:
>
> > >
>
> > >
>
> > >
>
> > > ...
>
> > >
>
> > > parts:
>
> > >
>
> > > twistypuzzle:
>
> > >
>
> > > plugin: scons
>
> > >
>
> > > source: https://github.com/spencerparkin/TwistyPuzzle.git
>
> > >
>
> > > source-branch: stable-release
>
> > >
>
> > > build-packages:
>
> > >
>
> > > - 
>
> > >
>
> > > after:
>
> > >
>
> > > - desktop-gtk3
>
> > >
>
> > > - fontsystem
>
> > >
>
> > > - 3dmath
>
> > >
>
> > > - permutationgroup
>
> > >
>
> > > - rapidjson
>
> > >
>
> > > ...
>
> > >
>
> > >
>
> > >
>
> > > Let me know if I'm wrong on this assumption.
>
> > >
>
> > >
>
> > >
>
> > > Best regards.
>
> > >
>
> > >
>
> > >
>
> > > José.
>
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: desktop-gtk3

2017-03-30 Thread Spencer Parkin
Take a look at the following .yaml file.

https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/demos/gtk3/snapcraft.yaml

Notice the following line in it...

after: [desktop-gtk3]

That's the line I need, and the line I've used most often in my git
history, but it doesn't work anymore.  When I'm back on my linux box this
evening, I can give more information.

I wonder if something has changed with an update of snapcraft.

On Thu, Mar 30, 2017 at 11:05 AM, José Pekkarinen <
jose.pekkari...@canonical.com> wrote:

> On Thursday 30 March 2017 11:01:02 Spencer Parkin wrote:
>
> > Yes, that's the complete file. See, here's the thing. My program has been
>
> > correctly snapping with "desktop-gtk3" in there fore quite some time.
> It's
>
> > only recently that it's stopped working. I've looked in my git history to
>
> > see if maybe I've broken something, but that's how it's always been.
>
> >
>
>
>
> Reading your file what I thing you might want to do is this:
>
>
>
> ...
>
> parts:
>
> twistypuzzle:
>
> plugin: scons
>
> source: https://github.com/spencerparkin/TwistyPuzzle.git
>
> source-branch: stable-release
>
> build-packages:
>
> - 
>
> after:
>
> - desktop-gtk3
>
> - fontsystem
>
> - 3dmath
>
> - permutationgroup
>
> - rapidjson
>
> ...
>
>
>
> Let me know if I'm wrong on this assumption.
>
>
>
> Best regards.
>
>
>
> José.
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


desktop-gtk3

2017-03-30 Thread Spencer Parkin
Here is my current .yaml file...

name: twistypuzzle
version: "1.0"
summary: A 3D simulator for a variety of twisty puzzles.
description: Blah...
confinement: strict

apps:
  twistypuzzle:
command: env UBUNTU_MENUPROXY=0 desktop-launch $SNAP/bin/TwistyPuzzle
plugs: [home, x11, unity7, opengl]

parts:
  twistypuzzle:
plugin: scons
source: https://github.com/spencerparkin/TwistyPuzzle.git
source-branch: stable-release
after:
  - desktop-gtk3
  - fontsystem
  - 3dmath
  - permutationgroup
  - rapidjson

  fontsystem:
plugin: scons
source: https://github.com/spencerparkin/FontSystem.git
source-branch: master

  3dmath:
plugin: scons
source: https://github.com/spencerparkin/3DMath.git
source-branch: master

  permutationgroup:
plugin: scons
source: https://github.com/spencerparkin/PermutationGroup.git
source-branch: master

  rapidjson:
plugin: dump
source: https://github.com/miloyip/rapidjson.git
source-branch: master

I am getting an error when I try to snapcraft this .yaml file.  It's
complaining about the "desktop-gtk3" line, and saying that there is a
syntax error here.  I don't have the exact error message with me at the
moment.  I can reply with that tonight.  The error, as I recall, said that
it expected something after the part.  Does anyone have any ideas as to
what might be wrong with this .yaml file?  If I remove the "desktop-gtk3"
line, then the snap will build just fine, but it won't be valid, because
there won't be any GTK3 support.

Thanks,
  --Spencer
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Reject snaps that are identical to previous revision?

2017-02-05 Thread Spencer Parkin
So, I'm sure it comes as no surprise to the readers of this mailing list
that I am a complete moron; and as further evidence of that, I recently
uploaded a "new" snap that was actually identical to the revision I already
had released to my victu...I mean, customers.  Does it seem reasonable for
the automated snap vetting process to reject the snap or at least warn me
about it in the event that it hashes to the exact same hash as that of the
previous release?  It's just an idea that I thought I might throw out
there.  Cheers.  Beers.  And chocolate.
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[SPAM] snapping with Qt vs. wx

2017-01-30 Thread Spencer Parkin
Hi,

I was just curious what people's preferences were for snaps: Qt or wx?  I
believe Qt has support for mobile devices, but I don't think wxWidgets
does.  Other than that, should I switch over to using Qt?  I've been a
wxWidgets guy for a long time, and I'm a big fan of it.  What do you
think?  Is there something better than either?

I've never written a mobile app, but if I did, I might look into the Ubuntu
phone platform.  I own an iPhone, though.  Is Ubuntu phone better?

--Spencer
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [announce] twistypuzzle snap

2017-01-18 Thread Spencer Parkin
Thank you for the bug report and the feedback!  I think I know how to fix
that bug.

The .yaml file is here...

https://github.com/spencerparkin/TwistyPuzzle/blob/stable-release/Snap/snapcraft.yaml

Compared to Microsoft's "snapping process," Ubuntu snaps are infinitely
better.  I have actually never successfully gotten through Microsoft's
process.

On Wed, Jan 18, 2017 at 1:52 AM, Jamie Bennett <jamie.benn...@canonical.com>
wrote:

> Great work Spencer. I presume your project is hosted on GitHub at:
>
>   * https://github.com/spencerparkin/TwistyPuzzle
>
> I don't see a snapcraft.yaml file there so I would be interested in
> what it looks like and how you found the whole process.
>
> After playing with it briefly I have filed the following bug.
>   * https://github.com/spencerparkin/TwistyPuzzle/issues/1
>
> Regards,
> Jamie.
>
> On Wed, Jan 18, 2017 at 6:39 AM, Spencer Parkin
> <spencertpar...@gmail.com> wrote:
> > Hi,
> >
> > I've just uploaded to beta channel my new snap: twistypuzzle.  Unlike
> > "rubecube," one of my other snaps, this one can simulate a variety of
> twisty
> > puzzles.  My main motivation is the technical challenge such a program
> > represents.
> >
> > There are still some bugs that must be resolved before releasing to the
> > stable channel, but in the mean time, I'd be curious to know what anyone
> > thinks about it.  I think it's a cool idea, but hey, maybe it's not.
> >
> > Out of curiosity, is there a way to monetize a snap?  I see a "buy"
> option
> > in the snap command, and I see a "price" field on the Ubuntu Apps
> web-page
> > for my snap, but I can't seem to find any information about how to
> configure
> > these for a snap.  I don't think my snaps are worth anything, and I want
> > people to actually use them (so I want them to be free), but it would be
> > interesting to know how or if this can be done.
> >
> > Thanks,
> > --Sp
> >
> > --
> > Snapcraft mailing list
> > Snapcraft@lists.snapcraft.io
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/snapcraft
> >
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snapping with scons

2017-01-16 Thread Spencer Parkin
Okay, maybe no one knew what I was taking about.  In any case, for the
record, I've resolved the issue by using relative paths in my SConstruct
file that would only work during snapping.  This doesn't cause an issue
with normal development, because I also include relative paths (include
paths and lib paths) that would only work in that context.  Extraneous
paths in either context is fine.

What I figured is that, like the "DESTDIR" variable provided by the scons
plugin, there would be similar environment variables setup that SConstruct
and other make-type files could use to be able to locate dependency parts
that have already been built during the snapping process.  But maybe my
solution is above reasonable?  It doesn't seem all that clean to me.

By the way, the documentation at...

http://snapcraft.io/docs/reference/plugins/scons

...is pretty bad.  If someone pointed me in the right direction, I could at
least add what I know from looking at the plugin's Python code.

Sincerely yours,
The worst snapcrafter on the list.

On Mon, Jan 16, 2017 at 12:07 AM, Spencer  wrote:

> Hi.  I have a project with 2 dependencies so I need 3 parts in my yaml
> file.  The dependencies install correctly during snapping, but when my
> program starts to compile, it can't locate the header files for the library
> dependencies.  There is no mystery here as to why that is the case.  My
> question, however, is: what do I put in my scons file so that I can locate
> the header files during snapping?  I've been looking at the snapcraft
> python code, but I can't seem to find out what, if any, additional
> environment variables there may be setup for me to use in my scons file so
> that I can locate headers and libraries.  Is there a different way to go
> about it?
>
> Thanks.
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Announcing Snaplint

2016-12-08 Thread Spencer Parkin
Ha!  :)  Yeah, I guess it would, though I have no idea what dogfooding run
means.

GPL purports to be free, but it's not.  If a piece of software was free,
you could encorporate it into your own software that you need to be
proprietary.  So many times I find something I think is great and I want to
use it but...oh...crap...it's GPL; can't use it.  In other words, GPL is a
pain for in-house development, and it's an infectious license that spreads
from one GPL project to another.  If I want to use GPL software, I have to
use the GPL license, if my understanding is correct.



On Thu, Dec 8, 2016 at 9:29 PM, Scott Sweeny 
wrote:

> That would make for an interesting dogfooding run since the tool
> itself is GPL-3 :-)
>
> ~S
>
> On Thu, Dec 08, 2016 at 07:42:36PM -0700, Spencer wrote:
> > Uh...but if I use your tool, then I can't claim ignorance when I'm
> getting sued for copyright violations.
> >
> > Seriously, though, I hate all the legal crap licensing causes in the
> development world.  Your tool could make life a lot easier in that regard,
> which is nice.
> >
> > BTW, the GPL is the worst license ever.  Your lint tool should flag its
> use as a fatal error.
> >
> > > On Dec 8, 2016, at 2:44 PM, Scott Sweeny 
> wrote:
> > >
> > > Hi all,
> > >
> > > I'm writing to announce a tool I've been working on to encode best
> > > practices for snapping software. Inspired by utilities like lintian
> I've
> > > decided to name it 'snaplint'. At this point I'd like some wider
> > > feedback as I try to make it more useful.
> > >
> > > Right now you can run snaplint against your snapcraft project directory
> > > and it will scan the prime subdirectory for the following things:
> > >
> > > * copyright (basically that you included usr/share/doc/*copyright* for
> > > any stage-packages
> > > * developer cruft (things like header and object files or static libs
> > > that might have made their way into your snap)
> > > * libraries (examine the ELF files in your snap and look for libraries
> > > which aren't used)
> > >
> > > The next things I'm planning on adding are:
> > > * checking for copyright info from apps/parts themselves.
> > > * checking for mixing of incompatible licenses
> > >
> > > I would love to hear suggestions from you on further improvements.
> > >
> > > You can find the source at https://github.com/ssweeny/snaplint
> > >
> > > And, of course you can try it on your own machine with
> > >
> > >$ snap install snaplint
> > >$ snaplint 
> > >
> > > Cheers,
> > > ~Scott
> > >
> > > --
> > > Snapcraft mailing list
> > > Snapcraft@lists.snapcraft.io
> > > Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
> >
> > --
> > Snapcraft mailing list
> > Snapcraft@lists.snapcraft.io
> > Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
> >
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snaps to invoke external processes

2016-11-21 Thread Spencer Parkin
Well, actually, not unless the customer also installs snapd-xdg-open.  Why
is it an add-on?  Why not just make it part of snapd?

On Mon, Nov 21, 2016 at 9:09 PM, Spencer Parkin <spencertpar...@gmail.com>
wrote:

> It's a miracle!  It works!  Now, for the first time ever, my users (all 0
> of them) can reach the help page by clicking on "help" from within the
> app!  Thanks, Didier.  You're a real pal.
>
> On Mon, Nov 21, 2016 at 12:08 AM, Didier Roche <didro...@ubuntu.com>
> wrote:
>
>> Le 21/11/2016 à 04:26, Spencer a écrit :
>> > It's been a few weeks now, but last I heard, the snapcraft team was or
>> did a sprint to address current limitations snaps have regarding the
>> invocation of external processes.  Specifically, it would be nice to launch
>> the user's default browser with a URL, or let a snap invoke another
>> instance of itself.  What's the status on this?
>> >
>> Hey Spencer,
>>
>> Default browser should works for some months already if your application
>> (or toolkit, like Qt does) invoke the xdg-open to open the url. This is
>> then transmitted via dbus to an external process on your classic system
>> which then issues the real xdg-open command.
>> For the others, there are been indeed multiple discussions on this at
>> multiple places (here, on the bug report…), but no action or firm
>> decision. I'm CCing Gustavo as he was the one against a more generic
>> intermediate solutions.
>>
>> Cheers,
>> Didier
>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snaps to invoke external processes

2016-11-21 Thread Spencer Parkin
It's a miracle!  It works!  Now, for the first time ever, my users (all 0
of them) can reach the help page by clicking on "help" from within the
app!  Thanks, Didier.  You're a real pal.

On Mon, Nov 21, 2016 at 12:08 AM, Didier Roche  wrote:

> Le 21/11/2016 à 04:26, Spencer a écrit :
> > It's been a few weeks now, but last I heard, the snapcraft team was or
> did a sprint to address current limitations snaps have regarding the
> invocation of external processes.  Specifically, it would be nice to launch
> the user's default browser with a URL, or let a snap invoke another
> instance of itself.  What's the status on this?
> >
> Hey Spencer,
>
> Default browser should works for some months already if your application
> (or toolkit, like Qt does) invoke the xdg-open to open the url. This is
> then transmitted via dbus to an external process on your classic system
> which then issues the real xdg-open command.
> For the others, there are been indeed multiple discussions on this at
> multiple places (here, on the bug report…), but no action or firm
> decision. I'm CCing Gustavo as he was the one against a more generic
> intermediate solutions.
>
> Cheers,
> Didier
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: calling cli apps

2016-10-20 Thread Spencer Parkin
Hi,

I would think that the security concerns can be minimized, if not
completely eliminated, by setting up a way to have one snap application
invoke another, possibly itself.  In theory, a snap itself is already
vetted and running in a secure environment.  So what's insecure about one
snap asking the system to invoke another?  Perhaps there are some
constraints on that which need to be had as well.  In any case, my snap
might call some other snap that Ubuntu publishes (that is endowed with
special privileges) that is delegated the responsibility of invoking
processes outside the secure environment, such as a browser.

I don't know; I'm just brain-storming.  Obviously I don't know enough about
the snap technology to talk about it intelligently.

I still need to get a grip on the plugs and slots.

On Thu, Oct 20, 2016 at 1:00 AM, Mark Shuttleworth  wrote:

>
> This is an active discussion for us at the moment, I think we will have
> a solution for you soon.
>
> Mark
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: calling cli apps

2016-10-19 Thread Spencer Parkin
Alejandro,

You ask a good question.  As a fellow snap user, I'd like to know the
answer too.  I've asked about invoking other processes from snap-installed
apps before and invoking the user's default browser too, but so far, the
answer I've received from the snap team has been: "we don't have a solution
yet."  I believe it's a hard problem to solve due to the security
constraints of snaps.

My Chinese Checkers snap, for example, wants to invoke other instances of
itself, but currently can't.  It also wants to launch help documentation in
a browser at a given URL, but can't.

--Sp

On Wed, Oct 19, 2016 at 8:41 AM, Alejandro Vera 
wrote:

> Hi everyone
>
> I am doing an internal tool for our office. I want to change our .deb
> packages for snap packages
>
> In our tool I can config a cli "code beautifier" and also a custom browser
> for opening local files.
>
> So, first, what should I do to access other installed command line apps?
> Should I install them in my snap also? I found it a bad solution becouse i
> can only select the installed app
>
> Second. I want to use the default browser to open a file that it is saved
> in the /tmp folder of my snap. Can I do that??/
>
> Sorry for my bad english. Is not my native language :D
>
> --
> Alejandro Vera
> http://www.recicleta.cl
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: pulseaudio plug/slot

2016-09-25 Thread Spencer Parkin
Ugh...devmode snaps can't be released on the stable channel.

And the devmode snap is probably accessing the outside environment to solve
the problem anyway, which defeats the purpose.

So I don't know how to solve the problem.  If anyone cares to see my crappy
snap-app, it is at...

https://github.com/spencerparkin/ChineseCheckers.git

Enable sound, then hold ALT+SHIFT while doing a left-click in the window to
test sound.

On Sun, Sep 25, 2016 at 10:27 PM, Spencer Parkin <spencertpar...@gmail.com>
wrote:

> So I did two things to resolve this, I'm not sure if one of them was
> necessary, but...
>
> 1) I changed my app command to "env SDL_AUDIODRIVER=pulseaudio
> desktop-launch $SNAP/bin/[myprog]"
> 2) I changed the confinement from strict to devmode.
>
> It's probably the latter that solved the problem.  If the snapcraft
> developers are interested in testing out why audio doesn't work in strict
> mode, they can use my program as an test case, if they cared to.
>
>
> On Sun, Sep 25, 2016 at 6:28 PM, Spencer Parkin <spencertpar...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm adding sound-fx to my snap-app and am running into the common problem
>> of "it works in my real system, but not in the confined system."  I'm not
>> sure how to trouble-shoot this problem.  I've added the "pulseaudio" plug
>> to my snapcraft.yaml file, "snap interface" reports that my snap-app is
>> using the "pulseaudio" plug, I've tried exporting the
>> "SDL_AUDIODRIVER=pulseaudio" environment variable before running my snap to
>> make sure that I'm using the appropriate audio back-end.  Hmmm...maybe
>> snap-apps can't read environment variables?  Maybe I need to configure some
>> env-vars in my snapcraft.yaml file?  I'll try to see how to setup the
>> environment (env-vars) for snaps.
>>
>> Anyhow, I can hear my sound-fx when run on my real system, but not under
>> unbuntu core.
>>
>> Thanks for any ideas you may have,
>> --Sp
>>
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


pulseaudio plug/slot

2016-09-25 Thread Spencer Parkin
Hi,

I'm adding sound-fx to my snap-app and am running into the common problem
of "it works in my real system, but not in the confined system."  I'm not
sure how to trouble-shoot this problem.  I've added the "pulseaudio" plug
to my snapcraft.yaml file, "snap interface" reports that my snap-app is
using the "pulseaudio" plug, I've tried exporting the
"SDL_AUDIODRIVER=pulseaudio" environment variable before running my snap to
make sure that I'm using the appropriate audio back-end.  Hmmm...maybe
snap-apps can't read environment variables?  Maybe I need to configure some
env-vars in my snapcraft.yaml file?  I'll try to see how to setup the
environment (env-vars) for snaps.

Anyhow, I can hear my sound-fx when run on my real system, but not under
unbuntu core.

Thanks for any ideas you may have,
--Sp
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Using xdg-open from snap

2016-09-20 Thread Spencer Parkin
This is related to a question I had as well.  I have a program that uses
wxLaunchDefaultBrowser which, looking at its implementation, tries to make
the system call "exec()" to launch the default browser with a URL.

If snap programs are not allowed to start other processes, that's fine; but
if enough people need to launch the default browser with a URL, then I'm
sure a secure solution just for this could somehow be implemented for snaps.

I gather that one design goal of snaps, however, is the ability for people
to write programs for any environment, but also have them work as snaps so
that the programmer doesn't have to write snap-specific code, or make
snap-specific considerations in their code.  In other words, your code
should be "none-the-wiser" that it is running in the confined area.

So with that in mind, I'm not sure how to solve the problem.  Any secure
API exposed to snap applications already breaks the above design goal.

Of course, it's not unreasonable for my program to have "#ifdef WIN32" or
"#ifdef UNIX", and in the latter case, I may be looking to utilize
something in a standard unix environment which, I believe, is synthesized
in Unbuntu Core.  That's where I believe the snap environment can intercept
what an application is doing and provide a secure solution, and this may be
the "xdg-open" thing Otfried was talking about.


On Mon, Sep 19, 2016 at 2:37 AM, Otfried Cheong 
wrote:

> Hello,
>
> my app has a manual in html.  I normally show this using "xdg-open
> ", but from the snap this results in "xdg-open: Permission denied",
> leaving this log:
>
> [21249.231634] audit: type=1400 audit(1474273861.873:383):
> apparmor="DENIED" operation="exec" profile="snap.ipe.sh"
> name="/usr/local/bin/xdg-open" pid=9551 comm="sh" requested_mask="x"
> denied_mask="x" fsuid=1000 ouid=0
>
> According to
> https://lists.ubuntu.com/archives/snapcraft/2016-September/001048.html
> this should work.
> I did refresh ubuntu-core from the beta channel and currently have
> revision 636 of ubuntu-core.
>
>
> Slightly related:  If I understand
> https://lists.ubuntu.com/archives/snapcraft/2016-September/001118.html
> correctly, the host filesystem should be exposed to the snap as
> /var/lib/snapd/hostfs in devmode?It isn't on my system.
>
> Cheers,
>  Otfried
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: candidate/release

2016-09-15 Thread Spencer Parkin
Thanks, my guess is this: The snapcraft command (and the "Publish" button
on the website) let you do...

$ snapcraft release [myproj] X stable

...where X is any revision of your project, even one that did _not_ pass
automated scrutiny.  The command (and the website) tell you that publishing
is successful, but it really wasn't.  It would be nice if the command (and
the website) gave feedback that it rejected publication due to the desired
revision not having passed inspection.

--Sp



On Thu, Sep 15, 2016 at 8:32 PM, Michael Hall <mhall...@ubuntu.com> wrote:

> If an app fails the automated review, it won't be published at all,
> which is what happened here.
>
> In the overview page for your app
> (https://myapps.developer.ubuntu.com/dev/click-apps/5902/) you will see
> a red exclamation mark next to revision #1, which indicates that it had
> some issues and was not published.
>
> If you click on that
> (https://myapps.developer.ubuntu.com/dev/click-apps/5902/rev/1/) and
> scroll down to the review and comment history, it will tell you what the
> problem was (and Jamie gave advice on how to correct it).
>
> Since this was manual feedback from a human reviewer, I'm not sure how
> we can get this across to the snapcraft commandline interface. Perhaps
> the new APIs sergio mentioned for querying status can include them.
>
> Michael Hall
> mhall...@ubuntu.com
>
> On 09/15/2016 10:16 PM, Spencer Parkin wrote:
> > Thanks all for your help.  I followed the following instructions...
> >
> > https://developer.ubuntu.com/en/snappy/build-apps/upload-your-snap/
> >
> > ...then, seeing the snap passed with no warnings or errors, pushed the
> > "Publish" button at...
> >
> > https://myapps.developer.ubuntu.com/dev/click-apps/5902/rev/2/
> >
> > It's been published now for 2 days.  Maybe the system is still churning
> > on it.  I suppose, too, there's a way to do the publishing from the
> > command line instead as some of you have pointed out.
> >
> > Reading through "snapcraft -h", I see that the upload option is
> > deprecated.  Perhaps the first URL I cited above should be revised to
> > reflect this.
> >
> > Anyhow, it should already be published, but all variants of "sudo snap
> > install [myprojname]" have failed with "snap not found."
> >
> > I've gone ahead and tried...
> >
> > $ snapcraft push [mysnapfile]
> >
> > This chugs for a while during the upload, then reports that an error
> > occurred when trying to analyze the snap.  Maybe I'll try rebuilding the
> > snap and pushing it again later when I get some time.
> >
> > I'm running version 2.16 of snapcraft, which I believe is the latest
> > version.  Oh wait...no...version 2.17 is the latest.
> >
> > I did...
> >
> > $ snapcraft release [myproj] 2 stable
> >
> > ...and that appeared to work, or so it said.
> >
> > Oh, I got it to work now!  I see what I did wrong.  I had revision 1
> > released to the masses, which had errors.  But revision 2 didn't, so I
> > guess now the "snap" command could find it in the store.  If you try to
> > release a snap that had errors, it won't get found or be installable.
> >
> > Hurrah!  That worked!  Okay, thanks guys.  My crappy app is now live.
> > ;)  This is truly a momentous day for us all.
> >
> > On Thu, Sep 15, 2016 at 4:56 PM, Sergio Schvezov
> > <sergio.schve...@canonical.com <mailto:sergio.schve...@canonical.com>>
> > wrote:
> >
> > El jueves, 15 de septiembre de 2016 18h'37:00 ART, Mark Shuttleworth
> > <m...@ubuntu.com <mailto:m...@ubuntu.com>> escribió:
> >
> > On 15/09/16 14:28, Spencer Parkin wrote:
> >
> > I'm embarrassed to say that while, supposedly, I have
> > published a
> > candidate and a stable release, I have no idea how to "go
> > get them"
> > the same way that, say, a user would.  I run "snap find
> > ", but it doesn't find it, and I can't find
> > it on any
> > store front page.  Perhaps there's still some vetting to be
> > done. That's fine.  If I've pushed up a beta or candidate,
> > though, shouldn't
> > I be able to do something with it?  Is all this documented
> > somewhere
> > in a completely obvious place that I have completely
> overlooked?
> >
> >
> > Try 'sudo snap install  --edge '
> >
> >