cp -l
creates hardlinks so no data duplication occurs. rm
ing the file's duplicate inode does not remove the file, only that inode.
Search Criteria
Package Details: unreal-engine 5.5.0-0
Package Actions
Git Clone URL: | https://aur.archlinux.org/unreal-engine.git (read-only, click to copy) |
---|---|
Package Base: | unreal-engine |
Description: | A 3D game engine by Epic Games which can be used non-commercially for free. |
Upstream URL: | https://www.unrealengine.com/ |
Keywords: | 3D engine game ue5 Unreal |
Licenses: | GPL3, custom:UnrealEngine |
Submitter: | acerix |
Maintainer: | Shatur (Neko-san) |
Last Packager: | Neko-san |
Votes: | 76 |
Popularity: | 0.44 |
First Submitted: | 2016-05-01 18:37 (UTC) |
Last Updated: | 2024-11-16 03:10 (UTC) |
Dependencies (29)
- coreutils (coreutils-gitAUR, busybox-coreutilsAUR, coreutils-hybrid-gitAUR, coreutils-selinuxAUR, coreutils-uutilsAUR, coreutils-hybridAUR)
- dos2unix (dos2unix-gitAUR)
- dotnet-runtime (dotnet-runtime-2.2AUR, dotnet-runtime-3.0AUR, dotnet-runtime-2.1AUR, dotnet-runtime-5.0-binAUR, dotnet-runtime-7.0-binAUR, dotnet-runtime-6.0-binAUR, dotnet-runtime-preview-binAUR, dotnet-runtime-8.0-binAUR, dotnet-runtime-binAUR)
- dotnet-sdk (dotnet-sdk-2.2AUR, dotnet-sdk-2.2-vs2017AUR, dotnet-sdk-3.0AUR, dotnet-sdk-2.1AUR, dotnet-sdk-5.0-binAUR, dotnet-sdk-6.0.110-binAUR, dotnet-sdk-7.0-binAUR, dotnet-sdk-8.0.300-binAUR, dotnet-sdk-6.0-binAUR, dotnet-sdk-preview-binAUR, dotnet-sdk-8.0-binAUR, dotnet-sdk-binAUR)
- findutils (findutils-gitAUR, busybox-coreutilsAUR, findutils-selinuxAUR)
- icu63AUR
- lld (llvm-gitAUR)
- openssl (openssl-gitAUR, openssl-staticAUR)
- python (python37AUR, python311AUR, python310AUR)
- sdl2 (sdl2-compat-gitAUR, sdl2-gitAUR)
- steam
- vulkan-icd-loader (vulkan-icd-loader-gitAUR)
- xdg-user-dirs
- git (git-gitAUR, git-glAUR) (make)
- glibc (glibc-gitAUR, glibc-linux4AUR, glibc-eacAUR, glibc-eac-binAUR, glibc-eac-rocoAUR) (make)
- grep (grep-gitAUR, busybox-coreutilsAUR, grep-compatAUR) (make)
- openssh (openssh-gitAUR, openssh-dotconfigAUR, openssh-dotconfig-binAUR, openssh-selinuxAUR, openssh-hpn-shimAUR, openssh-gssapiAUR, openssh-dnatAUR) (make)
- sed (busybox-coreutilsAUR, sed-gitAUR) (make)
- wget (wget-gitAUR, wurlAUR) (make)
- clionAUR (optional) – IDE for projects
- cmake (cmake-gitAUR) (optional) – build system for projects
- codeliteAUR (codelite-binAUR, codelite-unstableAUR, codeliteAUR, codelite-gitAUR) (optional) – IDE for projects
- fake-ms-fontsAUR (optional) – Font support for "demo/free/sample/example/tutorial" projects
- kdevelop (kdevelop-gitAUR) (optional) – IDE for projects
- pacman-contrib (pacman-contrib-gitAUR) (optional) – for the paccache cleaning hook
- polly (llvm-gitAUR) (optional) – for potentially increased performance
- qt5-base (qt5-base-gitAUR, qt5-base-headlessAUR) (optional) – qmake build system for projects
- qtcreator (qtcreator-gitAUR, qtcreator-prereleaseAUR) (optional) – IDE for projects
- ttf-ms-fontsAUR (ttf-win7-fontsAUR, ttf-ms-win8AUR, ttf-ms-win8-arabicAUR, ttf-ms-win8-hebrewAUR, ttf-ms-win8-seaAUR, ttf-ms-win8-indicAUR, ttf-ms-win8-japaneseAUR, ttf-ms-win8-koreanAUR, ttf-ms-win8-zh_cnAUR, ttf-ms-win8-zh_twAUR, ttf-ms-win8-thaiAUR, ttf-ms-win8-otherAUR, ttf-ms-win10AUR, fake-ms-fontsAUR, ttf-ms-win10-autoAUR, ttf-ms-win11-autoAUR, ttf-ms-win10-cdnAUR, ttf-ms-win11AUR) (optional) – Font support for "demo/free/sample/example/tutorial" projects
Required by (1)
Sources (6)
Latest Comments
« First ‹ Previous 1 .. 10 11 12 13 14 15 16 17 18 19 20 .. 82 Next › Last »
shawarden commented on 2022-12-09 01:28 (UTC)
Neko-san commented on 2022-12-09 01:16 (UTC)
I was already aware that using cp
was a "better" alternative here for packaging than mv
in this circumstance, but I can't permit it to be what's used for everyone by default because the engine is massive as-is and doing this would quickly cause people with "just enough" storage space to compile the engine to suddenly not have enough just because the packaging function doubles the engine size before makepkg
is done. Unfortunately, there needs to be a better solution.
Also, thanks for pointing out the issue with the launching mechanism; that's what I get for being half-asleep when I wrote that... Lol
shawarden commented on 2022-12-08 19:16 (UTC) (edited on 2022-12-08 19:16 (UTC) by shawarden)
Depending on how you feel about replacing the mv
s with cp
and rm
since mv
does not merge, if you replace the entire for
loop from L207 to L218 with...
# Copy LocalBuilds to pkg...
cp -flr "${srcdir}"/"${pkgname}"/LocalBuilds/Engine/Linux/* "${pkgdir}"/"${_install_dir}"/
if [ -f "${srcdir}"/"${pkgname}"/LocalBuilds/Engine/Linux/Engine/Binaries/Linux/UnrealEditor ]; then
# Can never be too careful with recursive rm...
rm -r "${srcdir}"/"${pkgname}"/LocalBuilds
fi
# Copy the rest of it to pkg... Should we be overwriting LocalBuilds?
cp -flr "${srcdir}"/"${pkgname}"/* "${pkgdir}"/"${_install_dir}"/
if [ -f "${srcdir}"/"${pkgname}"/Engine/Binaries/Linux/UnrealEditor ]; then
rm -r "${srcdir}"/"${pkgname}"/*
fi
...it produces a working install. Someone else will need to test it as my system is mine, yours is yours.
I have also tweaked L254 & L255 because they were sed
ing the .desktop file instead of the unreal-engine-5.sh
script. The user's .desktop should now work as expected instead of opening itself in an editor. Additionally on L255 the substitution needs to be more specific as there is a second UnrealEditor binary in .../Engine/Saved/...
which would break the script's search of the base install directory.
# Replaced .desktop file with launch script
sed -i "s/ChecksumPlaceholder/${DesktopFileChecksum}/" "${pkgdir}/usr/bin/unreal-engine-5.sh"
# Searching install_dir finds multiple binaries (in Saved) so limit the scope
sed -i "s|InstalledLocationPlaceholder|/${_install_dir}/Engine/Binaries|" "${pkgdir}/usr/bin/unreal-engine-5.sh"
juancarlospaco commented on 2022-12-07 09:08 (UTC)
Any updates about a fix?, I am using only git
and makepkg -si
.
shawarden commented on 2022-12-06 01:39 (UTC) (edited on 2022-12-06 01:41 (UTC) by shawarden)
Still need to prune ${dir}
's excessive expansion, but not from ${dir}
itself:
for dir in "${srcdir}"/"${pkgname}"/*; do
if [ -d "${dir}" ]; then
# Prune leading path.
dest=$(basename $dir)
if [ "${dest}" == "LocalBuilds" ]; then
if [ -d "${dir}"/Engine/Linux/ ]; then
mv "${dir}"/Engine/Linux/* "${pkgdir}/${_install_dir}/"
fi
else
mkdir -p "${pkgdir}/${_install_dir}/${dest}"
mv "${dir}"/* "${pkgdir}/${_install_dir}/${dest}/"
fi
fi
done
Could also rename dir
to source
to remove any ambiguity.
I'm running it at the moment but it takes a few hours...
Neko-san commented on 2022-12-06 00:50 (UTC)
@shawarden You're right about me missing a bash blob there; I often personally make the mistake of assuming bash understands what I mean when I write lines like that and would explain why it's not doing what I expected
Going by that, I'm guessing ${dir}
is interpreted as an entire path rather than a single folder name, which would explain why it appends the path to ${srcdir}
and causes this weird home/user directory nonsense
That said, do you think this would be more in line with what's intended?
(I would test this myself but I need a new storage drive and I won't be able to install the drive to do this until later this week)
for dir in "${srcdir}"/"${pkgname}"/*; do
if [ -d "${dir}" ]; then
if [ "${dir}" == "LocalBuilds" ]; then
if [ -d "${srcdir}/${pkgname}"/LocalBuilds/Engine/Linux/ ]; then
mv "${srcdir}/${pkgname}"/LocalBuilds/Engine/Linux/* "${pkgdir}/${_install_dir}/"
fi
else
mkdir -p "${pkgdir}/${_install_dir}/${dir}"
mv "${dir}"/* "${pkgdir}/${_install_dir}/${dir}"
fi
fi
done
shawarden commented on 2022-12-06 00:17 (UTC) (edited on 2022-12-06 00:36 (UTC) by shawarden)
By git repo I was referring to Epic's https://github.com/EpicGames/UnrealEngine.git
, in case there was any confusion.
Using AUR's repo and makepkg
as juancarlospaco did:
❯ mkdir -p ~/Unreal/INSTALL
❯ cd ~/Unreal/INSTALL
❯ git clone https://aur.archlinux.org/unreal-engine.git
...
❯ cd unreal-engine
❯ makepkg
...
❯ tar -tf unreal-engine-5.1.0-23-x86_64.pkg.tar.zst | head -20
.BUILDINFO
.MTREE
.PKGINFO
etc/
etc/pacman.d/
etc/pacman.d/hooks/
etc/pacman.d/hooks/unreal-engine-5-pacman-cache.hook
opt/
opt/unreal-engine/
opt/unreal-engine/Engine/
opt/unreal-engine/Engine/Binaries/
opt/unreal-engine/Engine/Binaries/Android/
opt/unreal-engine/home/
opt/unreal-engine/home/USER/
opt/unreal-engine/home/USER/Unreal/
opt/unreal-engine/home/USER/Unreal/INSTALL/
opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/
opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/src/
opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/src/unreal-engine/
opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/src/unreal-engine/Default.uprojectdirs
❯ makepkg -si
...
❯ ls /opt/unreal-engine
Engine home
❯ find /opt/unreal-engine \( -wholename "*Binaries*" -a -name UnrealEditor \)
/opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/src/unreal-engine/Engine/Binaries/Linux/UnrealEditor
/opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/src/unreal-engine/Engine/Saved/Engine/Binaries/Linux/UnrealEditor
/opt/unreal-engine/home/USER/Unreal/INSTALL/unreal-engine/src/unreal-engine/LocalBuilds/Engine/Linux/Engine/Binaries/Linux/UnrealEditor
Either L207's for
loop has a typo or the package source ${dir}
shouldn't be part of the final install path in L213's else
statement since it still expands to the full path.
❯ for dir in /etc/pacman.d/; do echo $dir; done
/etc/pacman.d/
❯ for dir in /etc/pacman.d/*; do echo $dir; done
/etc/pacman.d/chaotic-mirrorlist
/etc/pacman.d/gnupg
/etc/pacman.d/hooks
/etc/pacman.d/hooks.bin
/etc/pacman.d/mirrorlist
/etc/pacman.d/mirrorlist.pacnew
Unless there's whitespace (or IFS tokens) in it, L207's for dir in /path/to/folder; do
only has 1 iteration where dir
is /path/to/folder
.
Assume L207's for
loop is written as intended, since ${dir}
can only be ${srcdir}/${pkgname}
and never LocalBuilds
, the ${srcdir}/${pkgname}
path is then being appended to ${_install_dir}
which leads to the final install path being:
${pkgdir}/opt/${pkgname}/${srcdir}/${pkgname}
or
/opt/unreal-engine/PATH/TO/WHERE/SOMEONE/RAN/GIT/CLONE/unreal-engine/src/unreal-engine
If you instead want to cycle through the contents of ${srcdir}/${pkgname}
you will need to add a /*
on the end: for dir in ${srcdir}/${pkgname}/*; do
None of the iterations can have dir
being LocalBuilds
since it is the full path though so... maybe L209's if [ "${dir}" == "LocalBuilds" ]; then
should be if [[ "${dir}" == *"LocalBuilds" ]]; then
?
Either way dir
is still expanding to /PATH/TO/WHERE/SOMEONE/RAN/GIT/CLONE/unreal-engine/src/unreal-engine
which is where the files are, but not where they should be going.
Neko-san commented on 2022-12-04 04:42 (UTC) (edited on 2022-12-04 04:45 (UTC) by Neko-san)
$HOME
is just a path name to your home folder
If you enter echo $HOME
in your terminal, that's what you get; additionally, I never even call $HOME
anywhere in the script at all. Search for it in the script, and you won't find it. That said, I've said this to people before to stop using AUR helpers like yay with this package, for consistency, but people don't listen.
I know that you keep saying it keeps including your home folder path but, at this point, the only advice I can give you is to stop building the package in your home folder and build it somewhere else (though I doubt at this point this nonsensical issue will stop) and to stop using yay
to build this.
I'm going to pin what I keep saying about AUR helpers to this page at this point; yes, they're useful, but they can also be detrimental in some obtuse cases like this and I can't possibly diagnose obscene problems like these if no one's on the same page.
shawarden commented on 2022-12-04 04:26 (UTC)
Well maybe I'm misunderstanding what's happening with a file I did not edit at all. That's just how it's running on my system using yay -S unreal-engine
and apparently juancarlospaco, however he runs it. How the exact same script runs on other systems is an unknown to me.
I traced, or at least TRIED to trace the logic that results in everything being installed to /opt/unreal-engine/home/USER/.cache/PACKAGEMANAGER/unreal-engine/...
The lack of /
before opt
is what causes mkdir -p "${pkgdir}/${_install_dir}/${dir}"
to creates /opt/unreal-engine
and then tacks the full build path onto the end, resulting in ""/"opt/unreal-engine"/"home/USERNAME/.cache/PACKAGEMANAGE/unreal-engine/..."
Again, that's just what happens when that unedited script runs on my system.
If you don't know what $HOME
represents then I think I'll just walk away and turn notifications off. Maybe stick to cloning the git repo directly since that works as expected.
Pinned Comments
Neko-san commented on 2022-11-01 02:32 (UTC) (edited on 2023-06-25 01:19 (UTC) by Neko-san)
@juancarlospaco this is easily done on your own system, not in a PKGBUILD, given that building packages runs as root:
Permission issues like this are already mentioned on the UE Arch wiki page: https://wiki.archlinux.org/title/Unreal_Engine_4#Installing_from_the_AUR
This is a user system problem; I already did what I could without needing users to do the above by giving the
777
permissions. If it still gives you trouble, you'll have to use the example to solve it or change the install location to somewhere you have user permissions by default (as I cannot do this for you).zerophase commented on 2021-05-27 08:15 (UTC) (edited on 2021-05-30 08:41 (UTC) by zerophase)
Will update to 5.0 when it is released.