You are not logged in.

#1 2019-07-06 12:05:21

beelzy
Member
Registered: 2017-08-10
Posts: 9

[REQUEST] kame-tools (and eventually Kame Editor)

I am building a Qt5 app that allows users to create 3DS theme files on non-Windows platforms natively. Eventually, I will create a PKGBUILD for it, but it has some dependencies I've made or forked myself that aren't already on the AUR.

One of them is a fork of bannertool, called kame-tools. It's the backend that actually converts information provided by a source file into a theme binary for the 3DS. I have some questions about it:

Would kame-tools be considered a conflict of bannertool? I'm just afraid that if I call it a conflict, and some other program depends on bannertool, it wouldn't work anymore.

I don't think I understand how makepkg decides what to do with optdepends. I think the PKGBUILD will still complete successfully if an optdepends is missing, but I don't know how it decides whether or not to install them. I have two other dependencies and kame-tools which are required for certain functions for Kame Editor, but you can still run it without them--just that the features they provide are somewhat important for the full functionality of Kame Editor. Only vgmstream is currently in the AUR (which I imagine most AUR managers would handle if they were dependencies); the other two I forked just for Kame Editor. Should those belong to optdepends or depends?

Here's the kame-tools PKGBUILD.

# Maintainer: beelzy
pkgname=kame-tools-git
pkgver=1.2.2
pkgrel=1
pkgdesc=" A tool for bundling 3DS theme files. "
arch=('i686' 'x86_64')
url="https://gitlab.com/beelzy/kame-tools"
license=('MIT')
sha256sums=('SKIP' 'SKIP')

_gitroot='https://gitlab.com/beelzy/kame-tools.git'
_gitname='kame-tools'

source=("${_gitname}::git+${_gitroot}"
        "buildtools::git+https://github.com/Steveice10/buildtools.git")

prepare() {
    cd "$srcdir/$_gitname"
    git submodule init
    git config submodule.buildtools.url "$srcdir/buildtools"
    git submodule update
}

build() {
	cd "$srcdir/$_gitname"
	make
}

package() {
	install -D "$srcdir/$_gitname/output/linux-$CARCH/kame-tools" "$pkgdir/usr/bin/kame-tools"
}

Last edited by beelzy (2019-07-06 12:13:31)

Offline

#2 2019-07-06 13:17:16

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [REQUEST] kame-tools (and eventually Kame Editor)

Would kame-tools be considered a conflict of bannertool? I'm just afraid that if I call it a conflict, and some other program depends on bannertool, it wouldn't work anymore.

conflicts= is used to list pacakges that install files that are also present in those packages.

let's say bannertool installs /usr/bin/bannertool-start .
If kame-tools also installs /usr/bin/bannertool-start  the 2 packages can't coexist and thus conflict.



man PKGBUILD wrote:

      optdepends (array)
           An array of packages (and accompanying reasons) that are not essential for base functionality, but may be necessary to make full use of
           the contents of this package. optdepends are currently for informational purposes only and are not utilized by pacman during dependency
           resolution. Packages in this list follow the same format as depends, with an optional description appended. The format for specifying
           optdepends descriptions is:

               optdepends=('python: for library bindings')

           Additional architecture-specific optdepends can be added by appending an underscore and the architecture name e.g.,
           optdepends_x86_64=().

Summary : makepkg/pacman do nothing with optdepends.

You created this softeware, do you feel every kame-toools user should have that fubnctionlaity by default ?
If yes, put them in depends.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-07-06 16:30:18

loqs
Member
Registered: 2014-03-06
Posts: 17,308

Re: [REQUEST] kame-tools (and eventually Kame Editor)

extra-x86_64-build failed due to missing makedepends for git and zip
namcap then detected a few issues

Checking PKGBUILD
Checking kame-tools-git-1.2.2-1-x86_64.pkg.tar.xz
kame-tools-git W: ELF file ('usr/bin/kame-tools') lacks FULL RELRO, check LDFLAGS.
kame-tools-git E: Missing custom license directory (usr/share/licenses/kame-tools-git)
kame-tools-git E: Dependency gcc-libs detected and not included (libraries ['usr/lib/libgcc_s.so.1', 'usr/lib/libstdc++.so.6'] needed in files ['usr/bin/kame-tools'])

Edit:
PKGBUILD#license

Last edited by loqs (2019-07-06 16:57:02)

Offline

#4 2019-07-06 17:04:28

beelzy
Member
Registered: 2017-08-10
Posts: 9

Re: [REQUEST] kame-tools (and eventually Kame Editor)

Thanks for the feedback. So I fixed the dependencies (kame-tools does actually need zip for creating the 3DS theme bundle, so I would move it into depends; I just forgot about it) and added the license. Unfortunately, I didn't find out very much about the ELF file warnings, and read that gcc-libs is always going to be there.

