Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian install hook error #769

Open
kodomohimari opened this issue Apr 8, 2019 · 7 comments
Open

Debian install hook error #769

kodomohimari opened this issue Apr 8, 2019 · 7 comments
Labels
for-package-maintainer Packaging is (mostly) not done by the luakit developers

Comments

@kodomohimari
Copy link

kodomohimari commented Apr 8, 2019

Hi,

I'm doing a very straightforward "follow the instructions to the letter" of this https://luakit.github.io/docs/pages/07-build-debian-package.html, but the hooking process appears to be failing.

As a reminder, the hooking process line is:

$ git config gitpkg.deb-export-hook debian/source/gitpkg-deb-export-hook

Cast from within the luakit cloned source on local.

Attempting to install on a PocketCHIP (ARM processor if I'm not mistaken, also Jessie because CHIP runs on that - for now I'm trying to pull this off without installing another distro.

The recipe breaks here:

$ gitpkg debian/2017.08.10-1 2017.08.10

Which I edited to:

gitpkg debian/2017.08.10 2017.08.10

Since there was no visible tagged -1 version. (I attempted the first version, it straight up refuses to do it.)

Git archive starts exporting / preparing, but then it throws this:

/usr/bin/gitpkg: line 634: debian/source/gitpkg-deb-export-hook: No such file or directory
ERROR: deb-export-hook 'debian/source/gitpkg-deb-export-hook' failed
in: ../deb-packages/luakit/luakit-2017.08.10

As a sidenote, because I'm on Jessie, I took the liberty of replacing names like this at the pbuilder stage:

$ sudo pbuilder create --distribution jessie
--basetgz /var/cache/pbuilder/base-jessie.tgz
--mirror http://ftp.debian.org/debian

It appeared to work without a problem. Beyond a couple installs, this is a fresh, stock PocketCHIP-customized Jessie installation.

I'm presuming something is wrong with the hook, since that's the error that's being thrown. But I also don't know how to wield this command.

Any idea how to press on? I really like the idea of using luakit but I haven't been able to install it on the PocketCHIP. (I also followed other instructions -- the ones on the homepage -- and got blocked by Jessie only having old versions of webkit2gtk, iirc.)

https://imgur.com/a/d1wAhPh <-- The installation bug happening in case that helps.

@aidanholm
Copy link
Member

Hi! very cool photo!

There's been some sort of mixup with the debian tags which probably happened when my luakit fork was moved back to the mainline repo. There should be a file debian/source/gitpkg-deb-export-hook with these contents:

#!/bin/sh
version="$(cd "$REPO_DIR"; git rev-parse --short "${GITPKG_ORIG_TREEISH}^{commit}")"
sed -i "s/^VERSION_FROM_ARCHIVE=.*/VERSION_FROM_ARCHIVE=${version}/" build-utils/getversion.sh

Hope that works, and let me know if you have any more questions!

@kodomohimari
Copy link
Author

kodomohimari commented Apr 9, 2019

Alright, gave it another try. Since there was no debian/source folder, I created it and then nano'd the file as described (admittedly I hand-typed it, but I did a bunch of rereads to make sure I got it right).

Either way, the file is not being detected, so I don't think the contents matter (yet).

The error message seems identical to the previous one (and in fact, is now claiming something that ought to be wrong - the file does now exist). Maybe the error message is wrong, or the script lacks the ability to look where it's claiming there is nothing, or the actual location ought to be different? (I'm not sure how "debian/source/gitpkg-deb-export-hook" is being read, is it from HOME or from another, cryptic location?)

On a hunch, I tried making the file executable but that didn't change anything either (same error message).

Thanks for attempting to help and sorry for needing more help!

EDIT: I have no idea whether this could be relevant at all, but I noticed an "error" message on the PocketCHIP device's setup that said there was no root device (or something to that effect). It's usually no big deal, sudo works as usual, but maybe something's up with that here?

@aidanholm
Copy link
Member

Sorry, I wasn't clear earlier: the file is relative to the root of the repository, inside the clone. Since you clone luakit to ~/debian/luakit/, the full path should be ~/debian/luakit/debian/source/gitpkg-deb-export-hook. If that directory (~/debian/luakit/debian/) isn't there, you probably need to switch branches.

The hook location is set by the git config command, which stores a key-value pair inside .git/config.

No worries, happy to help :)

@kodomohimari
Copy link
Author

Okay, that's much clearer. Since the directory didn't exist in the clone I had I assumed it wasn't supposed to be here, but upon re-inspection I realized the debian/sid branch had the directory so I switched to it after removing the previous clone with a rm -Rf.

git clone -b debian/sid http://github.com/luakit/luakit.git

Then I entered the folder, checked that debian/source was indeed there (it was), looked for the gitpkg-deb-export-hook file and didn't find it. Rewrote it with a sudo nano, returned to the clone's root ~/debian/luakit/, tried running gitpkg debian/2017.08.10 2017.08.10.

Still a nope.

The location looks good, though, so I have no idea why it's not being read.

(Again, I attempted a chmod u+x on the file but that didn't change anything, but that's probably because attempting this is useless in the first place.)

@aidanholm
Copy link
Member

I suspect it checks out a copy of the repository into a temp dir and then continues from there (the ../deb-packages/luakit/luakit-... directory in the error message). If so, creating the hook file isn't enough; you also need to add it to the repository (git commit --amend should be enough for a temporary fix).

If that's not the issue, I would suggest using strace to check the path it's attempting to open; something like strace -e trace=open,openat gitpkg debian/2017.08.10 2017.08.10.

Sorry I can't be of more help; I am completely unfamiliar with the debian packaging workflow and haven't had time to try to debug this myself yet.

@kodomohimari
Copy link
Author

kodomohimari commented Apr 9, 2019

Good guess. From the debian directory created earlier in the procedure:

git clone -b debian/sid http://github.com/luakit/luakit.git
cd luakit
sudo nano debian/source/gitpkg-deb-export-hook // Here you paste the file described above.
git add .
git commit -m "Adding the proper hook file in debian/source."
gitpkg debian/sid

Successfully built the debian source packages in ../deb-packages/luakit. I was then able to update the pbuilder build chroot environment, started to think maybe this was going to work but was blocked by the next step. Attempting to build the Debian source package fails with a variety of error messages that I don't understand (if you know where I can grab the log, I'll gladly share it).

At the very least I'm pretty sure the debian/sid's current state is wrong on GitHub by virtue of lacking the hook file. I don't (yet) know how pushing works, but I can push the change I made if you want me to (I simply pasted the file in the right location on my local copy of the branch).

I actually attempted the homepage install a couple days ago, and it failed as well, but now I'm thinking maybe I can press on to get it to work. Will try that for now.

Thanks again for your help, at the very least I learned stuff.

EDIT: Didn't notice, but the amount of stuff downloaded in the process of building the updated pbuilder build chroot environment nearly overflowed my (admittedly very tiny) device's drive. I will be reflashing from start (can't attempt the other path from current state), so if logs are of interest please tell me where to grab them for you soonish.

@aidanholm
Copy link
Member

Sorry for the slow response; you should be able to specify a logfile with pbuilder build --logfile /tmp/pbuilder.log .... What was the error for the homepage install?

@c0dev0id c0dev0id added the for-package-maintainer Packaging is (mostly) not done by the luakit developers label Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for-package-maintainer Packaging is (mostly) not done by the luakit developers
Projects
None yet
Development

No branches or pull requests

3 participants