Home | News | Download | Packages | Forum | Wiki | Github

Can't manage to install a package created with xbps-src


#1

Hi guys,
I’m currently playing around with void and discovering xbps.
What I’m trying to accomplish: Apply some patches to dwm ( http://dwm.suckless.org , https://github.com/voidlinux/void-packages/tree/master/srcpkgs/dwm ), build a package with xbps-src, install dwm from my local repository.
Everything seems to work fine, however the binary which ends up on my system doesn’t seem to be patched.

What I did so far:

  • Cloned void’s package repository:

git clone https://github.com/voidlinux/void-packages

  • Created a bootstrap environment

xbps-src binary-bootstrap

  • Created a direcotory for patches in void-packages/srcpkgs/dwm called “patches” and put some patches in there.

  • Added patch_args="-p1"’ to the template.

  • Built the package with
    xbps-src pkg dwm
    (It clealry shows that the patches are applied and succesfully compiles)

  • Registered the binpkgs directory as a local repo with
    xbps-rindex -a
    (it says “dwm added” or something like this)

  • Created config files in /etc/xbps.d, one starting with 00-… for my local repo, pointing to …/void-packages/hostdir/binpkgs and one starting with 01-… pointing to the remote repository.

  • Tried to install the package with xbps-install -S dwm.

If I log in and start dwm, it doesn’t behave as if the patches were applied. How would I find out if the installed binary is the one which I compiled or the one available in the void repos?
Are there any obvious mistakes or misconceptions? Thank you in advance :slight_smile:


#2

the repository=$PATH has to be absolute.
xbps-src already does xbps-rindex -a, you don’t have to do it manually.
If you don’t change version or revision it wouldnt add the package to the repostiory again if it already exists with this specific $version_$revision unless you use the -f (force) flag with ./xbps-src -f pkg dwm.
You can do xbps-query -S dwm, to see from which repository it comes, and you should probably use xbps-install -f if its not an update.


#3

Hi, my paths are actually absolute, I wrote “…” to shorten the paths, which was obviously stupid in this context, sry.
Hm, xbps-query -S dwm tells my that the package is installed from my local repository, the output of xbps-src pkg tells me that the patches were applied. Yet dwm definitely doesn’t behave as if it was patched. I use the exact same patches with the automated patch-function of portage on my Gentoo machine and it works just fine, so I think it’s not a problem of the application/patches itself. But if the patches are applied and I use the resulting binary, plus I know that the patches work per se, I don’t understand where something could go wrong…


(girduk) #4

I’m having the same problem here. In packages manual it says that patches must be in -p0 format. Dwm patches are in -p1. Is this the cause of this problem and can something be done about it?


#5

Change the patches or add patch_args="-Np1"?

You have to use ./xbps-src -f if you don’t change version/revision and the package with this version_revision combination already exists in your repository.


#6

Thank you, I now figured it out, this was my first day playing with void or so.

I’m not even sure what exactly went wrong back then, probably just should have read more man pages, pretty sure it was some sort of user error.


(girduk) #7

‘patch_args="-Np1"’ didn’t make any diffirence. How can you change the patches? Excuse my n00biness. :grin: Actually I haven’t dealt with diff patches before. I took a look at the diff file and red some man pages and found out that -p[n] option affects how filenames in diff file are red, so apparently -p1 changes a/config.def.h to config.def.h. Still I have no idea how to get the patch work.


(girduk) #8

Heh I was probably completely lost with this. I was really tired when I wrote this.

Anyway, I figured it out. I only had to edit config.h to match the new config.def.h file. I switched from Arch to Void just few days ago, and in Arch I used xmonad as a wm, and I’ve never really used dwm before, so I’m not really familiar with it yet.