From 66df9b12ecfd61ec5edca3ffc71f67fa4c4cb006 Mon Sep 17 00:00:00 2001 From: Ohio2 Date: Thu, 26 Aug 2021 12:11:54 +0200 Subject: [PATCH 1/3] bump alnux and implement those scripts, a manual file for aps, and the config file --- alnux/package | 2 +- alnux/payload/etc/al/config | 12 ++++++++ alnux/payload/usr/bin/repo | 18 +++++++++++ alnux/payload/usr/bin/sel | 35 ++++++++++++++++++++++ alnux/payload/usr/share/man/man8/aps.8.gz | Bin 0 -> 468 bytes 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 alnux/payload/etc/al/config create mode 100755 alnux/payload/usr/bin/repo create mode 100755 alnux/payload/usr/bin/sel create mode 100644 alnux/payload/usr/share/man/man8/aps.8.gz diff --git a/alnux/package b/alnux/package index 22b8e69..0bed602 100755 --- a/alnux/package +++ b/alnux/package @@ -1,5 +1,5 @@ pkg_config_deploy=true -pkg_config_ver="0.7" +pkg_config_ver="0.8" pkg_config_name="alnux" pkg_config_makedepends="" pkg_config_depends="" diff --git a/alnux/payload/etc/al/config b/alnux/payload/etc/al/config new file mode 100755 index 0000000..fd2aaf1 --- /dev/null +++ b/alnux/payload/etc/al/config @@ -0,0 +1,12 @@ + +########################## +# A config file for the # +# Alnux Packaging System # +########################## +temp_location="/var/tmp" +install_root="/" +installed_pkg_database="${install_root}/var/aps/installed" +locpkg_database="${install_root}/var/aps/repos" +lock="${install_root}/var/aps/lock" +official="https://git.hippoz.xyz/alnux/repo" +debug=off diff --git a/alnux/payload/usr/bin/repo b/alnux/payload/usr/bin/repo new file mode 100755 index 0000000..a854b9e --- /dev/null +++ b/alnux/payload/usr/bin/repo @@ -0,0 +1,18 @@ +#!/bin/sh + +######################################## +# Repo, a repository manager for alnux # +######################################## +. /etc/al/config +case $1 in + # add a repo + add) git clone https://${3}/${2}.git ${install_root}/var/aps/repos/${2} + echo "${2}" >> ${install_root}/etc/al/repo.conf + ;; + # update a repo + update) pushd && cd ${install_root}/var/aps/repos/${2} && git pull && popd ;; + # destroy a repo (remove) + destroy) rm -rfv ${install_root}/var/aps/repos/${2} + sed -i "/^${2}/d" ${install_root}/etc/al/repo.conf + ;; +esac diff --git a/alnux/payload/usr/bin/sel b/alnux/payload/usr/bin/sel new file mode 100755 index 0000000..502a427 --- /dev/null +++ b/alnux/payload/usr/bin/sel @@ -0,0 +1,35 @@ +#!/bin/sh + +######################### +# Alnux sel(ect) Script # +######################### +. /etc/al/config +if [ -f "${install_root}/etc/al/lnver" ]; then + . /etc/al/lnver.cfg +fi +case $1 in + linux) case $2 in + # Lists all kernels + list) ls ${install_root}/usr/src/ | grep 'linux' && + ls -L ${install_root}/usr/src/linux 2>/dev/null + ;; + # Sets a kernel version + set) lnver=${3} + echo "lnver=${3}" > ${install_root}/etc/al/lnver.cfg + ;; + # Links the set kernel version. + link) ln -sv ${install_root}/usr/src/linux-${lnver} ${install_root}/usr/src/linux && + mkdir -pv ${install_root}/var/aps/packages/linux/ && + echo "/boot/vmlinuz-linux-${lnver}" > ${install_root}/var/aps/packages/linux/payloadfiles && + echo "/usr/src/${lnver}" >> ${install_root}/var/aps/packages/linux/payloadfiles && + echo "pkg_config_deploy=true" > ${install_root}/var/aps/packages/linux/package && + echo "pkg_config_ver='${lnver}'" >> ${install_root}/var/aps/packages/linux/package && + echo "pkg_config_name='linux'" >> ${install_root}/var/aps/packages/linux/package && + echo "pkg_config_makedepends=''" >> ${install_root}/var/aps/packages/linux/package && + echo "pkg_config_depends=''" >> ${install_root}/var/aps/packages/linux/package + + ;; + # Destroys the symlink. + destroy) rm -rfv ${install_root}/usr/src/linux ;; + esac +esac diff --git a/alnux/payload/usr/share/man/man8/aps.8.gz b/alnux/payload/usr/share/man/man8/aps.8.gz new file mode 100644 index 0000000000000000000000000000000000000000..51cc5dff3f92489571840d60a092f1a24ed9d8bf GIT binary patch literal 468 zcmV;_0W1C=iwFo)CnsS517UD;E;s;vQo(N9FbuuxD>z@a0j-h-8`f*qxQKx^Hfjgh z0AEy_c7(~2A<0?2uOBTtDX_zIq9ne@M?Ug0f?W!Sw1DSympuN2VxQ#jm^{TF01^+s zg@YC~TH&#V*AY&r`b{S^-0?5>{3~a?*u(beaQp$$T?El~Xb0zEv)+W8(!(2UvmDNA zzUJTP>FChHgXxH)b`j(G9uC{*n9Zr>Ezrjx6!fA+XpDt_IRa!C=MOJQRwU_xT@!A= zpOApnFVRZff*YO3?wy3hW*Kv%u7D1e$|*cqqvaoT&{)$gU<8Z3anc(*awfI&La7Om z%;A!(OcjLA5UHt9C%iNo8mSPdL3kacs>78HeQQOH6U}iB|5MXqXU-TzzJ$<$xF!Zv z*(Bx7>MZO^^lr6i#JXISO%_T^|Ixuk`=r3Zr(TT8h&tRphe1Yp9Fu=}8nJ?g*9??g zn`-D#`=u9S8UH>{kV!}WNcxhR_CZXl3VfSdUwq@VHqGS2gqhwMX?e%@)==vm;Ve02 zO^;TMa8(b&!)OKzGzXmRtmai=JjpJU3s*4nWCj{=D`{8+1W{G!9C&lV_6j{-w6VWv K&*Z!C0ssK Date: Thu, 26 Aug 2021 12:13:48 +0200 Subject: [PATCH 2/3] i forgor --- alnux/payload/usr/share/man/man8/aps.8.gz | Bin 468 -> 422 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/alnux/payload/usr/share/man/man8/aps.8.gz b/alnux/payload/usr/share/man/man8/aps.8.gz index 51cc5dff3f92489571840d60a092f1a24ed9d8bf..974d26dac1e6ab8e84c55a39b6cf54ee5327a52a 100644 GIT binary patch literal 422 zcmV;X0a^YZiwFoHX(wR-17UD;E;s8x{acB=!^O_89l_6h z82blk@ay#r9F6vc7VgDJ`l4JK#wle-)`q22lTV{n$;Q8UCb+XBbDex5WOcxC_n3(o zsCgG9W~Et?3gvI{SOZ645#viHO)2yb&vUa<+GB zWE4l@Vj`z6*VoZH@`V`M!4H8pOPcn&QbOkCO1Ln|vK0QjJX=3-a)v>*EqRY%SLCEA Q(CSP40-jC>R=NWK089(cO8@`> literal 468 zcmV;_0W1C=iwFo)CnsS517UD;E;s;vQo(N9FbuuxD>z@a0j-h-8`f*qxQKx^Hfjgh z0AEy_c7(~2A<0?2uOBTtDX_zIq9ne@M?Ug0f?W!Sw1DSympuN2VxQ#jm^{TF01^+s zg@YC~TH&#V*AY&r`b{S^-0?5>{3~a?*u(beaQp$$T?El~Xb0zEv)+W8(!(2UvmDNA zzUJTP>FChHgXxH)b`j(G9uC{*n9Zr>Ezrjx6!fA+XpDt_IRa!C=MOJQRwU_xT@!A= zpOApnFVRZff*YO3?wy3hW*Kv%u7D1e$|*cqqvaoT&{)$gU<8Z3anc(*awfI&La7Om z%;A!(OcjLA5UHt9C%iNo8mSPdL3kacs>78HeQQOH6U}iB|5MXqXU-TzzJ$<$xF!Zv z*(Bx7>MZO^^lr6i#JXISO%_T^|Ixuk`=r3Zr(TT8h&tRphe1Yp9Fu=}8nJ?g*9??g zn`-D#`=u9S8UH>{kV!}WNcxhR_CZXl3VfSdUwq@VHqGS2gqhwMX?e%@)==vm;Ve02 zO^;TMa8(b&!)OKzGzXmRtmai=JjpJU3s*4nWCj{=D`{8+1W{G!9C&lV_6j{-w6VWv K&*Z!C0ssK Date: Thu, 26 Aug 2021 15:26:36 +0200 Subject: [PATCH 3/3] fix... alnux symlinks??? --- alnux/build | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/alnux/build b/alnux/build index 1dc2761..f7e5bec 100755 --- a/alnux/build +++ b/alnux/build @@ -40,13 +40,12 @@ mkdir -p -m 1777 \ $1/tmp \ $1/var/tmp \ -ln -sf $1/usr/bin $1/bin -ln -sf $1/usr/bin $1/sbin -ln -sf $1/bin $1/usr/sbin -ln -sf $1/usr/lib $1/lib -ln -sf $1/usr/lib $1/lib64 +ln -sf ${install_root}/usr/bin $1/bin +ln -sf ${install_root}/usr/bin $1/sbin +ln -sf ${install_root}/bin $1/usr/sbin +ln -sf ${install_root}/usr/lib $1/lib +ln -sf ${install_root}/usr/lib $1/lib64 -ln -sf $1/lib $1/usr/lib64 -ln -sf $1/run $1/var/run -ln -sf $1/run/lock $1/var/lock +ln -sf ${install_root}/lib $1/usr/lib64 +ln -sf ${install_root}/run $1/var/run