~alpine/devel

3 2

apk not installing a file

Details
Message ID
<20210405233859.iasvmbv4dfun7zsr@wolfsden.cz>
DKIM signature
missing
Download raw message
Hello,

I'm trying to setup my alpine repository, so I want to have some test
packages. My APKBUILD currently looks like this:

	pkgname=test-chain1-foo
	pkgver=1
	pkgrel=0
	pkgdesc="desc"
	url="url"
	arch="noarch"
	license="gpl-2.0-only"
	depends=""
	makedepends="unrar"
	install=""
	subpackages=""
	source=""
	builddir="$srcdir/"
	options="!check"

	package() {
		mkdir -p -- "$pkgdir"
		touch -- "$pkgdir/$pkgname"
	}

The package builds fine and without any warning. However, when I then
install it, the file /test-chain1-foo is not created and apk info -L
gives me an empty listing.

When I explore the apk manually (apk -> tar.gz) I do see the file in
there, so I would say the packaging part works fine. So I'm not sure why
the file is not installed. There is not error nor warning during the
install.

Does anyone has any advice to give?

Thank you,

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Timo Teras <timo.teras@iki.fi>
Details
Message ID
<20210406103828.3669d979@vostro>
In-Reply-To
<20210405233859.iasvmbv4dfun7zsr@wolfsden.cz> (view parent)
DKIM signature
missing
Download raw message
Hi,

Using the snippet to make package, and installing it works as expected
for me. Which apk version you have? Which exact command you used to try
to install the package? Could you provide logs running it with strace?

Thanks,
Timo

On Tue, 6 Apr 2021 01:38:59 +0200
Wolf <wolf@wolfsden.cz> wrote:

> Hello,
> 
> I'm trying to setup my alpine repository, so I want to have some test
> packages. My APKBUILD currently looks like this:
> 
> 	pkgname=test-chain1-foo
> 	pkgver=1
> 	pkgrel=0
> 	pkgdesc="desc"
> 	url="url"
> 	arch="noarch"
> 	license="gpl-2.0-only"
> 	depends=""
> 	makedepends="unrar"
> 	install=""
> 	subpackages=""
> 	source=""
> 	builddir="$srcdir/"
> 	options="!check"
> 
> 	package() {
> 		mkdir -p -- "$pkgdir"
> 		touch -- "$pkgdir/$pkgname"
> 	}
> 
> The package builds fine and without any warning. However, when I then
> install it, the file /test-chain1-foo is not created and apk info -L
> gives me an empty listing.
> 
> When I explore the apk manually (apk -> tar.gz) I do see the file in
> there, so I would say the packaging part works fine. So I'm not sure
> why the file is not installed. There is not error nor warning during
> the install.
> 
> Does anyone has any advice to give?
> 
> Thank you,
> 
> W.
> 
Details
Message ID
<20210406122025.67wehiuomjc6muwv@wolfsden.cz>
In-Reply-To
<20210406103828.3669d979@vostro> (view parent)
DKIM signature
missing
Download raw message
Hello,

On 2021-04-06 10:38:28 +0300, Timo Teras wrote:
> Using the snippet to make package, and installing it works as expected
> for me.

Thank you for looking into this. On one hand I'm happy that it should
work, on the other hand I'm now worried this will be pain to debug.

On my end, all the testing was done using official alpine:3.13 container.

> Which apk version you have?

/ # apk --version
apk-tools 2.12.4, compiled for x86_64.

> Which exact command you used to try to install the package?

The log was acquired using following command and is attached:

/ # strace -f apk add /home/builder/packages/wolfsden-testing/x86_64/test-chain1-foo-1-r0.apk 2>/strace.log

> Could you provide logs running it with strace?

The log is attached to this email. One weird thing I've notice is that
it does not even try to do anything with the file in question
(/test-chain1-foo). Also, installing other packages (alpine-sdk, vim,
...) works fine so I am not sure what is wrong.



I can see that the package is installed:

/ # apk info | grep test
test-chain1-foo

However the file in question does not exist:

/ # ls / | grep test

I've also attached the package itself, the build log and the APKBUILD.
The package was renamed to tar.gz since I cannot send .apk with this
error:

> We received your email, but were unable to deliver it because it
> contains content which has been blacklisted by the list admin. Please
> remove your application/vnd.android.package-archive attachments and send
> again.

Well, tar.gz does not work either:

> We received your email, but were unable to deliver it because it
> contains content which has been blacklisted by the list admin. Please
> remove your application/gzip attachments and send again.

So I give up, here is a link: https://data.wolfsden.cz/repro.tar.gz


W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Details
Message ID
<20210407102452.hil5goeuaf76g6l4@wolfsden.cz>
In-Reply-To
<20210406103828.3669d979@vostro> (view parent)
DKIM signature
missing
Download raw message
Hello,

On 2021-04-06 10:38:28 +0300, Timo Teras wrote:
> Using the snippet to make package, and installing it works as expected
> for me. Which apk version you have? Which exact command you used to try
> to install the package? Could you provide logs running it with strace?

I've managed to do a reproduction using a container. So now I believe I
must just be doing something amazingly wrong, since this is such a basic
use case :/ I'm out of idea, so I will try to stick printf in various
placing into apk to try to figure out what is going on.

The container file is attached to this email.

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
Reply to thread Export thread (mbox)