Date: 04-12-20  Time: 23:20 PM

Author Topic: aixtools.git installation path  (Read 172 times)

0 Members and 1 Guest are viewing this topic.

soeme

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
aixtools.git installation path
« on: November 03, 2020, 07:42:00 AM »
Hi Michael

Do you install the hole package content directly to /opt, how can I move it to /opt/aixtools.git instead... can I relocate the path during installation?

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1273
  • Karma: +0/-0
Re: aixtools.git installation path
« Reply #1 on: November 04, 2020, 08:55:05 AM »
I have never tested using the relocation flags of installp. (See: https://www.ibm.com/support/knowledgecenter/ssw_aix_72/install/reloc_app_packaging.html)


The fastest way for me will be to repackage it. But that is not likely to be this week - as I am preparing a presentation on Ansible.


You need the prefix to be /opt/aixtools, or /opt/aixtools.git?

While you do not have to answer - I am curious why the prefix /opt is not okay.

FYI: I have been considering - for some time - to change my prefix to /opt/aixtools.



Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1273
  • Karma: +0/-0
Re: aixtools.git installation path
« Reply #2 on: November 04, 2020, 09:12:46 AM »
No guarantees - but an interesting question - so:

# mkdir /opt/aixtools.git
# mkdir /opt/tmp.git
# cd /opt/tmp.git
# restore -xqf /tmp/aixtools.git.2.24.1.0.I...
x ./opt/libexec/git-core/mergetools/vimdiff2
x ./opt/libexec/git-core/mergetools/vimdiff3
x ./opt/libexec/git-core/mergetools/winmerge
x ./opt/libexec/git-core/mergetools/xxdiff
# ls
lpp_name  opt       usr
# cd opt# ls
bin      libexec  share
# mv * /opt/aixtools.git
# cd /opt/aixtools.git
# ls bin
git                 git-cvsserver       git-receive-pack    git-shell           git-upload-archive  git-upload-pack     gitk
# ldd bin/git
bin/git needs:
         /usr/lib/libc.a(shr_64.o)
         /usr/lib/libpthread.a(shr_xpg5_64.o)
         /usr/lib/libz.a(libz.so.1)
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /usr/lib/libc.a(shr.o)
         /usr/lib/libcrypt.a(shr.o)
# bin/git --version
git version 2.24.1

Up to here - so good - except - this is not managed by installp.


# ls libexec
git-core
# ls -R libexec
git-core
libexec/git-core:
README.lst                    git-credential-store          git-fsck-objects              git-merge-octopus             git-rebase--preserve-merges   git-sh-setup
git-add--interactive          git-cvsexportcommit           git-gui                       git-merge-one-file            git-reflog                    git-shell
git-archimport                git-cvsimport                 git-gui--askpass              git-merge-resolve             git-remote-ftp                git-submodule
git-bisect                    git-cvsserver                 git-http-backend              git-mergetool                 git-remote-testsvn            git-svn
git-cherry-pick               git-daemon                    git-http-fetch                git-mergetool--lib            git-request-pull              git-web--browse
git-citool                    git-difftool--helper          git-imap-send                 git-p4                        git-send-email                mergetools
git-credential-cache          git-fast-import               git-instaweb                  git-parse-remote              git-sh-i18n
git-credential-cache--daemon  git-filter-branch             git-legacy-stash              git-quiltimport               git-sh-i18n--envsubst

libexec/git-core/mergetools:
araxis         codecompare    diffuse        examdiff       gvimdiff2      kompare        p4merge        tortoisemerge  vimdiff3
bc             deltawalker    ecmerge        guiffy         gvimdiff3      meld           smerge         vimdiff        winmerge
bc3            diffmerge      emerge         gvimdiff       kdiff3         opendiff       tkdiff         vimdiff2       xxdiff

Just taking one example, there is some hope - assuming the main program finds /opt/aixtools.git/libexec/*

# file libexec/git-core/git-http-fetch
libexec/git-core/git-http-fetch: 64-bit XCOFF executable or object module not stripped
# ldd libexec/git-core/git-http-fetch
libexec/git-core/git-http-fetch needs:
         /usr/lib/libc.a(shr_64.o)
         /usr/lib/libpthread.a(shr_xpg5_64.o)
         /usr/lib/libz.a(libz.so.1)
         /usr/lib/libcrypto.a(libcrypto64.so)
         /usr/lib/libssl.a(libssl64.so)
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /usr/lib/libc.a(shr.o)
         /usr/lib/libcrypto.a(libcrypto64.so.1.0.0)
         /usr/lib/libcrypt.a(shr.o)

So, you could try just moving everything to the directory you want it at. MAYBE it will work - almost out of the box.

soeme

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
Re: aixtools.git installation path
« Reply #3 on: November 04, 2020, 12:30:36 PM »
OK, thank you for this sample.
For me makes more sense to prefix static application in it's own directory, but this is my personal opinion ;-)

Is it correct that all static links are absolut and not relative to the libexec's - A recompile is mandatory for all?

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1273
  • Karma: +0/-0
Re: aixtools.git installation path
« Reply #4 on: November 04, 2020, 04:08:57 PM »
I do not worry myself with how packages call themselves - I have no idea how git finds 'helper' programs.

And, while I do use the term static - as to the libraries git uses - embedded is perhaps a better word, i.e., it is not making as much use of dlopen() (viewable by ldd output).

The prefix '/opt' was chosen to specifically not (re-)use and filepath already in use by others (e.g., AIX, BULL Freeware, Michael Perzl, AIXToolbox).

In short, it is possible - from my packages perspective - to have, e.g., the AIX Toolbox version of git installed.

I am working on an Ansible project - that would make it possible to use Ansible to load software packages - including dependencies. And, if that starts to work well I may even consider having dependencies (again).

Michael