Amiga Unix Wiki

Because AmigaOS just isn't obscure enough today!

User Tools

Site Tools


more_software

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
more_software [2019/12/09 19:42] – major re-writes + addition of SysV pkg section wiki_adminmore_software [2019/12/13 19:39] – updated SysV-part wiki_admin
Line 5: Line 5:
 ====== SysV pkg-files ====== ====== SysV pkg-files ======
  
-NB: All the shell stuff assumes you are running bash. If you are using sh or ksh, you will need to manually expand the brace expansions and if you are using csh or tcsh, you will need to adjust the for-loops and brace expansions for that shell.+ 
 +<file> 
 +NB: All the shell stuff assumes you are running bash. If you are using 
 +    sh or ksh, you will need to manually expand the brace expansions and 
 +    if you are using csh or tcsh, you will need to adjust the for-loops 
 +    and brace expansions for that shell.
  
 To make a SysV pkg from a cpio file: To make a SysV pkg from a cpio file:
Line 11: Line 16:
 1. Make a temp/working directory 1. Make a temp/working directory
  
-2. In the temp/working dir, blow up the cpio file (as root, or with sudo if you have that installed):+2. In the temp/working dir, blow up the cpio file (as root, or with sudo 
 +   if you have that installed):
  
   cpio -idmv /path/to/foo.cpio   cpio -idmv /path/to/foo.cpio
  
-2b. If the cpio file was already installed, an alternative to expanding the cpio file again is to pipe the output of 'cpio -cit < foo.cpio' to 'pkgproto' to build the prototype file in the next step, but it is not as easy to search for symlinks using this method.+2b. If the cpio file was already installed, an alternative to expanding 
 +    the cpio file again is to pipe the output of 'cpio -cit < foo.cpio' 
 +    to 'pkgproto' to build the prototype file in the next step, but it 
 +    is not as easy to search for symlinks using this method.
  
 3. Build the pkg prototype file (does not have to be done as root): 3. Build the pkg prototype file (does not have to be done as root):
Line 22: Line 31:
   pkgproto {dirs,created,from,cpio} >> prototype   pkgproto {dirs,created,from,cpio} >> prototype
  
-3a. This is the tricky part. If there are any symbolic links in the pkg, for some reason, the pkgproto for AMIX doesn't include them in the prototype file, so, we have to add them manually. You'll need the coreutils package installed to get the 'readlink' command. The following example just searches the 'usr' subdirectory, but if the pkg installs stuff outside of 'usr', then they will need to be searched/accounted for as well:+3a. This is the tricky part. If there are any symbolic links in the 
 +    pkg, for some reason, the pkgproto for AMIX doesn't include them 
 +    in the prototype file, so, we have to add them manually. You'll 
 +    need the coreutils package installed to get the 'readlink' command. 
 +    The following example just searches the 'usr' subdirectory, but if 
 +    the pkg installs stuff outside of 'usr', then they will need to be 
 +    searched/accounted for as well:
  
   find usr -type l -print > one   find usr -type l -print > one
Line 30: Line 45:
     The 'one' and 'two' files can be removed after the 'paste' command.     The 'one' and 'two' files can be removed after the 'paste' command.
  
-3b. At this point, it's not a bad idea to check the prototype file for any inconsistancies with regards to permissions and file ownership. For the most part, everything should probably be 'root root', or maybe 'bin bin', but there are exceptions.+3b. At this point, it's not a bad idea to check the prototype file for 
 +    any inconsistancies with regards to permissions and file ownership. 
 +    For the most part, everything should probably be 'root root', or maybe 
 +    'bin bin', but there are exceptions.
  
-4. Create a pkginfo file. The 'PKG' name can only be up to 9 characters long.+4. Create a pkginfo file. The 'PKG' name can only be up to 9 characters 
 +   long.
  
   PKG=pkgname   PKG=pkgname
Line 52: Line 71:
   pkgadd -d /path/you/store/pkgs/pkgname-1.2.3.pkg   pkgadd -d /path/you/store/pkgs/pkgname-1.2.3.pkg
  
-If you configure/install packages to install to their own directory (/usr/local/pkgname, /opt/AmixBP/pkgname, etc), then you can build your prototype file with something like:+--- 
 + 
 +If you configure/install packages to install to their own directory 
 +(/usr/local/pkgname, /opt/AmixBP/pkgname, etc), then you can build your 
 +prototype file with something like:
  
   cd / ; find usr/local/pkgname | pkgproto >> /path/to/working/dir/prototype ; cd -   cd / ; find usr/local/pkgname | pkgproto >> /path/to/working/dir/prototype ; cd -
  
-as the command step of 3 above. Just keep an eye out for bits that might have been installed elsewhere, like gcc likes to put the man pages in /usr/man/* regardless of the --prefix supplied during the configure+as the command step of 3 above. Just keep an eye out for bits that might 
 +have been installed elsewhere, like gcc likes to put the man pages in 
 +/usr/man/* regardless of the --prefix supplied during the configure
 step. step.
 +
 +If you just install everything to /usr/local, which makes it easier on
 +the PATH, I use 'find' to look for files newer than the Makfile for the
 +package that was just installed:
 +
 +  cd / ; find usr -newer ~/dl/foo-2.04/Makefile | pkgproto >> /path/to/working/dir/prototype
 +
 +The prototype file will need a little cleaning, make sure that there are
 +entries for all directories:
 +
 +i pkginfo
 +d none usr 0755 root root
 +d none usr/local 0755 root root
 +d none usr/local/bin 0755 root root
 +
 +The above 'find' command will probably only find /usr/local/bin, you'll
 +need to manually add the two directory entries above it. Also, check
 +lower in the file for other examples, like '/usr/local/man/man1' (for
 +man pages), might need to add an entry for '/usr/local/man', etc. If you
 +miss any, 'pkgmk' will let you know. Just fix them, then re-run pkgmk,
 +adding the '-o' flag to 'overwrite' the previous run.
 +</file>
  
 ---- ----
more_software.txt · Last modified: 2021/09/19 18:00 by 127.0.0.1