Hi there,
I have a noob question, maybe s.o. can help me. I tried to install freefilesync-bin and got error messages. So I went to the Archlinux page of the maintainer of that package and received the following code as feedback:
diff --git a/PKGBUILD b/PKGBUILD
index 6ddf79e..193e123 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,7 +28,7 @@ source=(
)
sha256sums=(
"3b8121fdf7d91d19680b6ff91f6f10ba79193379e1fdad5227d805b4ea65312a"
- "90630cc8c77d39af8e7746ce664738f9590ea7586454c90a66ad09248c41eb4f"
+ "91cc1218fe6fef85cd4fc52c8649ab533dcc371f462a136db695220e5d6d6ee7"
)
options=(!strip)
install=".install"
@@ -38,7 +38,9 @@ package() {
install -d "$pkgdir/opt/$_pkgname"
# extract installer archive from installer binary
- tail -c +38028 "$srcdir/FreeFileSync_${pkgver}_Install.run" > "$srcdir/FreeFileSync_${pkgver}_Install.tar"
+ offset=$(grep -abo -m 1 -F "<FFS_TAR_START>" "$srcdir/FreeFileSync_${pkgver}_Install.run" | cut -d : -f 1)
+ offset=$((offset + 16))
+ tail -c +${offset} "$srcdir/FreeFileSync_${pkgver}_Install.run" > "$srcdir/FreeFileSync_${pkgver}_Install.tar"
# extract inner archive, freefilesync-mime.xml and .desktop files from installer archive
tar -xf "$srcdir/FreeFileSync_${pkgver}_Install.tar" -C "$srcdir" --wildcards \
From what I understood is that I need to modyfy the PKGBUILD files in Pamac. Unfortunately I’m struggeling to understand the userinterface of Pamac to do so. I get three tabs presented: PKGBUILD / .install / dlagent
Do I need to create a seperate file? How? Or just copy the code in one of the tabs and hope the magic of Pamac is sorting out what I’m doing? I have seen when I do so there are additional tabs created. The userinterface is just not intuitive enough to make it right…
Hi @Nudnik_de ,
While I’ve never done it (never had the need to) I think you’d need to download the .PKGBUILD
file to your desktop, and edit it there. Or something. I’m not sure.
I then think you’d have to install it manually. But check this:
Difficulty: ★★☆☆☆
AUR packages, contrarily to packages available in Manjaro’s repositories, need to be built locally in order to be installed. And as any process, that building can also fail for various reasons.
Technically, what are hosted in AUR are not packages but PKGBUILDs, scripts describing how to build packages. For more details, see: PKGBUILD - ArchWiki
As its name implies, the Arch User Repository is a community maintained repository towards Arch Linux…
Also see:
Currently Pamac cannot be used to install packages using AUR package scripts.
Please install manually using the terminal command line as follows
Lookup the package name using the aur webpage - then clone the repo and build using makepkg (ensure your have the required build packages installed first)
$ sudo pacman -Syu base-devel git --needed
Then clone the package
$ git clone https://aur.archlinux.org/$PACKAGE_NAME.git
move into the folder
$ cd $PACKAGE_NAME
install necessary dependencies…
Fundamentally, PKGBUILD
files are to be used with makepkg
(as opposed to the various AUR helpers, of which pamac
is one)
You can use that .diff
file against the original PKGBUILD
to have all the changes applied
and then use that new PKGBUILD
to build/install the software
I don’t think you can do this part (applying the patch) of the task with pamac
.
Download the PKGBUILD
and apply the patch to it
then you have an updated PKGBUILD
file which you can use.
Then change into the directory where the updated PKGBUILD
is and issue:
pamac build
It will pick up that PKGBUILD
and use it.
Or use makepkg
in the same way.
How to apply the patch?
man patch
basically:
patch PKGBUILD your_patch_file
you end up with an altered PKGBUILD
which you then can use
1 Like
Thanks for pointing me into this direction. Never done it before but I will find out…
A patch file can be applied using the patch command.
Another method is to do it manually
look at your PKGBUILD
locate lines which in the patch has a - - remove it
add the lines which has a +
but do it at the same location in the file
Should this work in Pamac GUI as well?
You cannot patch from the GUI - but you can edit the PKGBUILD in the GUI
click on the package in the GUI
click the build files tab
removing and adding lines work the same - suffice you follow the layout.
a - indicates remove the line
a + indicates add the line at the precise location - defined by
Nudnik_de:
@@ -38,7 +38,9 @@
Great! Thanks, it worked. Allthough only in the second install run. The first run it seems that it was not applying the changes I did…
system
Closed
6 February 2023 23:43
9
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.