You are not logged in.
This is a script to convert a package that has already been installed, back into an installable package file. It takes modified files (as reported by pacman -Qqkk) into account, and will regenerate the mtree entries corresponding to those files, if the original package had an mtree.
I've been searching for an utility like this, and didn't find it. If I am entirely mistaken and such a thing does already exist, please point me in its direction. Thank you!
The creation of this script was inspired by 2 incidents.
1. wine-silverlight takes about 2 hours to build from AUR on my desktop computer. The package file was automatically deleted after installation. And then I realised, my netbook has the same architecture, but the package file was already gone, so I had to build it again.
2. While troubleshooting an issue with font rendering, I had to flip between freetype2-infinality and freetype2 a few times to isolate the problem. It would have been nice if I only had to build freetype2-infinality from AUR once.
This script is unable to guess information that is not present pacman's local database. For example, the .PKGINFO file produced by the script will not have any makepkgopt entries.
I also do not have a perfect understanding of pacman's package format, and you may encounter errors resulting from omissions or misunderstandings on my part, or changes to pacman.
Well, that's everything. I hope this helps someone!
AUR: https://aur.archlinux.org/packages/remakepkg/
Github: https://github.com/deciare/remakepkg
Last edited by Deciare (2014-03-19 00:14:43)
Offline
Have you tried bacman?
$ bacman -h
This program recreates a package using pacman's db and system files
Usage: bacman [--nocolor] <installed package name>
Example: bacman kernel26
Offline
Never heard of bacman. Ive been using repacman-en, but that still puts it in .tar.gz format. I think ill try both the OPs and bacman...
Thanks for the contribution OP
Offline
I hadn't the slightest idea bacman existed. Probably should have asked outright instead of just Googling. Thank you!
At least the making of this script was educational.
Offline
The script in question: https://aur.archlinux.org/packages/remakepkg/
Offline
Just found that when not running as root/sudo, file ownership in the output package is broken. I need to learn how to use fakeroot...
Edit: And fixed.
Last edited by Deciare (2014-03-19 00:44:00)
Offline
I hadn't the slightest idea bacman existed. Probably should have asked outright instead of just Googling. Thank you!
At least the making of this script was educational.
Neither did I. I went to the package search and then the AUR looking for it after he mentioned it- then I realize its with pacman.
Offline
pkgfile FTW :-)
Offline
pkgfile FTW :-)
Oh, that does something I've been wanting very much. You're a veritable fountain of information.
Offline
bacman is a niche application, but pkgfile is in the FAQ: https://wiki.archlinux.org/index.php/FA … ge_is_X.3F and even has its own wiki page: https://wiki.archlinux.org/index.php/Pkgfile
It's also mentioned in https://wiki.archlinux.org/index.php/Pa … _databases
Offline
pkgfile FTW :-)
I did know about that. I simply assumed it was in the repos or AUR and went there first
Offline
Why would I possibly want this?
The creation of this script was inspired by 2 incidents.
1. wine-silverlight takes about 2 hours to build from AUR on my desktop computer. The package file was automatically deleted after installation. And then I realised, my netbook has the same architecture, but the package file was already gone, so I had to build it again.
2. While troubleshooting an issue with font rendering, I had to flip between freetype2-infinality and freetype2 a few times to isolate the problem. It would have been nice if I only had to build freetype2-infinality from AUR once
I just edit /etc/makepkg.conf and set the PKGDEST variable.
This way I always have a copy of my built packages in case I need to reinstall or use on a different machine.
Offline
Or... you could use a less shitty AUR builder.
Offline
Deciare wrote:Why would I possibly want this?
The creation of this script was inspired by 2 incidents.
1. wine-silverlight takes about 2 hours to build from AUR on my desktop computer. The package file was automatically deleted after installation. And then I realised, my netbook has the same architecture, but the package file was already gone, so I had to build it again.
2. While troubleshooting an issue with font rendering, I had to flip between freetype2-infinality and freetype2 a few times to isolate the problem. It would have been nice if I only had to build freetype2-infinality from AUR once
I just edit /etc/makepkg.conf and set the PKGDEST variable.
This way I always have a copy of my built packages in case I need to reinstall or use on a different machine.
Only issue with that is that the config files will be default. By using remakepkg or bacman it takes the existing config file and rolls it into the package.
**EDIT** Well actually, thats because I elect to have pacman ditch the config files whenever I remove something. I usually remove something with -Rcsn options a pay close attention to what it says it will remove..
Last edited by GSF1200S (2014-03-19 20:50:17)
Offline