Re: [arch-general] Question about packaging a library (AUR)

2020-07-21 Thread brent s.
On 7/21/20 12:46 PM, Eli Schwartz via arch-general wrote:
> 
> Dominik,
> 
> $ pkg-config gstreamer-1.0 --variable=pluginsdir
> 
> It's not an option to provide the library in /usr/bin, but a usable
> workaround would be to symlink the binary in /usr/bin but install it in
> /opt/transcribe/. Check to see if it correctly picks up the right
> location, though. ;) You might need to create a wrapper script instead,
> which invokes it without a symlink.
> 
> 
> You may wish to clarify with upstream if it can use the more customary
> location.
> 

This is how I would (and do, for one or two packages I maintain) do it.

Note that this was essentially the primary purpose of /opt[0][1].

A symlink may or may not work. If it does not, a wrapper that calls the
binary and pass along arguments specified at invocation would work fine.

e.g. something like:


#!/bin/bash

# 3/4 times if this works, a symlink in /usr/bin/ works.
/opt/transcribe/transcribe "$@"

# OR, if it relies heavily on relative paths, it's safer to do:
#cd /opt/transcribe
#./transcribe "$@"




[0] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
[1] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html

-- 
brent saner
https://square-r00t.net/
GPG info: https://square-r00t.net/gpg-info



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Question about packaging a library (AUR)

2020-07-21 Thread Eli Schwartz via arch-general
On 7/21/20 12:16 PM, Aneesh Raghavan via arch-general wrote:
> On Tue, Jul 21, 2020 at 8:25 AM Dominik Schrempf via arch-general
>  wrote:
>> I tried to provide the videosection library in /usr/lib, but that doesn't 
>> work.
>> I don't feel comfortable providing the library in /usr/bin. Do you know an
>> appropriate way to deal with such cases? Is it preferable to install the
>> executable in a separate folder alongside the library? For example,
>> /opt/transcribe?
> 
> Hello,
> Although I don't know much about this package and it's libraries, I
> believe an ideal way to put the libraries together is to have
> transcribe in a seperate folder with all of the libraries, while there
> are symlinks in /usr/bin and /usr/lib to the libraries.I hope this
> helps

That might *work*, but I would not describe it as *ideal*.

Dominik,

If this library is indeed a plugin specific to the "transcribe" program,
it's traditional for programs to have a special plugins directory e.g.
/usr/lib/transcribe/ and attempt to load *.so plugins from there. If
it's generally usable by other programs, then it would be appropriate to
have it in the general-purpose /usr/lib directory. If it's generally
usable by gstreamer, then it would be appropriate to put it in the
directory /usr/lib/gstreamer-1.0, as specified by:
$ pkg-config gstreamer-1.0 --variable=pluginsdir

It's not an option to provide the library in /usr/bin, but a usable
workaround would be to symlink the binary in /usr/bin but install it in
/opt/transcribe/. Check to see if it correctly picks up the right
location, though. ;) You might need to create a wrapper script instead,
which invokes it without a symlink.


You may wish to clarify with upstream if it can use the more customary
location.

-- 
Eli Schwartz
Bug Wrangler and Trusted User



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Why bind-tools was merged into bind package?

2020-07-21 Thread David C. Rankin
On 7/20/20 2:15 AM, Óscar García Amor via arch-general wrote:
> The problem is. Where is the limit? The whole distribution in one
> package? The argument is the same, if you don't need it simply don't
> use it.

If you read the git-commit regarding the change, the packages were combined
because there is no longer any significant install size saving splitting the
package. The libraries used by the bind-tools apps (1.7M) is not 8X larger
than the dns daemon (0.2M) so it no longer made sense to split the package
from a size-saving standpoint:

https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/bind=c688d695dc4e82aad9a7ec546bc47e4b5fe5c447

-- 
David C. Rankin, J.D.,P.E.


Re: [arch-general] Question about packaging a library (AUR)

2020-07-21 Thread lists
On Tue, Jul 21, 2020 at 05:25:26PM +0200, Dominik Schrempf via arch-general 
wrote:
> Do you know an appropriate way to deal with such cases? Is it
> preferable to install the executable in a separate folder alongside
> the library? For example, /opt/transcribe?

It seems your AUR package is distributing an executable blob anyway, so
packing the application into /opt/transcribe looks like the cleanest
solution to me. Into /usr/bin, install a solid wrapper that calls the
application instead, or if it works, a symlink.

If you look at the slackbuild from here

  
https://git.slackbuilds.org/slackbuilds/plain/audio/transcribe/transcribe.SlackBuild

you'll see that maybe installing the .so file into the canonical
directory for gstreamer plugins might be the correct way to
"deconstruct" the distribution:

  if [ -e libgstvideosection.so ]; then
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/gstreamer-1.0
install -m0755 libgstvideosection.so $PKG/usr/lib$LIBDIRSUFFIX/gstreamer-1.0
  fi

Perhaps you can get this to work analog to Slack on Arch. You already
have a dep gst-plugins-base-libs that provides /usr/lib/gstreamer-1.0.


Re: [arch-general] Question about packaging a library (AUR)

2020-07-21 Thread Aneesh Raghavan via arch-general
On Tue, Jul 21, 2020 at 8:25 AM Dominik Schrempf via arch-general
 wrote:
> I tried to provide the videosection library in /usr/lib, but that doesn't 
> work.
> I don't feel comfortable providing the library in /usr/bin. Do you know an
> appropriate way to deal with such cases? Is it preferable to install the
> executable in a separate folder alongside the library? For example,
> /opt/transcribe?

Hello,
Although I don't know much about this package and it's libraries, I
believe an ideal way to put the libraries together is to have
transcribe in a seperate folder with all of the libraries, while there
are symlinks in /usr/bin and /usr/lib to the libraries.I hope this
helps
-Aneesh


[arch-general] Question about packaging a library (AUR)

2020-07-21 Thread Dominik Schrempf via arch-general
Hello,

I am the maintainer of the 'transcribe' AUR package. Recently, I have received a
request (cc) about also packaging and providing a proprietary library that comes
along with 'transcribe'. I quote:

* videosection, a special plugin provided by us as part of the download,
can be found in the file libgstvideosection.so and it needs to be alongside
the transcribe executable.*

I tried to provide the videosection library in /usr/lib, but that doesn't work.
I don't feel comfortable providing the library in /usr/bin. Do you know an
appropriate way to deal with such cases? Is it preferable to install the
executable in a separate folder alongside the library? For example,
/opt/transcribe?

Thanks in advance,
Dominik


Re: [arch-general] Why bind-tools was merged into bind package?

2020-07-21 Thread Óscar García Amor via arch-general
El lun., 20 jul. 2020 a las 15:25, Eli Schwartz
() escribió:
>
> On 7/20/20 3:15 AM, Óscar García Amor wrote:
> > The problem is. [...]
>
> Don't be facetious.

It's only a joke, don't take me seriously.

> >  In this [...]
> > safer don't have a service installed than installed an disabled.
>
> You have a right to that opinion. However, if you intend to convince
> anyone *else* that this is indeed the case, you will need to do more
> than merely state your point of view. Specifically, you will need to
> prove it.

The truth is that my arguments are those, simplicity and security. Is
true that I can rebuild package or add some configurations to avoid
user creation or file installations, but I'm thinking in less advanced
users. Anyway if you think that "this is the way" (Mandalorian dixit)
I cannot argue anything else and I accept the decision.

Greetings
-- 
Óscar García Amor | ogarcia at moire.org | http://ogarcia.me