# Maintainer: beelzy
pkgname=kame-tools-git
pkgver=1.2.2
pkgrel=1
pkgdesc="A tool for bundling 3DS theme files"
arch=('i686' 'x86_64')
url="https://gitlab.com/beelzy/kame-tools"
license=('MIT')
sha256sums=('SKIP' 'SKIP')
depends=('zip')
makedepends=('git')

_gitroot='https://gitlab.com/beelzy/kame-tools.git'
_gitname='kame-tools'

source=("${_gitname}::git+${_gitroot}"
        "buildtools::git+https://github.com/Steveice10/buildtools.git")

prepare() {
    cd "$srcdir/$_gitname"
    git submodule init
    git config submodule.buildtools.url "$srcdir/buildtools"
    git submodule update
}

build() {
	cd "$srcdir/$_gitname"
	make
}

package() {
    install -D "$srcdir/$_gitname/output/linux-$CARCH/kame-tools" "$pkgdir/usr/bin/kame-tools"
    install -Dm644 "$srcdir/$_gitname/LICENSE.txt" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

EDIT: I have also decided bannertools is not in conflict with kame-tools. The program is simple enough that the only binary that's included is the main executable itself, and they don't have the same names.

Last edited by beelzy (2019-07-06 17:07:17)

Offline

#5 2019-07-06 17:08:14

loqs
Member
Registered: 2014-03-06
Posts: 17,308

Re: [REQUEST] kame-tools (and eventually Kame Editor)

	make BUILD_FLAGS="$LDFLAGS"

Offline

#6 2019-07-06 17:32:09

beelzy
Member
Registered: 2017-08-10
Posts: 9

Re: [REQUEST] kame-tools (and eventually Kame Editor)

Apparently, namcap claims my program doesn't need zip; probably the miniz library does everything without needing zlib itself. I'll put it back to makedepends, although I don't know why it needs zip.

make BUILD_FLAGS="$LDFLAGS"

didn't change anything; namcap is still issuing the same ELF warning.

Offline

#7 2019-07-06 17:39:00

loqs
Member
Registered: 2014-03-06
Posts: 17,308

Re: [REQUEST] kame-tools (and eventually Kame Editor)

PKGBUILD

# Maintainer: beelzy
pkgname=kame-tools-git
pkgver=1.2.2
pkgrel=1
pkgdesc=" A tool for bundling 3DS theme files. "
arch=('i686' 'x86_64')
url="https://gitlab.com/beelzy/kame-tools"
license=('MIT')
makedepends=('git' 'zip')
depends=('gcc-libs')

_gitroot='https://gitlab.com/beelzy/kame-tools.git'
_gitname='kame-tools'

source=("${_gitname}::git+${_gitroot}"
        "buildtools::git+https://github.com/Steveice10/buildtools.git")
sha256sums=('SKIP' 'SKIP')

prepare() {
    cd "$srcdir/$_gitname"
    git submodule init
    git config submodule.buildtools.url "$srcdir/buildtools"
    git submodule update
}

build() {
	cd "$srcdir/$_gitname"
	make BUILD_FLAGS="$LDFLAGS"
}

package() {
	install -D "$srcdir/$_gitname/output/linux-$CARCH/kame-tools" "$pkgdir/usr/bin/kame-tools"
}
extra-x86_64-build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [test]...done
==> Making package: kame-tools-git 1.2.2-1 (Sat Jul  6 15:33:14 2019)
==> Retrieving sources...
  -> Updating kame-tools git repo...
Fetching origin
  -> Updating buildtools git repo...
Fetching origin
==> Validating source files with sha256sums...
    kame-tools ... Skipped
    buildtools ... Skipped
==> Making package: kame-tools-git 1.2.2-1 (Sat 06 Jul 2019 05:33:16 PM UTC)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (5) perl-error-0.17027-2  perl-mailtools-2.21-2  perl-timedate-2.30-6
             git-2.22.0-1  zip-3.0-8

Total Installed Size:  40.34 MiB

:: Proceed with installation? [Y/n] 
(5/5) checking keys in keyring                     [######################] 100%
(5/5) checking package integrity                   [######################] 100%
(5/5) loading package files                        [######################] 100%
(5/5) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/5) installing perl-error                        [######################] 100%
(2/5) installing perl-timedate                     [######################] 100%
(3/5) installing perl-mailtools                    [######################] 100%
(4/5) installing git                               [######################] 100%
Optional dependencies for git
    tk: gitk and git gui
    perl-libwww: git svn
    perl-term-readkey: git svn and interactive.singlekey setting
    perl-mime-tools: git send-email
    perl-net-smtp-ssl: git send-email TLS support
    perl-authen-sasl: git send-email TLS support
    perl-mediawiki-api: git mediawiki support
    perl-datetime-format-iso8601: git mediawiki support
    perl-lwp-protocol-https: git mediawiki https support
    perl-cgi: gitweb (web interface) support
    python2: various helper scripts
    subversion: git svn
    gnome-keyring: GNOME keyring credential helper
    libsecret: libsecret credential helper [installed]
(5/5) installing zip                               [######################] 100%
:: Running post-transaction hooks...
(1/4) Warn about old perl modules
(2/4) Reloading system manager configuration...
  Skipped: Current root is not booted.
(3/4) Creating system user accounts...
Creating group git with gid 977.
Creating user git (git daemon user) with uid 977 and gid 977.
(4/4) Arming ConditionNeedsUpdate...
==> Retrieving sources...
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Creating working copy of kame-tools git repo...
Cloning into 'kame-tools'...
done.
  -> Creating working copy of buildtools git repo...
Cloning into 'buildtools'...
done.
==> Starting prepare()...
Submodule 'buildtools' (git://github.com/Steveice10/buildtools) registered for path 'buildtools'
Cloning into '/build/kame-tools-git/src/kame-tools/buildtools'...
warning: --depth is ignored in local clones; use file:// instead.
done.
Submodule path 'buildtools': checked out '4524b3a324ae8e9dcaf80c4fe3694bc63628de22'
==> Starting build()...
Building for NATIVE...
build/linux-x86_64/source/pc/stb_vorbis.o
build/linux-x86_64/source/pc/miniz.o
build/linux-x86_64/source/pc/ConvertUTF.o
build/linux-x86_64/source/pc/stb_image.o
build/linux-x86_64/source/main.o
build/linux-x86_64/source/cmd.o
build/linux-x86_64/source/pc/wav.o
build/linux-x86_64/source/3ds/cwav.o
build/linux-x86_64/source/3ds/bodylz.o
build/linux-x86_64/source/3ds/cbmd.o
source/pc/miniz.c:3031:9: note: #pragma message: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.
 3031 | #pragma message("Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")
      |         ^~~~~~~
In file included from source/pc/stb_image.c:3:
source/pc/stb_image.h:1417:24: warning: ‘stbi__at_eof’ defined but not used [-Wunused-function]
 1417 | stbi_inline static int stbi__at_eof(stbi__context *s)
      |                        ^~~~~~~~~~~~
In file included from source/pc/stb_image.c:3:
source/pc/stb_image.h:1135:13: warning: ‘stbi__float_postprocess’ defined but not used [-Wunused-function]
 1135 | static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
source/pc/stb_image.h:1073:13: warning: ‘stbi__vertical_flip_slices’ defined but not used [-Wunused-function]
 1073 | static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
source/pc/stb_image.h:660:12: warning: ‘stbi__sse2_available’ defined but not used [-Wunused-function]
  660 | static int stbi__sse2_available(void)
      |            ^~~~~~~~~~~~~~~~~~~~
build/linux-x86_64/source/3ds/lz11.o
output/linux-x86_64/kame-tools
output/kame-tools.zip
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "kame-tools-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: kame-tools-git 1.2.2-1 (Sat 06 Jul 2019 05:33:20 PM UTC)
==> Installing package kame-tools-git with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) kame-tools-git-1.2.2-1

Total Installed Size:  0.46 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/1) installing kame-tools-git                    [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
resolving dependencies...
looking for conflicting packages...

Packages (7) elfutils-0.176-1  libnsl-1.2.0-1  licenses-20181104-1
             pyalpm-0.8.5-2  python-3.7.3-2  python-pyelftools-0.25-1
             namcap-3.2.8-3

Total Download Size:    34.12 MiB
Total Installed Size:  148.88 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-3.7.3-2-x86_64     34.1 MiB  12.3M/s 00:03 [######################] 100%
(7/7) checking keys in keyring                     [######################] 100%
(7/7) checking package integrity                   [######################] 100%
(7/7) loading package files                        [######################] 100%
(7/7) checking for file conflicts                  [######################] 100%
:: Processing package changes...
(1/7) installing libnsl                            [######################] 100%
(2/7) installing python                            [######################] 100%
Optional dependencies for python
    python-setuptools
    python-pip
    sqlite [installed]
    mpdecimal: for decimal
    xz: for lzma [installed]
    tk: for tkinter
(3/7) installing pyalpm                            [######################] 100%
(4/7) installing licenses                          [######################] 100%
(5/7) installing elfutils                          [######################] 100%
(6/7) installing python-pyelftools                 [######################] 100%
(7/7) installing namcap                            [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
Checking PKGBUILD
Checking kame-tools-git-1.2.2-1-x86_64.pkg.tar.xz
kame-tools-git E: Missing custom license directory (usr/share/licenses/kame-tools-git)

What is LDFLAGS set to on your system in /etc/makepkg.conf and is it overridden anywhere?

Offline

#8 2019-07-06 17:49:01

beelzy
Member
Registered: 2017-08-10
Posts: 9

Re: [REQUEST] kame-tools (and eventually Kame Editor)

My LDFLAGS says

LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

I must assume you're installing from a nearly fresh system with almost nothing on it; I'm not pulling in so many dependencies.
Probably better for testing though.

Offline

#9 2019-07-06 17:52:17

loqs
Member
Registered: 2014-03-06
Posts: 17,308

Re: [REQUEST] kame-tools (and eventually Kame Editor)

extra-x86_64-build from devtools builds in a clean chroot.
The LDFLAGS are the same as on this system.

Last edited by loqs (2019-07-06 17:52:30)

Offline

#10 2019-07-06 18:58:57

beelzy
Member
Registered: 2017-08-10
Posts: 9

Re: [REQUEST] kame-tools (and eventually Kame Editor)

Thanks. Now the ELF warning disappears. But that only happens if I run the clean chroot; I still get the warning if I build with makepkg. So I guess the clean chroot one is the only one that matters?

Here's what I have now.

# Maintainer: beelzy
pkgname=kame-tools-git
pkgver=1.2.2
pkgrel=1
pkgdesc="A tool for bundling 3DS theme files"
arch=('i686' 'x86_64')
url="https://gitlab.com/beelzy/kame-tools"
license=('MIT')
sha256sums=('SKIP' 'SKIP')
makedepends=('git' 'zip')
depends=('gcc-libs')

_gitroot='https://gitlab.com/beelzy/kame-tools.git'
_gitname='kame-tools'

source=("${_gitname}::git+${_gitroot}"
        "buildtools::git+https://github.com/Steveice10/buildtools.git")

prepare() {
    cd "$srcdir/$_gitname"
    git submodule init
    git config submodule.buildtools.url "$srcdir/buildtools"
    git submodule update
}

build() {
	cd "$srcdir/$_gitname"
	make BUILD_FLAGS="$LDFLAGS"
}

package() {
    install -D "$srcdir/$_gitname/output/linux-$CARCH/kame-tools" "$pkgdir/usr/bin/kame-tools"
    install -Dm644 "$srcdir/$_gitname/LICENSE.txt" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

Offline

#11 2019-07-06 20:43:02

loqs
Member
Registered: 2014-03-06
Posts: 17,308

Re: [REQUEST] kame-tools (and eventually Kame Editor)

If it is not an issue in a clean chroot then the issue is a change on the build system.
Would be nice to fix but if you can not determine the cause I would not be concerned about it.
Just style points (have no effect on functionality):
    I would move sha256sums below source to match the ordering from PKGBUILD
    The build function indents with tab the rest of the file uses spaces.

Offline

#12 2019-07-06 21:25:54

beelzy
Member
Registered: 2017-08-10
Posts: 9

Re: [REQUEST] kame-tools (and eventually Kame Editor)

Cleaned up.

# Maintainer: beelzy
pkgname=kame-tools-git
pkgver=1.2.2
pkgrel=1
pkgdesc="A tool for bundling 3DS theme files"
arch=('i686' 'x86_64')
url="https://gitlab.com/beelzy/kame-tools"
license=('MIT')
makedepends=('git' 'zip')
depends=('gcc-libs')

_gitroot='https://gitlab.com/beelzy/kame-tools.git'
_gitname='kame-tools'

source=("${_gitname}::git+${_gitroot}"
        "buildtools::git+https://github.com/Steveice10/buildtools.git")
sha256sums=('SKIP' 'SKIP')

prepare() {
    cd "$srcdir/$_gitname"
    git submodule init
    git config submodule.buildtools.url "$srcdir/buildtools"
    git submodule update
}

build() {
    cd "$srcdir/$_gitname"
    make BUILD_FLAGS="$LDFLAGS"
}

package() {
    install -D "$srcdir/$_gitname/output/linux-$CARCH/kame-tools" "$pkgdir/usr/bin/kame-tools"
    install -Dm644 "$srcdir/$_gitname/LICENSE.txt" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

Offline

#13 2019-07-07 02:56:36

beelzy
Member
Registered: 2017-08-10
Posts: 9

Re: [REQUEST] kame-tools (and eventually Kame Editor)

So I got my package in the AUR, but the git clone url also has an ssh entry. Is that supposed to be there?

Offline

#14 2019-07-08 08:35:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [REQUEST] kame-tools (and eventually Kame Editor)

Yes, that's normal .

I'm not sure what the ssh url is for, but it's only shown to maintainers / co-maintainers, not normal users.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB