This repo contains software to build linux from scratch and package it into rpm files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.4 KiB

1 year ago
1 year ago
1 year ago
1 year ago
  1. find network hosts:
  2. for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done
  3. SCP:
  4. Copy the file "foobar.txt" from a remote host to the local host
  5. $ scp your_username@remotehost.edu:foobar.txt /some/local/directory
  6. Copy the file "foobar.txt" from the local host to a remote host
  7. $ scp foobar.txt your_username@remotehost.edu:/some/remote/directory
  8. Copy the directory "foo" from the local host to a remote host's directory "bar"
  9. $ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
  10. Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"
  11. $ scp your_username@rh1.edu:/some/remote/directory/foobar.txt \
  12. your_username@rh2.edu:/some/remote/directory/
  13. Copying the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host
  14. $ scp foo.txt bar.txt your_username@remotehost.edu:~
  15. Copy the file "foobar.txt" from the local host to a remote host using port 2264
  16. $ scp -P 2264 foobar.txt your_username@remotehost.edu:/some/remote/directory
  17. Copy multiple files from the remote host to your current directory on the local host
  18. $ scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .
  19. $ scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .
  20. Update rpm to 4.14.2.1:
  21. * update setup.sh, download 4.14.2.1 tarball
  22. * update tools.sh, build 4.14.2.1
  23. * update base.sh: not needed
  24. * update rpm.spec, see below
  25. * drop python dependency
  26. #TARBALL: ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.1.tar.bz2
  27. #TARBALL: http://download.oracle.com/berkeley-db/db-6.0.20.tar.gz
  28. #MD5SUM: fdb8b8857f103b087b6aed5b78dd9b4f;rpm-4.14.2.1.tar.bz2
  29. #MD5SUM: f73afcb308aefde7e6ece4caa87b22a9;SOURCES/db-6.0.20.tar.gz
  30. Read base.spec to get list of packages to install
  31. BASE.SPEC GENERATOR:
  32. TODO for base.sh
  33. Make a base.spec generator
  34. list= $( ls rpm dir )
  35. for i in $list; do
  36. case $i in
  37. filespec*) ;;
  38. *) LIST+="Requires: ${i} " ;;
  39. esac
  40. done
  41. write header
  42. write requires
  43. write end
  44. then build base package
  45. RPM PACKAGE INSTALLER:
  46. fetch package name start with base ( sort unique )
  47. determine binary package name insert into name = ${REPOPATH}/package name-* to process
  48. do until - process names, de dupe names
  49. requirements = $( rpm -qp --requires ${RPMS}/${RPM_ARCH}/${RPM_BINARY}): > ${REQUIRES}/${RPM_NAME} 2>&1 || true
  50. work string = $( rpm <name> requirements )
  51. determine requires [ rpm -qp --requires <filespec> ] if / then filespec add to rpm list
  52. determine requires [ rpm -qp --requires <libary ] ] if ( then library add to rpm list
  53. determine requires [ rpm -qp --requires <package> ] else package add to rpm list
  54. binary name = strip current name from list of package names
  55. no more
  56. LIST+="${REPOPATH}/${i##Requires:}* "
  57. rpm -qp --requires ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${REQUIRES}/${RPM_NAME} 2>&1 || true
  58. # rpm -q --whatprovides [file name]
  59. for i in ${LIST}; do
  60. find requires
  61. msg_line "installing: ${i} :"
  62. rpm --upgrade --verbose --hash --noscripts --root ${ROOTPATH} --dbpath ${DBPATH} "${REPOPATH}/${i}-*"
  63. msg_success
  64. done
  65. ./configure \
  66. --prefix=/usr \
  67. --program-prefix= \
  68. --sysconfdir=/etc \
  69. --with-crypto=openssl \
  70. --with-cap \
  71. --with-acl \
  72. --without-external-db \
  73. --without-archive \
  74. --without-lua \
  75. --disable-dependency-tracking \
  76. --disable-silent-rules \
  77. --disable-rpath \
  78. --disable-plugins \
  79. --disable-inhibit-plugin