Arch linux optional dependencies

Arch Linux and optional dependencies

So while the plugins for Python and Perl are loaded correctly, the Tcl plugin is not. In fact, python2 and perl packages are installed on my system, while tcl package is not. Installing tcl fixes the problem. Before installing tcl , I get:

ldd /usr/lib/xchat/plugins/tcl.so | grep tcl libtcl8.5.so => not found 
ldd /usr/lib/xchat/plugins/tcl.so | grep tcl libtcl8.5.so => /usr/lib/libtcl8.5.so (0x00007fceba533000) 
pacman -Qi xchat . Optional Deps : enchant: for spell checking support tcl: for tcl plugin python2: for python plugin . 
  1. The error message I get when running XChat without tcl installed is clearly visible in the GUI, in the same place where messages are displayed.
  2. My question can also be reworded in the following way: why XChat, despite having clearly been built with —enable-tcl or equivalent passed to the configure script, can be installed without a mandatory dependency on the tcl package? If one don’t want tcl , he should use —disable-tcl .

EDIT. I opened a thread on the Arch Linux forum, but I didn’t get a satisfying answer. So I checked Debian and Gentoo, and it seems they don’t have this problem.

I forgot to say that despite that error message XChat is working great anyway. I don’t think I need plugins at all.

I may be wrong, but software should be installed in such a way that the user should not be alarmed by error messages, even if they are relatively innocuous.

Isn’t that message visible only when you launch xchat via the command line? Wouldn’t most users run it from a menu/icon thing?

2 Answers 2

It’s mostly a matter of complexity and how people choose to invest their time.

If you wanted an XChat binary package that doesn’t show any warnings/errors related to missing libraries for plugins, you have essentially two choices:

  • only include/configure «vital» plugins, and add hard dependencies for what those things require
  • include each and every plugin available, and add hard dependencies for what those things require

The first option leaves you with an XChat package that doesn’t have a lot of features at all. You’d then need an xchat-perl package, an xchat-tcl one, an xchat-gtk , . All these packages need to be maintained, patched, upgraded, etc. That’s a lot of work.

The second option gives you a bloated XChat package that pulls in lots of other stuff, most of which won’t be used at all by the average user. Not really satisfactory for distributions like Arch.

You can try to find a sweet spot between these two, but chances are you won’t find the perfect fit.

What the Arch devs apparently did with the package is ship a commonly used plugin without forcing the user to install the dependency. That (leaving out the error message for now) is actually pretty nice for the user: those who don’t want/need the TCL don’t have to install it to get XChat. Those who do can just install TCL and the XChat TCL plugin will just work.
So that’s a nice compromise. If you, in the future, would like to use TCL to script your XChat, all you’ll have to do is install TCL — you won’t have to worry about updating XChat or installing yet another package.

Читайте также:  Check if driver installed linux

As for the error message, it’s purely cosmetic. Could it be fixed? Probably.
Could it be fixed easily in a way that still lets the plugin start working right after installing TCL (without additional packages or configuration changes, reverse dependency checks, . ): that’s not all that certain.
Should the Arch devs/maintainers spend time on trying to remove this cosmetic issue? That’s debatable. Giving that the software works, this should be pretty low priority.

Could you try and fix it one way or another? If it’s important enough for you, probably. Give it a shot: find a better way of handling those plugins and dependencies, and file a bug or feature request, or get on the appropriate forum/mailing list for this type of thing.
Open source distros don’t get better by magic. If you care enough about this, get involved.

Источник

Arch package guidelines

When building packages for Arch Linux, adhere to the package guidelines below, especially if the intention is to contribute a new package to Arch Linux. You should also see the PKGBUILD(5) and makepkg(8) manpages.

PKGBUILD prototype

# Maintainer: Your Name pkgname=NAME pkgver=VERSION pkgrel=1 pkgdesc="" arch=() url="" license=('GPL') groups=() depends=() makedepends=() optdepends=() provides=() conflicts=() replaces=() backup=() options=() install= changelog= source=($pkgname-$pkgver.tar.gz) noextract=() md5sums=() #autofill using updpkgsums build() < cd "$pkgname-$pkgver" ./configure --prefix=/usr make >package() < cd "$pkgname-$pkgver" make DESTDIR="$pkgdir/" install >

Other prototypes are found in /usr/share/pacman/ from the pacman package.

Package etiquette

  • Packages should never be installed to /usr/local/
  • Do not introduce new variables or functions into PKGBUILD build scripts, unless the package cannot be built without doing so, as these could possibly conflict with variables and functions used in makepkg itself.
  • If a new variable or a new function is absolutely required, prefix its name with an underscore ( _ ), e.g.
optdepends=('cups: printing support' 'sane: scanners support' 'libgphoto2: digital cameras support' 'alsa-lib: sound support' 'giflib: GIF images support' 'libjpeg: JPEG images support' 'libpng: PNG images support')
  • When creating a package description for a package, do not include the package name in a self-referencing way. For example, «Nedit is a text editor for X11» could be simplified to «A text editor for X11». Also try to keep the descriptions to ~80 characters or less.
  • Try to keep the line length in the PKGBUILD below ~100 characters.
  • Where possible, remove empty lines from the PKGBUILD ( provides , replaces , etc.)
  • It is common practice to preserve the order of the PKGBUILD fields as shown above. However, this is not mandatory, as the only requirement in this context is correct bash syntax.
  • Quote variables which may contain spaces, such as «$pkgdir» and «$srcdir» .
  • To ensure the integrity of packages, make sure that the integrity variables contain correct values. These can be updated using the updpkgsums(8) tool.
Читайте также:  Linux назначить права рекурсивно

Package naming

  • Package names can contain only alphanumeric characters and any of @ , . , _ , + , — . Names are not allowed to start with hyphens or dots. All letters should be lowercase.
  • Package names should not be suffixed with the upstream major release version number (e.g. we do not want libfoo2 if upstream calls it libfoo v2.3.4) in case the library and its dependencies are expected to be able to keep using the most recent library version with each respective upstream release. However, for some software or dependencies, this can not be assumed. In the past this has been especially true for widget toolkits such as GTK and Qt. Software that depends on such toolkits can usually not be trivially ported to a new major version. As such, in cases where software can not trivially keep rolling alongside its dependencies, package names should carry the major version suffix (e.g. gtk2, gtk3, qt4, qt5). For cases where most dependencies can keep rolling along the newest release but some cannot (for instance closed source that needs libpng12 or similar), a deprecated version of that package might be called libfoo1 while the current version is just libfoo.

Package versioning

  • Package versions (i.e. PKGBUILD#pkgver) should be the same as the version released by the author. Versions can include letters if need be (eg, nmap’s version is 2.54BETA32 ). Version tags may not include hyphens! Letters, numbers, and periods only.
  • Package releases (i.e. PKGBUILD#pkgrel) are specific to Arch Linux packages. These allow users to differentiate between newer and older package builds. When a new package version is first released, the release count starts at 1. Then as fixes and optimizations are made, the package will be re-released to the Arch Linux public and the release number will increment. When a new version comes out, the release count resets to 1. Package release tags follow the same naming restrictions as version tags.

Package dependencies

  • Do not rely on transitive dependencies in any of the PKGBUILD#Dependencies, as they might break, if one of the dependencies is updated.
  • List all direct library dependencies. To identify them find-libdeps(1) (part of devtools ) can be used.

Package relations

  • Do not add $pkgname to PKGBUILD#provides, as it is always implicitly provided by the package.
  • List all external shared libraries of a package in PKGBUILD#provides (e.g. ‘libsomething.so’ ). To identify them find-libprovides(1) (part of devtools ) can be used.

Package sources

  • HTTPS sources ( https:// for tarballs, git+https:// for git sources) should be used wherever possible
  • Sources should be verified using PGP signatures wherever possible (this might entail building from a git tag instead of a source tarball, if upstream signs commits and tags but not the tarballs)
  • When building from a git tag, use its object hash obtained from git rev-parse instead of the tag name:
Читайте также:  Jetbrains rider linux key

_tag=1234567890123456789012345678901234567890 # git rev-parse «v$pkgver» source=(git+https://$url.git?signed#tag=$_tag) pkgver()

  • Do not diminish the security or validity of a package (e.g. by removing a checksum check or by removing PGP signature verification), because an upstream release is broken or suddenly lacks a certain feature (e.g. PGP signature missing for a new release)
  • Sources have to be unique in srcdir (this might require renaming them when downloading, e.g. «$.tar.gz::https://$.tld/download/$.tar.gz» )
  • Avoid using specific mirrors (e.g. on sourceforge) to download, as they might become unavailable

Working with upstream

It is considered best-practice to work closely with upstream wherever possible. This entails reporting problems about building and testing a package.

  • Report problems to upstream right away.
  • Upstream patches wherever possible.
  • Add comments with links to relevant (upstream) bug tracker tickets in the PKGBUILD (this is particularly important, as it ensures, that other packagers can understand changes and work with a package as well).

It is recommended to track upstream with tools such as nvchecker or urlwatch to be informed about new stable releases.

Directories

  • Configuration files should be placed in the /etc directory. If there is more than one configuration file, it is customary to use a subdirectory in order to keep the /etc area as clean as possible. Use /etc/pkg where pkg is the name of the package (or a suitable alternative, eg, apache uses /etc/httpd/ ).
  • Package files should follow these general directory guidelines:
  • Packages should not contain any of the following directories:
    • /bin
    • /sbin
    • /dev
    • /home
    • /srv
    • /media
    • /mnt
    • /proc
    • /root
    • /selinux
    • /sys
    • /tmp
    • /var/tmp
    • /run

    Makepkg duties

    When makepkg is used to build a package, it does the following automatically:

    1. Checks if package dependencies and makedepends are installed
    2. Downloads source files from servers
    3. Checks the integrity of source files
    4. Unpacks source files
    5. Does any necessary patching
    6. Builds the software and installs it in a fake root
    7. Strips symbols from binaries
    8. Strips debugging symbols from libraries
    9. Compresses manual and/or info pages
    10. Generates the package meta file which is included with each package
    11. Compresses the fake root into the package file
    12. Stores the package file in the configured destination directory (i.e. the current working directory by default)

    Architectures

    The arch array should contain ‘x86_64’ if the compiled package is architecture-specific. Otherwise, use ‘any’ for architecture independent packages.

    Licenses

    Reproducible builds

    Arch is working on making all packages reproducible. A packager can check if a package is reproducible with makerepropkg from devtools or repro from archlinux-repro .

    $ makerepropkg $pkgname-1-1-any.pkg.tar.zst
    $ repro -f $pkgname-1-1-any.pkg.tar.zst

    If the timestamp is required at build-time, use the environment variable SOURCE_DATE_EPOCH . The format is documented upstream.

    Additional guidelines

    Be sure to read the above guidelines first — important points are listed on this page that will not be repeated in the following guideline pages. These specific guidelines are intended as an addition to the standards listed on this page.

    Packages submitted to the AUR must additionally comply with AUR submission guidelines.

    Источник

Оцените статью
Adblock
detector