You are not logged in.
Hi all,
I'm trying to make a PKGBUILD for a software that installs using a custom non-configurable bash script. This means I can't set a prefix to the installation path of the files of that script, like 'make DESTDIR="$pkgdir/" install'.
I've been searching this for the whole day and I've tried to use fakechroot, which implies to have a proper root environment, with no success.
Is there a way to make a PKGBUILD for this kind of installation scripts?
EDIT: this script builds and installs with not arguments; meaning, I need a proper environment to build it plus a way of getting the files it installs on the system, which I'm not sure which.
Thanks!
Last edited by Noeljunior (2023-05-12 17:10:06)
Offline
Where's the source? It may be as simple as a patch to the installation script - but this all depends on what the software is and how it is meant to be installed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I forgot to mention the source is not public now and, if possible, it would be better to not patch it.
Is there a way to track all files a command wrote to?
Offline
Eh ... from the sounds of it your problem may be much larger than it not accepting a PREFIX setting. In the worse case, if it didn't accept PREFIX, you'd just have to move everything around in the package() function after the software installed to $pkgdir, e.g., if it installs to /usr/local under $pkgdir you'd just move $pkgdir/usr/local/* to $pkgdir/usr and hope there were no hardcoded paths within the software referencing /usr/local.
However, not respecting PREFIX is a drop in the bucket compared to not allowing for a DESTDIR setting for the install. Without respecting DESTDIR and without an ability to patch the software, I'd say you're pretty much S.O.L. Report the issue upstream for them to fix it.
In theory you can watch all filesystem changes (e.g., w/ inotify or similar) and collect all changed content into a $pkgdir, but I'd not want that task. How important is this software? And how much do you trust it if installation is this much of a problem?
Last edited by Trilby (2023-05-12 17:25:37)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Eh ... from the sounds of it your problem may be much larger than it not accepting a PREFIX setting. In the worse case, if it didn't accept PREFIX, you'd just have to move everything around in the package() function after the software installed to $pkgdir, e.g., if it installs to /usr/local under $pkgdir you'd just move $pkgdir/usr/local/* to $pkgdir/usr and hope there were no hardcoded paths within the software referencing /usr/local.
That would be an option if I even had a way to it to install to anywhere inside $pkgdir. I mean, I can't even manage to make it to install in side of $pkgdir, let alone even more customization.
However, not respecting PREFIX is a drop in the bucket compared to not allowing for a DESTDIR setting for the install. Without respecting DESTDIR and without an ability to patch the software, I'd say you're pretty much S.O.L. Report the issue upstream for them to fix it.
Exactly. No PREFIX and no DESTDIR here.
In theory you can watch all filesystem changes (e.g., w/ inotify or similar) and collect all changed content into a $pkgdir, but I'd not want that task. How important is this software? And how much do you trust it if installation is this much of a problem?
That was one of my ideas: install it in a chroot, check for file creation/modifications, and copy those into PKGDIR, but it sounds as bad as it is.
I can easily trust this software on the machines it will be used. Contacting upstream is useless. These (actually I have this issue with more than one package) are packages my company is now making me installing if I'm using linux (windows based company) but there is not packaging available to archlinux. The problem is that they will have updates for this and with time I can just imagine how many files around I'll have in my filesystem without tracking.
Anyway, I'll dig a bit more about this and I'll post if I find any good enough solution.
Thank you!
Offline
but there is not packaging available to archlinux.
What packaging do they provide : rpm , deb , install script , .run , appimage to name a few ?
Some of those can be used as base for an archlinux package .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
One of them is a two are .deb, and one bash scripts. The bash script I manage to make my own bash script and I could build a proper PKGBUILD. So, in the end,
I'll now have a look on .debs ones.
Thank you!
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline